yumupgrades for production use, this is the repository for you.
Active subscription is required.
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.
If you’re interested in having your server configured by us, contact any time and we will provide you with a quote.
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
- Zend Opcache with disabled timestamps validation
- Store PHP sessions to Memcached server installed on the same machine
- Configure PHP to be run as PHP-FPM with Nginx
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
- Enable query cache and optimize its size (or disable it altogether) and other variables using mysqltuner
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
- Enable SSL + SPDY
- Enable FastCGI microcache
- Enable OSCP stapling for faster SSL
- Enable max Expires header for static files
- Enable Gzip compression
- Enable keep-alive
- DO NOT install Google PageSpeed extension for Nginx. This will break Varnish caching. That is, unless you try to configure Downstream Caching in ngx_pagespeed, which may not work well. Most of the things PageSpeed module would do, can be done once by proper server configuration which will not waste CPU cycles every time a page is requsted
- Disable unnecessary logging
- Add support for conditional GET for dynamic pages
Put Varnish on port 80 and have the greatest caching available for the Web. This will dramatically increase performance.
Major tweaks for Varnish
- Configure / write your VCL correctly: ignore all the cookies irrelevant to your application
- Adjust keep-alive
Configure the website
Nothing knows better when to cache things and when to invalidate Varnish cache besides the website itself.
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 2.x supports Varnish out of the box! 🙂