-3

WordPress is throwing a There has been a critical error on this website.

There are no plugins and the theme works fine on my local machine.

I am using cpanel and there are no server log files.

Is there a way to display the error.

  • Ask the hosting provider where the log files are located, there probably _are_ some, somewhere. Otherwise, [How can I get useful error messages in PHP?](https://stackoverflow.com/questions/845021/how-can-i-get-useful-error-messages-in-php) might be helpful to you. – ADyson Aug 10 '23 at 20:24

1 Answers1

1

You could turn on WP Debug to allow WordPress show you what's breaking the website.

Locate the wp-config. php for your WordPress file, then click on the three-dotted options, then Edit. To Enable WP_Debug, change the last line to: define( 'WP_DEBUG', true ). To Disable WP_Debug, change the last line to: define( 'WP_DEBUG', false ).

Hope this helps!

Sommie
  • 11
  • 2
  • WP Debug is on, but unfortunately it does not show critical errors. These can only be found in the server logs. – francis astin Aug 12 '23 at 03:43
  • Hmmm... Other things you could try: 1. Add these in wp-config.php to force errors to show: `// Enable Debug logging to the /wp-content/debug.log file` `define( 'WP_DEBUG_LOG', true );` // Disable display of errors and warnings` `define( 'WP_DEBUG_DISPLAY', false );` `@ini_set( 'display_errors', 0 );` 2. Check your cPanel or hosting server for PHP settings to allow for logging. 3. Try this WordPress logging plugin: [wordpress.org/plugins/wp-debugging] – Sommie Aug 12 '23 at 08:21
  • yes I tried but it not work. – francis astin Aug 15 '23 at 07:03