MySQL Optimization and WP-Cache Installation Problems

I have just spent half-a-night optimizing settings for a wordpress site that I maintain. The optimization work is much needed since the site popularity is rapidly increasing and I’m trying to avoid future problems that might be caused by unhandled server stress. Though there is still much to tweak with regards to the settings of the server, I initially focused on MySQL Query Cache tweaks and installation of WP-Cache.

MySQL Query Cache
Tweaking MySQL cache is fairly easy to do and the result was a significant performance gain of your database. To do this optimization tweak you have to access your server via shell and edit the file /etc/my.cnf. Use the command pico my.cnf to start editing the file. Insert the following lines:

query_cache_type=1
query_cache_limit=1M
query_cache_size=10M
(the default was 6M)

For the cache size you have to find the right balance that depends on your Server hardware specifications and the scripts that you are running. I initially changed this to 10M from 6M. I’ll try to observe and analyze the performance gain for a few days.

WP-Cache Installation and Problems Resolved
Configuring wp-cache to run properly gave me a lot of headache and new knowledge. WP-Cache is an indespensible Wordpress plugin that’s why I never gave up on installing it.

Problem 1: Installation and Symbolic Link
After carefully following the installation steps, I am having a broken symbolic link problem by executing ln -s wp-content/plugins/wp-cache/wp-cache-phase1.php wp-content/advanced-cache.php. The error persist even when I tried the automated symbolic link creator from village-idiot.org (which I think is a very good tool for people who doesn’t know to create a symbolic link or simply does not have shell access to where their blog is hosted).

Resolution: I included the full path of the files in the symbolic link command. the resulting command was:
ln -s /home/myaccount/public_html/wp-content/plugins/wp-cache/wp-cache-phase1.php /home/myaccount/public_html/wp-content/advanced-cache.php

Problem 2: WP-Cache is not serving cached files
So I finally got to install WP-Cache but I noticed that the counter for cached pages is not changing! I tried to clear the cache several times deactivate/reactivate the plugin but nothing is happening. I browsed the “cache” folder and I have confirmed that cache files are being generated but the files are not being served by WP-Cache.

Resolution: I compared the plugins that I’m running to another wordpress installation wherein I have successfully activated the WP-Cache plugin and they differ by several plugins. Thus I started a trial and error process by deactivating the plugins one by one. After several retries… Voila! I found it! It seems that the version 1.2.8.5 of All-in-one SEO is conflicting with WP-Cache version 2.1.2. Thus I deactivated the plugin and used another plugin SEO_wordpress, I really love the functionality of All-In-One SEO but I guess I’ll have to wait until the next compatible update.

There are other tweaks that I should work on soon and for those looking for some good tips try this link.

  • Share/Bookmark

Add a Comment Trackback

2 Comments

  1. hi uberdose, thanks for dropping by. Actually I am not yet finished with WP’s configuration it may have caused the weird ping :D .

    I wonder if it could be a problem with the All-In_SEO, WP-Cache and other plugins run simultaneously. Well I’ll give trial and error another shot. Or better yet I’ll install All in One SEO to the other wordpress installation running WP-cache. Thanks again

  2. Hi, just tested wp-cache 2.1.2 with All in One SEO 1.2.8.5 and it worked fine. The first hit gets created dynamically, one subsequent hits it says “Cached page served by WP-Cache” and I see it listed under cached files, and of course the total number of cached pages increases. Strange. Btw., you just gave me a ping with your homepage (instead of your post), I think there is something mis-configured. When I tried your contact page it gave me a 404.

Add a Comment

Anti-Spam Protection by WP-SpamFree

WordPress SEO fine-tune by Meta SEO Pack from Poradnik Webmastera