Make your blog faster (part 1)

It’s all about performance

I used to have a small virtual private server (VPS) years ago. Like any shared service, this virtual machine shared all its resources with other VPNs from other customers on the same hardware. Though everything was dependent on the host provider’s settings, there were still enough adjusting screws to turn. At least if you knew what you were doing.
Inexpensive shared virtual hosts, hosted by hundreds on the same hardware system, have intensified this competition for system resources. Even if bandwidth isn’t your main concern, CPU, I/O and memory certainly will be. Although hosting a website with a content management system and all underlying system components has become a rather simple task, the more basic questions about security and performance have not.

Get a faster blog with CDN

In this series I want to describe the necessary steps for setting up a caching concept for a WordPress 4.x hosted site on a shared virtual host. The goal is setting up a Content Delivery Network (CDN) for supporting this site. Every step I am carrying out here has been done for this very website. I have chosen two products for enhancing this website’s caching – W3 Total Cache for WordPress and amazon web services (AWS) – but neither do I want to tout for them nor recommend their use. This is a how-to document for using these two products, no more no less. You will learn all necessary steps the way I did.

Preliminaries

I guess you already own a WordPress-based blog or website. You should have a basic understanding of how to obtain and install WP plugins. In the more advanced sections you will have to set up DNS records, if you want to use alternate domain names instead of amazon’s defaults. We will do some basic tasks first, then head to the more complex tasks.

Why amazon? Why not…?

There are a lot of CDN providers, indeed. I don’t have the time and resources to test them all. In fact, I wasn’t even aware of them until I noticed amazon’s offer for using its AWS for one year. Setting up an account and scanning their services was a matter of a few minutes. What I have found was interesting enough for just giving it a try. I assume that the services of other providers will work similarly.
When signing up for AWS you will have to enter payment information. Some of the steps we are going here will cost you a few cents. I assume that you already have bought something at amazon’s website and that your level of suffering is big enough for installing your very own CDN. You have been warned.

First steps

So enter your WordPress admin area and install the “W3 Total Cache Plugin”. Make sure it’s working with your version of WordPress. After installing and activating the plugin you will notice a new entry in WP’s menu bar: Performance. Everything behind this menu entry will have an impact on your site’s performance. Not every setting is useful for every site, but let’s take one step after another.
First you will have to do a compatibility check. This check tests the software configuration of your shared host and finds missing or problematic modules.

W3 Total Cache Compatibility Check

W3 Total Cache Compatibility Check

Fortunately, W3 Total Cache offers this check by the press of a button (Performance -> Dashboard). The whole check takes some time. There might be some „undetected“ modules, but it is rather sure that they are indeed installed on a shared server. It’s worth a try, anyway.

If you are using the WordPress SEO extension, pressing this button doesn’t hurt:

Activating WP SEO extension for W3 Total Cache

Activating WP SEO extension for W3 Total Cache

You also can activate this extension at Performance -> Extensions:

WP SEO for W3 Total Cache Plugin

WP SEO for W3 Total Cache Plugin

Now is a good time to enable W3 Total Cache’s Preview mode. Do so by clicking Performance -> General Settings: Enable preview mode. Preview mode lets you configure anything without actually enabling it; things will go live only after you have switched off preview mode by hitting the “disable” button. This allows you to do all configuration work at once and switching it on, later.

Once we are at Performance -> Extensions, you might activate FeedBurner, too. We won’t use CloudFlare, and the Genesis Framework is disabled by default if you didn’t install the needed modules.

You might now start clicking these „Enable page caching“, „Minify“ settings etc. But instead of this, we’re digging into Amazon’s CDN a bit. In part 2 of this series.

About Manfred Berndtgen

Manfred Berndtgen, maintainer of this site, is a part-time researcher with enough spare time for doing useless things and sharing them with the rest of the world. His main photographic subjects are made of plants or stones, and since he's learning Haskell everything seems functional to him.