Is Your WordPress Site Slow? Problem May Lie With MySQL, Here is How to Fix it

When I initially started out with using VPS, I had tons of problems with Apache but quickly switched to Nginx which has proven to be more than a boon, because it meant that I could do more with less. However, having used WordPress I have come to know that the system is not necessarily scalable in itself when it comes to self-hosted websites.

In the past, I have written about the architecture that powers Techie Buzz and several guides like Scaling WordPress Using MySQL Replication and HyperDB and setting up memcache with WordPress among others.

However, over time, I have learned quite a few things about managing WordPress for a website with heavy traffic and also sorted out several issues which had become a bottleneck for us.

One of the biggest issues I have faced over time with WordPress is the database. More often than not WordPress websites work slower than expected because of the MySQL database and heavy load on it. However, many a times a simple change in MySQL could speed up the website considerably.

The default engine (not forced by WordPress) while installing WordPress is MyISAM for most hosting companies. The problem with MyISAM is that it locks the entire table when it inserts or updates rows. This in turn locks other queries which are accessing the same table slowing down the entire website in the process.

For example, when you are updating a post, you will be updating the wp_posts table and during this update all other select, insert, update and delete queries will be queued till the insert/update query completes. This in itself should not be a big problem when you have a site with less traffic. However, it does make a big impact when you have a large website with multiple queries being run every minute or so.

So what is the solution for this? Well, the best I could implement was switching the tables with the frequent queries to InnoDB. InnoDB is a storage engine in MySQL which might become the default one in future MySQL versions. With an InnoDB table the queries don’t lock the entire table, but just lock a single row it is inserting/updating. This leaves the other queries to complete without having to wait in a queue.

Making this small change has definitely made life easier for us. Along with our other caching mechanisms we now have almost 0 load on our database, which is definitely a great thing.

While this has definitely been helpful for us, I would suggest that you spend some time reading up the differences between MyISAM and InnoDB and their advantages and disadvantages before you make the move. Once you are convinced that you are ready to migrate, head over to my earlier guide on how to safely and easily migrate tables from MyISAM to InnoDB Engine.

Better Search for WordPress Admin Backend Posts

I have always been in awe of WordPress and have come to love it since I started using it few years back. However, one of the biggest problems I have had with WordPress is their search; both in the frontend as well as in the backend.


While you can always improve your frontend search and add relevancy to it by either using Google Custom Search or a plugin like Better Search, there are not many options for the backend, or at-least my searches led me to few or none.

My dislike for the WordPress backend search grew more when I wanted to search for some articles which had a particular title but could never see them in the results for my queries. However, I did find a really good alternative after spending a decent amount of time searching for it on Google.

WordPress Admin Advanced Search

The extension called Search Regex is quite a life saver and is definitely better than the default WordPress backend search for posts. The plugin allows you to search only titles, within posts and comments, post meta values, post excerpts, post URLs and more.

One of the first things I noticed with the plugin was that it works really well and does it’s job. However, as always humans are usually never satisfied with what they get and so was I. I would have loved the plugin to integrate and replace the default backend search in WordPress and would like to have it on the WordPress Edit posts page itself. The reason for this is that, the way the plugin currently works, you can only edit a single post at a time.

On the other hand, WordPress backend search allows users to edit multiple posts at once. Other than this, the plugin also allows you to Search and Replace text within your posts. This can come in very handy if you want to update a link or text in a post. Best of all, the plugin supports regex (Regular Expression). However, I would avoid using that because it could really create problems if something goes wrong or you use a bad regex, in-fact the plugin itself advices you about it.

Rest assured, Search Regex is an excellent plugin to address the annoyance called "WordPress Search". Go ahead and download it from here, you won’t be disappointed at all.

Fix UNINSTALL_WPSUPERCACHE Must Be Set To A Non-blank Value

In my post about Techie Buzz’s Architecture, I had stated that I used a WordPress plugin for caching   called W3 Total Cache. I love that plugin and have been using it for over a year now. However, prior to that I used another popular caching plugin called WP Super Cache which did the job well too.

However, I removed the plugin for some reasons and started using W3 Total Cache instead. Today, while performing a regular maintenance, I decided to remove plugins that I am not using anymore. One of the plugins I was removing was WP Super Cache. However, while uninstalling the plugin I was getting an error:

UNINSTALL_WPSUPERCACHE must be set to a non-blank value in uninstall.php

The problem was that it was looking for a non-empty value for a field. Now, I could have simply deleted the plugin folder using FTP, however, it would mean that there would be unwanted settings and files lying around on the server. However, I   was able to fix the error and uninstall the plugin.

If you are looking to fix this issue, here are the steps you need to follow:

Step 1: Use FTP or WordPress inbuilt plugin editor to edit the wp-super-cache/uninstall.php file.

Fix WP Super Cache Uninstall Problem

Step 2: Find the text


and replace it with


Save the file and try to uninstall the plugin again. It should work this time. Additionally, make sure to follow the other uninstallation notes for WP Super Cache too.

Post Meta Values Automatically Deleted in WordPress?

I use a lot of custom meta fields in WordPress posts for several reasons. They allow me to manipulate multiple posts without having to write code for a specific conditions.

WordPress Logo

However, of late, I came across a very annoying problem where custom meta fields were automatically deleted for some reason that was unknown to me. It was annoying me to no end because I had to manually go in and add those custom fields for the posts over and over again.

I didn’t have much time to figure out what is wrong and left in some debug code which would allow me to later on see how things were disappearing. Today, I checked those logs and found out the problem with the disappearing custom meta fields.

The problem was that, WordPress processes hooks for the edit_post, publish_post and save_post not just for editing the posts but also various other functions like while approving comments too, but the code in question always tried to find the $_POST variables and delete them if they didn’t exist. This was the mystery behind those disappearing post custom meta fields.

Solution For The Problem?

If you are not a developer, you are better off disabling those plugins and adding those fields manually using WordPress write interface. However, if you use a plugin you might lose additional functionality it provides. You could always send an email to the plugin developer asking them to make the appropriate changes.

If you are a developer, Mark Jaquith has a post which talks about avoiding such problems. You can read the post here and modify your plugin or theme to fix this issue.

Joomla To WordPress Migration

Joomla is a very popular CMS platform, however, it is too advanced if you are using it only for blogging purposes. I remember using Joomla initially before shifting to WordPress and back then it was a bit of a painful process.

Joomla to WordPress Migration

However, if you are a Joomla user and are looking to move to WordPress, you can easily do it using using a Import Wizard or Migration wizard which are available as free downloads. You can download the import wizard for Joomla to WordPress from the links given below.

If you have trouble migrating, feel free to leave your comments. Since I have already migrated once from Joomla to WordPress I might be able to answer your questions.

Blank Page in WordPress, How To Fix It and Where To Look

If you are a WordPress user there might be a chance that you might have come across a blank screen on your website or blog. For those who are not in the know a blank screen appears on a website or blog running WordPress whenever there is an Fatal PHP Error with a plugin or theme.

Blank WordPress Error Message

Several users might see blank screen in WordPress after they have upgraded to a new version of WordPress, installed a new plugin or changed their themes. Many users are perplexed when they see a blank screen and do not know what to do. However, a blank screen only appears when there is a fatal error while running a PHP script.

The reason users see a blank screen and not error messages is because WordPress hides all PHP related error messages. So the first thing to do after you see a blank screen on your website or blog is to turn on error reporting on WordPress.

To turn on error reporting, login to your FTP server and edit wp-config.php and add this line to it.

define('WP_DEBUG', true);

Once you have added this line to the wp-config.php file, refresh your website and you will see the error messages that are causing a problem with WordPress loading your website.


This will make it easier for to figure our what is wrong with your site. Once you know where the error is, you can delete or remove the offending plugins or have someone look at the error messages to rectify the problem that is causing your site to not load.

Make sure to delete the WP_DEBUG line from the config file after you have fixed the error, or else you might also start seeing PHP Notices and Warnings.

WordPress 2.9.1 Coming Soon, Adds Fix for Missed Schedules Post and Cron Jobs

seems to have a bug which is annoying the hell out of people. The problem is occurring with scheduled posts and missed cron jobs. Some users reported that scheduled posts were either missed or posted in the past.

The main reason why this is happen is because of some code introduced at the last minute, which in turn has apparently broken the WordPress cron. This is only affecting a minor percentage of users.

If you are experiencing a problem with scheduled posts or other Cron jobs not running on your blog, you can find the patched files on this page, along with the description of errors. WordPress might release 2.9.1 in a day or two to fix this issue. In the meantime you can use the files from the page above to fix the missed schedule posts and cron jobs issue with WordPress 2.9.

How To Disable oEmbed Support in WordPress 2.9

A few hours back we told you about a new feature in called oEmbed, which allows you to embed videos, images and polls into posts by just adding the URL to the post. However, not many of you might want this feature and want to disable this.


By default oEmbed is enabled in WordPress 2.9, to disable it visit the Settings > Mediapage and uncheck the boxes in the Embeds settings. To enable oEmbed, just visit the same setting page and check the boxes under Embeds settings.

oEmbed is a really useful feature in WordPress 2.9, however traditional WordPress installations have disallowed users from embedding videos for authors and contributors. Disabling oEmbed will help you restrict authors and contributors from adding videos to their posts.

How To Embed Videos, Images and Polls in WordPress 2.9 Using URL

WordPress 2.9 supports oEmbed, a new feature which fetches information from video and image providers with just the help of the URL. Starting with , you do not need to add the embed codes into your post and can just include the video using the URL.

Here is a step by step tutorial on how you can embed videos, images and polls in WordPress using URLs, rather than having to copy and paste the full embed codes, this will ensure that users who do not have support for unfiltered HTML will be able to insert videos into WordPress posts.

Insert Videos in WordPress using URL

Step 1: Create a new post in WordPress.

Step 2: Go to or to any other supported oEmbed providers in WordPress 2.9 and copy the URL of the video or image you want to include in your post.


Step 3: Paste the URL of the video directly into the post, make sure it is not hyperlinked. Save or publish the post as usual.


You will only see a URL inserted into the post edit area, but that is fine as all the magic happens under the hood, so after you have inserted the video, visit the post and the video will automatically be embedded into WordPress.


If you view the source of the page, you will see that the URL has been converted into an actual embed code using oEmbed technology. Super cool right :-). You can also insert images and polls using the same method.

The supported providers for oEmbed inserts include, YouTube, Vimeo, DailyMotion,, Flickr, Viddler, Hulu, Qik, Revision3, Scribd, Photobucket, PollDaddy, Google Video and

How To Edit Images in WordPress 2.9

2.9 includes a really good basic image editor which can come in very handy. The image editor allows you to crop images, flip images and rotate them with ease.


To edit images in WordPress, click on the Edit Imagebutton when the image is uploaded. Once you do that a new Image editor will be displayed.


To select an area to crop, just click your mouse on the image and drag it as required, click on the scissor image to crop. You can also rotate and flip the image using the available buttons. Another interesting and useful function is the ability to undo or redo your changes.

The image editor allows you to apply the change to all the image sizes or just the image thumbnail.