Sometimes, you think updating your plugins will be a simple click and forget process. Most of the times, this is the case, other times, problems arise. If you click on the update plugin button, and you get a “Fatal error: Cannot redeclare class” message, you can easily work around this.

I’ll assume you have backed up your db and website already before you clicked on the update button. If not, you should remember to do this every time!

In order to fix this error, go to your favourite MySQL editor, whether it’s using console, phpMyAdmin, or some other database connector program. Enter the following query into your program so you can copy it somewhere just in case you want to have a record somewhere of all the active plugins you had before.

SELECT * FROM `wp_options` WHERE option_name=’active_plugins’;

After you’ve copied/saved the data from the previous query, or if you don’t care about that, you can enter the following query to fix the error and re-activate your plugins at a later time.

UPDATE `wp_options` SET option_value=” WHERE option_name=’active_plugins’;

Voila! It’s fixed. If you set your db prefix to something other than wp_, then remember to replace the wp_ portion of my queries to something else.