Having your WordPress site run as fast as possible is extremely important.

If your pages load fast to visitors without too much delay it could mean many positive things for your site and business. Your search engine rankings may increase, your visitors will continue browsing your site if it is not a tedious procedure and conversions will increase. This is all speculation but it is my confident opinion.

Based on my experience from building literally hundreds of WordPress sites over the past years, I can recommend ways of speeding up WordPress sites and give it the best performance possible. This will apply to any type of WordPress site whether it is small and simple or extremely large and complex.

As a result of these steps, I managed to get this Lost In Code site quite fast.

2014-03-28_22-00-26

You may leave out some of the steps as you feel necessary. Here are the recommendations:

  1. Install a caching plugin
  2. Install DB caching
  3. Set up a CDN
  4. Combine & Minify
  5. Run a test

1. Install a caching plugin

Installing and configuring a WordPress caching plugin is quick and easy for anyone. Choosing the right one is the important part though. Here are some of the popular WordPress caching plugins available:

I’ve tried several of them on multiple sites in depth and the conclusion is that one of them works the best, always.

The best caching plugin for WordPress till now has been WP Super Cache. It’s interface may not look as good as some of the other caching plugins and it may actually lack some features which the other plugins have but it is extremely fast and together with some other 3rd party plugins, it works well.

2. Install DB caching

Some of the WordPress caching plugins include a database caching feature. If the one you use already has this, you can skip this step. If it doesn’t, like WP Super Cache and Quick Cache currently doesn’t have for example, you can continue reading this step.

The idea is to cache queries in WordPress created by WordPress itself and then the theme and 3rd party plugins too. To cache queries on the current page and then also on pages after that will speed up your site drastically.

Installing and configuring database cache for your WordPress site is extremely easy. I recommend installing a plugin called DB Cache Reloaded Fix which will do the job for you. It is a free plugin which you can install and then configure under Settings > DB Cache Reloaded in your WordPress dashboard.

2014-03-28_23-26-12

3. Set up a content delivery network (CDN)

A content delivery network aka CDN is a very long and technical term for having your website load your resources (images, stylesheets, javascripts, etc.) from a remote location other than your own server.

The purpose of a CDN is to speed up your site by reducing the requests to your own server and also increasing the requests to multiple, other hostnames in order to load resources faster and simultaneously. The layout and content of the page would seem to appear instantaneously to the user once the request has finished, loading everything at the same time essentially.

First step would be to choose a CDN. Here are some popular ones:

You can setup a CDN in most caching plugins like WP Super Cache and W3 Total Cache. With W3 Total Cache we couldn’t get it working on several occasions but with WP Super Cache it was quick and you can setup multiple CDN hostnames by filling in a comma-separated list accordingly in it’s CDN settings.

2014-03-31_22-07-15

4. Combine & Minify Resources

The purpose of combining and minifying is to firstly reduce the number of requests and then to make the request sizes smaller as well with the minification. HTML, CSS and Javascript can literally be minified by taking out white space and newlines to make the files much, much smaller.

In all honesty, I haven’t had much luck with this on larger sites. There are just too many scripts and stylesheets which conflict when they are put together in this manner. If you have a smaller site with few plugins, give it a try and it may work very well.

There are several ways of achieving this and some caching plugins actually include this feature but for me, the quickest and most efficient way was to install a WordPress plugin named Autoptomize. It worked quite well without much hassle. It minifies HTML, CSS and Javascript for you and you can respectively choose which to minify and which not to. It also has advanced settings to exclude certain files which you can use to remedy some possible conflicts.

5. P3 Plugin Profiler

Still slow? You can do a scan with the P3 Plugin Profiler plugin to see which plugins or parts of your WordPress site is using too much memory and/or CPU so that you can deactivate or replace them if needed.