Symptoms
-
WordPress website displays the following error in a browser:
There has been a critical error on this website.
Learn more about debugging in WordPress. -
In Plesk > Domains > example.com > Logs the error message like the following can be found:
AH01071: Got error 'PHP message: PHP Parse error: syntax error, unexpected token "", expecting end of file in /var/www/vhosts/example.com/wp-content/themes/eleven40/functions.php on line 194'
AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to undefined function create_function() in /var/www/vhosts/example.com/wp-content/plugins/arscode-ninja-widget/arscode-ninja-widget.php:140nStack trace:n#0 /var/www/vhosts/example.com/wp-settings.php(388): include_once()n#1 /var/www/vhosts/example.com/wp-config.php(80): require_once('...')n#2 /var/www/vhosts/example.com/wp-load.php(37): require_once('...')n#3 /var/www/vhosts/example.com/wp-blog-header.php(13): require_once('...')n#4 /var/www/vhosts/example.com/index.php(17): require('...')n#5 {main}n thrown in /var/www/vhosts/example.com/wp-content/plugins/arscode-ninja-widget/arscode-ninja-widget.php on line 140'
AH01071: Got error 'PHP message: PHP Warning: Constant WP_DEBUG already defined in /var/www/vhosts/example.com/public_html/wp-config.php on line 80PHP message: PHP Fatal error: Uncaught Error: Attempt to assign property "plugins" on bool in /var/www/vhosts/example.com/public_html/wp-content/plugins/simply-gallery-block/freemius/start.php:74n...
PHP message: PHP Warning: Undefined variable $madara_ajax_search in /var/www/vhosts/example.com/httpdocs/wp-content/themes/madara/madara-core/manga-search.php on line 48
-
PHP version 8.0 is selected in Domains > example.com > PHP Settings.
Cause
Theme/plugin from the error message is incompatible with PHP 8.
Resolution
Apply one of possible solutions:
Change PHP to a lower version
- Log into Plesk.
- Go to Domains > example.com > PHP Settings.
- Switch PHP handler to a version lower than 8.0.
Disable incompatible plugin/theme
- Log into Plesk.
- Go to WordPress > example.com.
- Disable the incompatible plugin and/or switch to another theme that is compatible with PHP 8.0.