Configure W3 Total Cache for Wordpress with Rackspace Cloud Files / CDN


This tutorial has a lot of images and it will show basic steps on how set up the W3 Total Cache plugin to work with Rackspace Cloud Files / CDN.

This article assumes that you have already completed the installation of your WordPress website and database. If you have not completed this, please read the following article: Install and Use WordPress

You can speed up your WordPress blog by using Cloud Files with CDN Technology to display content to users faster and more efficiently. You can distribute common files or content such as css, javascript, images, videos and much more through a CDN, which serves the content from the closest edge server to the end-user.

First you must login as admin on your Wordpress blog and add new plugin:

 

Search for "w3 total cache":

 

It should be the 1st to show, so click install now:

 

Now we must activate:

 

Next step we will enable the CDN function and pick Rackspace Cloud Files, to do so go to General Setting as you see on the image:

Scroll down until you find CDN and mark enable. Also select Rackspace Cloud Files:

 

An error message will appear, as we have not set up the plugin yet:

 

We are going to need the API key and you can easily find on our Cloud Panel. Go to the panel, click on your username and select Account Settings. Now you will find the API as demonstrated below:

 

Now back to the admin page on your Wordpress blog, click on CDN:

 

You will need to inform the account username, API Key, location and container. Location is only US or UK, so no worries here.
The container was somehow a problem some people were having and I was able to re create. If you create the container first and add here, it might give you an error. This will happen if your Cloud Server and Cloud Files are not on the same region, for example ORD and DFW. Even if you have both on DFW for example and your account is set to use ORD as default, you will get an error. It seems like this is some configuration on the plugin.

On my personal account I was able to create the container on the Cloud Panel and everything worked fine, that's because I always use my default region. I tried to use a Cloud File on a different region and I got an error. Here I decided to type the name of the container and click on create container and let the plugin create the container, you will be able to see on the Cloud Panel the region it was created.

Be very careful with this, if your Cloud Server and Cloud Files are not on the same region, you could get charged for the bandwidth between regions. If needed you can check your default region using nova:
Install on Windows: http://www.rackspace.com/knowledge_center/article/installing-python-novaclient-on-windows
I
nstall on Linux and Mac OS: http://www.rackspace.com/knowledge_center/article/installing-python-novaclient-on-linux-and-mac-os

After all this was said, here is how it will look like:

 

Here is a basic configuration, just click on Upload Included Files (or other) to upload all the files:

 

This page will pop up, just click Start:

 

The plugin will start loading all images to the Cloud Files, it will take some time, but you can see the progress:

 

To make all links look nice, let's use a CNAME so all the links will not look huge (this is optional). Go to the Cloud Panel and open your domain on the DNS, create a CNAME record:

 

Now when you create a new post and upload some image, it will be sent to the Cloud Files automatically and you can confirm checking the page source of your page, here is an example:

Also if you have re-sized any images using wordpress's built in image editor, the w3 total cache plugin may fail to upload any image that was modified using this process.
In order to solve this problem, you can upload your 'uploads' file manually. Just upload it directly to your container so that it replaces your current uploads file.

 



Was this content helpful?




© 2011-2013 Rackspace US, Inc.

Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License


See license specifics and DISCLAIMER