fbpx

WordPress Fatal Error

by | Apr 13, 2017 | WordPress tips | 0 comments

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.

Written By Carl

Written by Carl Wuensche, a dedicated problem solver with a passion for helping businesses thrive through innovative solutions and strategic development.

Related Posts

WordPress Core Contributor

I’m officially unofficially a WordPress core contributor! Earlier this month I decided that I wanted to contribute to WordPress. The first step I took was joining the WordPress slack channel and I mostly silently (with the odd sentence here and there) observed various...

read more

Single Responsibility Principle

There are many ways of architecting software. There are many ways of organising code. When an architect (in this case Software engineer or programmer) decides to create a plugin, he/she must decide how they’re going to organise the logic of the code. In the Single...

read more

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *