I get quite a few questions that are asked by readers to me with regards to WordPress and I try and help most of them all the time. It feels good to know and share so here is one question from one of my plugin users which I would like to share with all of you.
I upgraded to WordPress 2.3 using your WPAU plugin and am getting errors like this
WordPress database error: [Table wp_categories doesn't exist]
SELECT cat_name FROM wp_categories ORDER BY cat_name ASC
How do I resolve this?
First of all let me make it clear that this error is not related to the WordPress Automatic Upgrade plugin. This error is related to certain changes that have been made in the WordPress 2.3 release. Let’s have a look at the changes below.
No More Categories
WordPress 2.3 no longer uses categories but has shifted to the more popular Tags which allows users to tag their content verses the usual categorization. For this as a flashback you can have a look at what Gmail did to folders with labels.
Gmail does not have any folders as such but they have labels which allow you to tag mails. Essentially it works like folders itself but physically your mail does not reside in any folder like the other Email providers have for example Yahoo and Windows Live Hotmail.
The problem with categories was that each post was tied down to a particular category (or more than one categories) itself and like folders it could not be used or accessed outside that particular folder. With tags no post is tied down to a category in fact its vice versa a tag is tied to a post. You can easily move a post around without having to worry about the problems you would face to access them from multiple folders (oops categories).
To make it more simple you can post any where and access it from anywhere there is no restrictions on accessing it from a particular category (think folders in email).
Well in the question my reader asked me as to why he was getting the error. In the above description I said that WordPress 2.3 has done away with categories so there is quite a chance that many of the older plugins still use the categories table to query the database. The above error is a MySQL exception that is raised when a table does not exist in the database.
Now like I said that WordPress 2.3 has done away with the categories they also delete the wp_categories table altogether when you upgrade to WordPress 2.3 so any plugin making use of that table will throw and MySQL exception resulting in the error as above.
If you are seeing the errors that related to categories follow the steps below and you should be able to do away with the errors.
- WordPress 2.3 now shows you plugin updates so go to plugin page and update all the plugins that are available for updates.
- If updating all the plugins does not solve your error, then disable one plugin at a time and check if the error still exists.
- If error still exists, enable the plugin and disable the next one, continue till the error disappears, when you find the faulty plugin either try to upgrade that plugin or disable it till it gets an update.
Alternatively if you are an advanced user and do not want to disable plugins one by one ( imagine having 50 plugins :-) ) then you can download all the plugins to your local machine and do a in file search to find the term wp_categories, if you are a Linux user use grep for the same term in the plugins folder.
In whichever files you find the terms disable those plugins one by one and see if those errors go away.
That’s it whoever will upgrade to WP2.3 may face this problem and this is a simple solution to get rid of it, you can always contact me for more WordPress related questions and I would be ready to help you out in solving your problems.
Do let me know your queries or views on this.