citiB
citiB

Reputation: 61

How Can I solve this problem in my wordpress site Fatal error: Cannot redeclare true_plugins_activate() (previously declared in

I tried installing wp page builder on my WordPress site and then my site went blanked i tried to delete it from the back end still didn't work and it was displaying this error message.

see the error message displayed in my homepage:

Fatal error: Cannot redeclare true_plugins_activate() (previously declared in /home/nairtzdf/www.mywebsite.ng/wp-includes/functions.php:7175) in /home/nairtzdf/www.mywebsite.ng/wp-includes/functions.php on line 7226

and here is the error message displayed in wp-admin page:

W3 Total Cache Error: some files appear to be missing or out of place. Please re-install plugin or remove /home/nairtzdf/www.mywebsite.ng/wp-content/advanced-cache.php.

Upvotes: 5

Views: 25003

Answers (2)

Ganesh Aware
Ganesh Aware

Reputation: 31

If you see error message 'PHP Fatal error: Cannot redeclare function' or similar error message in your script, it means there is a problem with your script code (it tries to declare the same function multiple times).

This error says that your function is already defined. This could mean:

  1. You have the same function defined in two files

  2. You have the same function defined in two places in the same file

  3. The file in which your function is defined is included two times (so, it seems the function is defined two times)

To help with the third point, a solution would be to use include_once instead of include when including your 'functions.php' file -- so it cannot be included more than once.

Upvotes: 2

beltouche
beltouche

Reputation: 761

It's a pretty obvious error. The function true_plugins_activate() exists twice, once on line 7175 of /home/nairtzdf/www.estatehomes.com.ng/wp-includes/functions.php and a second time at line 7226. Fix it by removing one of them. If they're doing somewhat different things, combine their guts into one.

Upvotes: 6

Related Questions