Improve osclass load speed

Site speed is one of core elements that makes different between successful and unsuccessful classifieds. By default osclass is not well optimized plus themes nad plugins makes it even harder, however it's worth to spent some time on osclass load speed improvements as google consider site speed in it's rating as well.

Tips and Tricks
3. Jun 2021
1853 views
Improve osclass load speed

Introduction

Site speed is one of core elements that makes different between successful and unsuccessful classifieds. By default osclass is not well optimized plus themes nad plugins makes it even harder, however it's worth to spent some time on osclass load speed improvements as google consider site speed in it's rating as well.

 

Hosting

First important element is your hosting. There is no osclass optimized hosting, however you should be able to easily find best for you:

  • not cheapest one, proper osclass hosting should cost approx. $50, depending on region and services
  • PHP7 is must, makes your classifieds loading faster
  • use MySQL 5.7 version for your database
  • good hosting will provide memcache caching system, that levarages sql queries to database
  • choose regional (in-country) hosting, otherwise your users may suffer from slow site loading. Server should be closest to your customers.

Your hosting company should provide also automatic backups of database and file system for at least 1 week.

If your hosting has memcache enabled, add following to your config.php

define('OSC_CACHE', 'memcache');
$_cache_config[] = array('default_host' => '127.0.0.1', 'default_port' => 11211, 'default_weight' => 1);

 

SSL certificate

One of most important osclass speed factors is using of SSL certificate. Even SSL is to secure connection of your users so noone can easily read password and other confidential data when submitting forms, usage of https possitively improve website speed. This increase can be really high, like twice faster load time comparing https:// version to http:// version.

Nowadays Let's Encrypt provides free SSL certificates so it's not a problem to secure whole site including it's subdomains - for free! Your hosting should have this enabled.

Once you setup SSL certificate and your https:// version of site is loading correctly, add following code to .htaccess file to ensure when user enters to http:// version, there is instant redirect to https:// version of osclass.


RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

 

.htaccess configuration

Is most known for securing friendly URLs, but provides a lot of options to optimize your site. This file should be placed in installation root and you should work with it carefuly. Do not forget to backup this file before each change. Using .htaccess file you can enable apache optimization, image size reduction and much more your osclass will benefit from. To enable friendly URLs, redirect http:// to https:// and compress images, disable cache control and few other improvements, add following code to your .htaccess

n semper, ligula sit amet hendrerit vehicula, ante ex porttitor elit, sit amet finibus lacus sem sit amet sem. Integer blandit volutpat ligula, ut imperdiet tortor pulvinar vel. Sed volutpat posuere euismod. Proin a risus sit amet tortor venenatis congue eu et sem. Aliquam dapibus aliquet ante, vitae porttitor nunc sodales non.
PHP, Osclass, Java, Python
Categories
Guides
Suspendisse tincidunt est at leo feugiat, eget dapibus orci rutrum. Fusce eu gravida augue, ac aliquet ante.
News
Nullam mollis risus id facilisis tincidunt. Sed tempor viverra dui, ac tristique sapien congue sed.
Tips and Tricks
Vivamus mattis maximus magna eget luctus. Donec purus leo, dictum in feugiat ac, dapibus a tellus. Nulla finibus dui et luctus ornare.
Lately commented
Go to OC-Admin Show Banners