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

14,468

Solution 1

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.

Solution 2

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.

Share:
14,468
Admin
Author by

Admin

Updated on June 04, 2022

Comments

  • Admin
    Admin almost 2 years

    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.