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:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | +---wp-content |---advanced-cache.php |---object-cache.php | +---plugins |---hello.php |---index.php | +---batcache |-------advanced-cache.php |-------batcache.php |-------readme.txt | +---memcachier |-------MemcacheSASL.php -------readme.txt |
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:
1 2 3 4 5 6 | <!-- generated 10 seconds ago generated in 0.973 seconds served from batcache in 0.028 seconds expires in 1790 seconds --> |
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:
1 2 3 4 5 6 7 8 9 10 11 | Limit: 25 MB Collection Time: 2/17/2014 4:39:08 PM Live Connections: 1 Total Connections: 617 Memory: 4MB Items: 114 Evictions: 0 New Evictions (since last data point) Hit Rate (since last data point): 94% (17265 hits, 1111 misses) Set Cmds: 1276 Flush Cmds: 0 |
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.
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.
Thanks! It is my great pleasure to see my blog be helpful!