Stardust

WordPress: There has been a critical error on your website.

This error can pop up due to several causes. We need to check the logs for detailed information about the possible issues. Some locations are:

  • Access logs:

/etc/apache2/logs/domlogs/user

  • Error logs:

/var/log/apache2/error_log 

  • .htaccess logs:

/usr/local/apache/logs/error_log

For example: PHP Fatal error:  Allowed memory size of 41943040 bytes exhausted (tried to allocate 32768 bytes) in /home/some_path.php on line 330

 

Change PHP memory limit from 32M to 128M 

Another case: PHP Fatal error: Call to undefined function is_favicon() in // PHP Fatal error: Cannot redeclare wp_get_user_request_data()

Check PHP version as it might be incompatible code after a plugin or WP upgrade. After that upgrade, you might receive some errors like this:
PHP Deprecated:  Function create_function() is deprecated in /home/user/public_html/wp-content/plugins/random_plugin.php on line 250

This means that you will need to disable the problematic plugin and see if there is an upgrade available. I would also recommend to upgrade WP. 

wp plugin deactivate plugin_name

If WP-CLI is not installed, check this link.

That’s all folks, see you  later!

1 thought on “WordPress: There has been a critical error on your website.

Leave a Reply

Your email address will not be published. Required fields are marked *