WordPress website shows 500 error: PHP Fatal error: Cannot redeclare add_shortcode()

Created:

2016-11-16 13:23:25 UTC

Modified:

2017-08-08 13:40:03 UTC

0

Was this article helpful?


Have more questions?

Submit a request

WordPress website shows 500 error: PHP Fatal error: Cannot redeclare add_shortcode()

Applicable to:

  • Plesk 12.5 for Linux

Symptoms

Website based on WordPress shows 500 error.

The following error can be found in websites error_log /var/log/system/example.com/logs/error_log :

PHP Fatal error:  Cannot redeclare add_shortcode() (previously declared in /var/www/vhosts/example.com/wp-includes/shortcodes.php:89) in /var/www/vhosts/example.com/shortcodes.php on line 106

Cause

Incompatible shortcodes.php file with updated WordPress.

Resolution

Rename the file:

# mv /var/www/vhosts/example.com/shortcodes.php /var/www/vhosts/example.com/shortcodes.php_old
Have more questions? Submit a request
Please sign in to leave a comment.