Site icon GetPageSpeed

Performance Stack for Single Server

Let’s review best performance stack for hosting WordPress, Magento, Joomla or any other website with heavy usage of PHP. This stack includes all the software you need for running site with high speed. We also include some of the best practices in configuring the software mentioned.

The main prerequisite for this stack is VPS or dedicated server with at least 2GB RAM. With some configuration tinkering you may be able to run it fine with 1 GB of RAM.

You can use this as recipe for making a working web server solution with any providers like Linode, DigitalOcean or Vultr.

If you’re interested in having your server configured by us, contact any time and we will provide you with a quote.

PHP 7

With the recent release of PHP 7, there is no reason not to use it. New versions of WordPress or Magento are released, supporting the latest and greatest version of PHP.

The best feature of PHP 7, as you guessed it, is performance. It works twice as fast compared to PHP 5.6.

Major tweaks for PHP

Percona MySQL Database

Percona is a great MySQL server fork, which can work as drop-in replacement to your MySQL server needs. Its primary goal is to achieve best performance. You can fetch it from here: http://www.percona.com/doc/percona-server/5.5/installation/yum_repo.html

Major tweaks for Percona MySQL

Nginx as web server

Nginx has been much better than Apache for years. The latter was there only for the reason it was available earlier and better packaged. Apache is trying to catch up in performance, but Nginx is still outperforms it in many ways.

Major tweaks for Nginx

Varnish Caching

Keep Varnish on its default port 6081 and introduce it to your LEMP stack as the caching layer. Varnish is the greatest caching solution available for the Web. This will dramatically increase performance.

Major tweaks for Varnish

Configure the website

Nothing knows better when to cache things and when to invalidate Varnish cache besides the website itself.

WordPress

You need a WordPress plugin to invalidate Varnish cache when new post is added or modified: W3TC can do that. In addition, your Varnish VCL file should support the invalidation request.

Some of the things can be cached in addition to Varnish, specific to WordPress. As such, make sure to configure Object Cache and Database Cache in W3TC to store in APCu or Memcached.

Magento

Magento 1.x can support Varnish with the addition of Turpentine plugin, but this is a very bad idea, unfortunately. Use FPC that works instead.

Magento 2.x supports Varnish out of the box! 🙂

Exit mobile version