How to optimize loading speed of WordPress ?

1

To optimize speed of Wordpress, and get highest loading speed, thus to sell optimally, 3 conditions must be met :

  • server whose components are at the cutting edge of technology : 3D NVMe SSD
  • combination of high-performance server software (our know-how)
  • minimal optimized website and use PHP7, Wordpress is natively quick on our servers. Be careful with custom themes and modules so that it does not degrade initial performance...


We confirm that our servers are very well optimized for Wordpress :
https://www.yoorshop.hosting/en/5/Optimized-hosting-Wordpress-Europe-France

For Wordpress, we have the best results with PHP 7, 7.1, 7.2, 7.3
OPcache is enabled by default with compatible PHP versions
- Check compatibility of your theme, and modules/plugins with PHP 7

wordpress hosting

How to correctly simulate the reality of a visitor's experience on your site ?

Check our article about loading speed impact

We recommend these online testing tools by order of pertinence :

http://www.webpagetest.org
https://tools.pingdom.com

To read for more Tools
 
NB :
- Most important criterion are 'First byte time', 'speed index' and 'Start Render', given on website webpagetest.org
- Pagespeed insights is the baddest online testing tool, it is broken and incomplete
- some testing websites does not see our Brotli/Gzip compression

Do you know that testing online a website based only on the homepage is far from being a complete evaluation ? here is why...

A visitor is generally not discouraged because your site loads between 3-5 seconds on first loading, (if it is 10 seconds it is too much for sure), and your visitors will benefit from a faster speed on our servers from second page visited thanks to cache browser settings enabled by default, thus only the new elements of the new pages visited during the visit will be sent from the server, the rest comes from its browser cache (unbeatable in term of speed)...
The test alone of the homepage makes it possible to compare the speed between 2 hosting services, but also to observe the degree of optimization of the homepage or of the tested page...
(We saw many sites with no problems on the homepage, while big problems appeared in category and product pages, linked to non optimized modules or poorly designed ...)

So if you're using an online testing tool, you need to do 3 tests to see either the speed between 2 hosting services, either check how the concerned page is optimized : homepage, 1 category page, 1 product page.
Please note that :
- online testing tool clean their cache for every test in general, so it will still not represent the true reality of a user's experience.
- more than 50% of visitors arrive on your website on a page that is not your homepage...

