A guide to deploying a cache system to WordPress on AppFog

17 Feb

AppFog is a cloud platform, supporting PHP, Ruby, Java, and so on. It is a good and free solution for small website, like personal blogs. My blog (codesays.com) is currently hosted on AppFog. But AppFog does not support persistent file system. With possibly other unknown restrictions, I failed to deploy the well-known WordPress cache plugins, such as W3 Total Cache and WP Super Cache. And I did not fix it via Google. Finally, I have to choose an alternative (MemCachier + Batcache), with less efficiency.

Firstly, enable MemCachier for your WordPress site at AppFog. In the dashboard of AppFog for your WordPress, you could find the MemCachier under the “Add-ons” section. One click on “install” button is enough, no need to configure anything.

Secondly, install the WordPress plugin MemCachier. Copy all the contents to the directory “wp-contentplugins”, and move the file “plugins/memcachier/object-cache.php” to “wp-content/object-cache.php”.

Thirdly, install the WordPress plugin Batcache. Copy all the contents to the directory “wp-contentplugins”, and copy the file “wp-contentplugins batcacheadvanced-cache.php” to “wp-contentadvanced-cache.php”. Add this line “define(‘WP_CACHE’, true);” to the top of wp-config.php to activate Batcache. I also active Batcache in the plugin center of WordPress dashboard.

Finally, the file system should look like:

Test whether it’s working: logout your WordPress Access a single webpage of your WordPress (like your homepage) several times in short time. Then view the source code of that webpage. If you see something like:

It is working. Otherwise, you should double check the process, and find out the problem

Troubleshooting: if it is not working, you would better to check the working status of Memcachier firstly. In the “Add-ons” section of your dashboard on AppFog, select the “Installed” sub-section, and click the MemCachier’s “manage” button. In the control panel, you are able to see some summary information about your MemCachier. The “Items” field should be positive number. And every time you reload the testing webpage, the Hit Rate (since last data point) should be changed (the number of hits),like:

If the summary shows normally, the MemCachier model is working well, and the problem is most likely about the Batcache plugin. Otherwise, you should check the MemCachier service and MemCachier plugin firstly.

2 thoughts on “A guide to deploying a cache system to WordPress on AppFog

  1. Hey there, You have done an excellent job. I will definitely digg it
    and personally suggest to my friends. I am sure they will be benefited
    from this website.

Leave a Reply

Your email address will not be published. Required fields are marked *