The speed of page loading is very important to ensure good search engine ranking and a better user experience. We know that Google’s search algorithm includes page loading times as one of the key parameters when calculating pagerank.

Google Take On Speed

There is a Google project that can replicate the slowness of a website (or a page). Within a controlled system the speed is deliberately decreased by injecting a server-side delay, which results in an increase in processing time before and during the time during which results are returned to the browser, then displayed on the user’s browser.

By reducing the loading speed from 100 milliseconds to 600 milliseconds, the number of searches decreased from 0.2% to 0.6%, with an average of 4-6 weeks of results.

In addition, it was also found that people exposed to a 200 millisecond delay performed 0.22% fewer searches during the first three weeks and 0.36% fewer searches during the second three week period. And with a delay of 400 milliseconds, the same results followed a decrease of 0.44% and 0.76% in the first and second three-week periods. A huge impact on the number of searches performed, given the scale of Google’s web search.

In addition to Google, several major companies including AOL, Microsoft, Bing and Shopzilla have recognized the importance of having websites that load quickly. You can learn more about this here.

Optimizing WordPress: 7 simple steps

We therefore give you some advice on how to improve WordPress speed through the optimization of some key parameters in the calculation of the pagerank.

1-Activating dynamic caching

There are many services like Varnish and APC that can be used, but they all require a lot of side configurations to work properly. Ask your provider if it supports dynamic caching, and activate it.

2-Enabling gZIP compression

Gziper compression is used to reduce the size of data that is transferred between the server and the user (images, CSS and JavaScript files). In this way, the web server will be able to compress this content before it is transferred to the Internet and directed to the browser, which will then have the task of decompressing it before showing it.
The easiest way to enable Gzip compression for images and JS CSS files is to add these lines to the .htaccess file in the WordPress root folder:

## ENABLE GZIP COMPRESSION ##
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
## ENABLE GZIP COMPRESSION ##

3-Using CDN

CDN stands for Content Delivery Networks. These are networks of servers that clone the site to all location nodes. It means that when visitors visit the site, it will be shown from the nearest server location, instead of the main data center of your hosting provider.
For example you can see BunnyCDN or Cloudflare

4-Optimizing images

There are few things to know about the images on a WordPress site:

  • Use images with the correct size: Do not upload large size images, then scale them with HTML. Make sure your photos and other images are no larger than the size in which you are actually viewing them.
  • Smush the images: you will remove all additional data from your photos – date of creation, camera used for the photo, GPS coordinates, etc.. There’s a great plugin for you: ShortPixel Image Optimizer. Out of curiosity, first test this address to see how much you can reduce the weight of the images on your site: https://shortpixel.com/image-compression-test/site/
  • Use sprites for the themes: Using sprite is a CSS technique that uses a single image to show multiple design elements on your pages. This way, instead of uploading dozens of small images (requiring HTTP each time) the site will only open one. Sprites, however, must be provided when the theme is designed. So, look for themes that use sprites.

5-Minimizing JavaScript and CSS Files

Minimizing CSS and JavaScript files means removing all double spaces, blank lines, comments, etc., thus reducing their size. There are many online tools that you can use for free. If you use the W3 Total Cache plugin, it has an option to automatically minimize your files.

6-Leverage and caching for the browser

Take advantage of the storage in the browser cache. You can specify how long the browser will cache images, CSS, JS and flash files. You can add the following lines for the .htaccess file in order to allow this technique.

## EXPIRES CACHING ##
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType application/javascript "access 1 month"
ExpiresByType application/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 2 days"
## EXPIRES CACHING ##

7-Optimize the database

It is a good practice to regularly optimize the WordPress database. This is quite comparable to running the disk defragmentation utility on your local hard drive.
For database optimization you can use the tool that is commonly provided for management: PhpMyAdmin. Simply select all the tables and proceed with the optimization, of course after making a security backup.