To simulate a real user's experience, you'll need to do it from your PC by installing the Chrome plugin named Apptelemetry (you'll see a counter on the right side of your URL bar) : https://chrome.google.com/webstore/search/AppTelemetry
Clean your cache, and visit your site by going on each type of page, and notice the loading times from the second page visited...
Use "Inspect elements" with the right button of your mouse in chrome or "Examine the item" in firefox, see the "Performance" tab, activate the recording. Now browse your website to get the waterfall, and possibly identify items that would be problematic...

For an advanced testing of your website, we recommend this unique feedback service :
https://www.userlynx.com/

1. Wordpress comes with a few number of modules and less there is, better it is, you should use only quality plugins/modules, and if you have problems : 95% of issues are plugins related...
Make sure weight of your pages, excluding homepage, does not exceed 3MB.

Example with webpagetest.org of a pretty well optimized website :

Optimized website Wordpress
Here is the score of our website whose optimization is maximized according to our technical constraints and choice of contents :
https://www.yoorshop.hosting/images/webpagetest-yoorshop.JPG

The 'First byte time' includes the initial and almost simultaneous loading of many elements (without previous cache on the final visitor side):
- initial DNS resolution
- the establishment of the initial SSL connection when the site is in SSL
- initial loading of the website which includes WordPress CMS

All server caches, and the website will make the next pages visited will be seen much more quickly...

The most importants here are the 'Start render' and 'Speed index' corresponding to from when the page appear displayed to visitor...
Ref : https://blog.dareboost.com/fr/2015/07/start-render-visually-complete-speedindex/


It is absolutely normal to see sometimes a score : N/A or D for images compression, it depends on your images, and optimization must be done by you as server compression can't significantly compress them...

For 'waterfall', don't forget that you can do this test more precisely from your own computer by using feature 'Inspect element' of your browser, see tab 'network'


2. Cache and compression
2a. You should use/activate only one efficient cache system at one time, by order of efficiency observed :
https://fr.Wordpress.org/plugins/comet-cache/ 
https://Wordpress.org/plugins/wp-super-cache
https://Wordpress.org/plugins/zencache
Note that a visitor coming up through your homepage or any other is always heavier, the next pages he will visit will go faster, as his browser has also kept in cache main elements of the page. To test also : AMPcache
More details here

We offer unique possibilities to maximize speed with PHP-FPM + Nginx, and dedicated WordPress config to use with cache plugins :
https://support.yoorshop.hosting/knowledgebase/4056/Hosting-with-Rocket-Nginx-WProcket-plugin-and-Nginx.html

2b. Don't leave installed plugins that you do no use, they cause a heavier load for most, and can cause potential conflict with other plugins as most are still in your database !

2c. On the other hand, these online testing tools do not always detect properly what compression is used, while the most performing are gzip and Brotli, which we use by default for all our clients : gzip for the http, and brotli for the https.
Brotli for https :
https://tools.keycdn.com/brotli-test 

3. Have a good web host like YOORshop, our servers are powerful and performant (SSD + Nginx + litespeed servers + http2), and configured with different optimizers that contribute naturally to good performanceThe allocated to your account processor  also plays an important role (the price of our offers is proportional to the processor)

4. Verify the proper execution of Javascript in various modules (sliders, categories), and at the end of loading your page (enable in Performance 'Run Js at the end') It could not work even activated, we have seen that... check coding, or even the 'waterfall'  of online test website.

5. Also, think about testing activation of Cloudflare from your cPanel, as it could help websites with much contents, and also help loading speed on far away continents.... (before this, optimize your website at best possible, this is unavoidable for performances with or without Cloudflare !)
(The test must last at least 3 days so that Cloudflare can cache sufficient content requests)

For a SSL site, the cheapest and for best performances is : https://www.keycdn.com/?a=31796 


6. Be 50-100% SSL, and benefit from speed of HTTP2 protocol :
https://support.yoorshop.hosting/knowledgebase/1551/How-to-install-an-SSL-certificate.html

7. Optimization with PageSpeed
https://support.yoorshop.hosting/knowledgebase/3242/Optimization-with-PageSpeed.html

8. Reduce heaviness of CMS WordPress

Disable wp-cron in wordpress by adding this in wp-config.php:
define ('DISABLE_WP_CRON', true);

and then adding the cron in cpanel (5 minutes schedule is recommended minimum, and a*update with your domain name):
curl -s "http://www.votredomaine.fr/wp-cron.php?doing_wp_cron" >/dev/null 2>&1

NB :
- Activating memcache in Wordpress require to add extension WP-FFPC or similar
 
9. We offer the 'SSL offload' feature which reduces the loading time during the first connection (if your site displays an error, it means that it is incompatible with this function). To activate / test it, from your cPanel, at the bottom, Nginx Manager icon, choose your domain, then 'General settings', click on 'enabled' for the SSL Offload line, then lower on the right, save by clicking on the button in the 'Save settings' section

Also Read

How to start SEO for my website ?

This is a difficult and an endless work at begin, premium quality is largely better than...

Google ranking criteria

Reminder, or information, it is very important to stick how Google defines ranking websites, and...

Optimization with PageSpeed

Some sites may benefit from Pagespeed which is disabled by default at minimum level with...

Database optimizations

We use MariaDB which is a very good evolution of MySQL server, and there is no compatibility...

How to optimize loading speed of Prestashop ?

To optimize speed of Prestashop get the highest loading speed, thus to sell...