4

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.

Paulo Boaventura
  • 1,365
  • 1
  • 9
  • 29
citiB
  • 51
  • 1
  • 1
  • 2

2 Answers2

6

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.

beltouche
  • 731
  • 6
  • 15
1

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.

Dexter
  • 7,911
  • 4
  • 41
  • 40
  • Or the same function is declared twice in the same namespace – Martin Apr 18 '20 at 16:25
  • This is the exact answer copied from > https://stackoverflow.com/a/1953870/5413283. Instead of copying, you can link to the original answer. – Dexter Sep 03 '21 at 04:54