WordPress Performance Tweaking

Updating WordPress Performance

Vanilla WordPress performance isn’t great, each page has to be generated via PHP per view, which soon starts to bog your server down under load. Fortunately there are some plugins and tweaks you can make to improve performance and resilience.

Any PHP or Apache gurus out there, feel free to comment and let me know where I’m going wrong, I don’t claim to be a PHP environment expert!

Caching plugin

I’ve generally used W3 Total Cache which provides a number of different levels of caching, including the PHP itself if the relevant apache modules are installed. You can even delegate data to a CDN if that’s your thing.

But before installing the plugin, let’s get everything ready for optimising it.

PHP Performance

To get the full benefit of a plugin like Total Cache, you need to add a few modules to Apache and PHP.

Install DotDeb repository

The DotDeb repository is set up for Debian boxes with up to date versions of common packages.

Instructions are straightforward and involve adding their repository.

Install fpm

fpm is a FastCGI process manager.

Install apc

apc is a PHP object cache. It’s required by W3 for doing the PHP caching.

Install mod_expires apache module

The caching plugin works better with mod_expires installed.

You should get a response like

Install mod_headers apache module

.. and with mod_headers installed

You should get a response like

Do a graceful apache restart

Once you have restarted, have a look in your apache logs for any thing unusual.

Now install W3 Total Cache

Once installed and activated, the first thing to do is run the compatibility check to ensure that everything is ok.

Then you can start enabling features.. and hopefully see some response time improvements!



Leave a Reply