How can you speed up the loading of your site on VPS?

Procédure

Why speed up the loading speed of your site on your VPS?

There are many tools available today to help you test your site's loading speed. These tools also allow you to target the various measures to be implemented on your site. It's good to know that the speed at which your site loads gives your visitors an initial impression of your company. What's more, if it takes too long to load , this can have an impact on your site's ranking on the main search engines.

There is no limit to the loading time of your web pages. However, most websites take less than three seconds to load.

What is Varnish?

Varnish is a cache server placed in front of Apache. It caches the content of your website to improve performance and loading time.

How does Varnish work?

As soon as a request is made, Apache accepts it, retrieves it and delivers the content of your site to your visitors. However, when you have PHP pages, the code has to be executed each time a visitor wants to access the page. As a result, processing requires time and resources from your server. This can result in your pages taking longer to load.

To avoid this delay, it is possible to set up a copy of your site in the form of a cache. This allows you to serve your visitors the cached page rather than waiting for your PHP code to be analysed and processed.

How do you analyse your site?

You can carry out an analysis of your website at any time by visiting GTMetrix, which will enable you toanalyse your site's performance and check what could be improved. The Yslow test is not directly linked to the server. The results can be improved using the wp-rocket module, but the PageSpeed result is linked to the server. The PageSpeed result can be improved by installing a Varnish-type module that can be coupled with a wp-rocket-type cache module.

What's more, thanks to Varnish, in the event of a DDOS attack, your server and your site will remain available. The Varnish module will keep your site fast and prevent your server from becoming saturated.

An initial analysis of the website, using the"Chrome apptelemetrie.com" module, currently shows that the Wordpress dashboard is taking a long time to load. The main page of the dashboard takes around 8 seconds to load completely.

How can you speed up the loading of your site on VPS?

If we switch to the"Products" page of the Wordpress site, it takes even longer to load (10.1 seconds).

How can you speed up the loading of your site on VPS?

An analysis with GTMetrix gives us the following values:

  • Performance (PageSpeed): 53% : The current permformances of the website are not necessarily very good.
  • Structure (YSlow): 82%: The site's structure seems to be relatively good at the moment.
  • LCP (Fully Load Time): 4.5 seconds : The site's loading time could be improved.

How can you speed up the loading of your site on VPS?

To fix this, we're going to start by installing Varnish on the server. The Varnish module was developed by LWS. The cache module is installed via SSH on your server. If your server is a managed server, you can ask for this module to be installed by opening a managed service.

Once it has been installed on your server, you can connect to this module by going to the https://vpsXXXX.serveur-vps.net:8080/lwscache page. You will need to change vpsXXX to the number of your VPS server.

The connection information is as follows:

  • Identifier: root@vpsXXX.serveur-vps.net (you will need to replace vpsXXX with the number of your VPS server)
  • Password: The ISPConfig access password

How can you speed up the loading of your site on VPS?

Once connected to LWSCache, you can perform several actions on the cache module, such as

  • Purge your website cache
  • Edit the size of your cache. The default size is 256 MB.

How can you speed up the loading of your site on VPS?

You can also edit the cache rules. Use the"Edit Cache Rules" button to exclude certain pages from your cache.

How can you speed up the loading of your site on VPS?

Following the installation of Varnish on the server, you can now see that the site is faster, particularly access to your Wordpress Dashboard and the product page, which takes 4.63 seconds instead of almost 11 seconds.

How can you speed up the loading of your site on VPS?

By running a new analysis on GTMetrix, you can see that performance is much better on the new website analysis.

How can you speed up the loading of your site on VPS?

Although PageSpeed (Performance) and YSlow (Structure) don't really move, you can see a clear difference in the LCP (Fully Load Time) value of the website. In addition to installing Varnish, it may be worth using WP-Rocket or another caching plugin to complement Varnish and improve the performance of your site by caching CSS and other instances of it.

How does Varnish work on a VPS server?

Conclusion

You now know how to use Varnish caching on your VPS server. You can request Varnish caching by opening a facilities management request with the VPS technical department.

Coupled with a caching plugin, it will really boost your site's performance, guaranteeing stability and a better experience for your visitors.

Don't hesitate to share your comments and questions!

Rate this article :

5/5 | 1 opinion

This article was useful to you ?

Article utileYes

Article non utileNo

Vous souhaitez nous laisser un commentaire concernant cet article ?

Si cela concerne une erreur dans la documentation ou un manque d'informations, n'hésitez pas à nous en faire part depuis le formulaire.

Pour toute question non liée à cette documentation ou problème technique sur l'un de vos services, contactez le support commercial ou le support technique

MerciMerci ! N'hésitez pas à poser des questions sur nos documentations si vous souhaitez plus d'informations et nous aider à les améliorer.


Vous avez noté 0 étoile(s)

Similar articles

3mn reading

How do I access ISPConfig on my dedicated VPS server?

0mn reading

How do I create a DNS server in ISPConfig on a dedicated VPS server?

0mn reading

How do I change the ISPConfig 3 panel password?

1mn reading

How can I secure access to my ISPconfig panel using an .htaccess file?


Ask the LWS team and its community a question