How do I enable and view Wordpress error messages? (Using debug mode)
If your site is down or not working properly, you can find out the cause of the problem by enabling Wordpress error messages.
1. Log in to your cPanel account.
2. In the Files section, select
File Manager and locate the
wp-config.php file. It can usually be found in the
home/public_html directory, but the directory may vary depending on where the site files are stored.
3. When you find the file, right-click on it and select Edit.
4. You will be greeted with a menu — press
“Edit”.
5. To enable error viewing in WordPress, locate the following line in your
wp-config.php file:
define('WP_DEBUG', false); Replace
false with
true -> define('WP_DEBUG', true);
If you want to
log errors and
hide them from displaying on the website, you should also add these lines:
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
Your final configuration should look like this:
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);

You can also leave
define('WP_DEBUG_DISPLAY', true); - if you set it to
true, the errors will be displayed live on your website.
5. Click on the top right "Save changes".
6. You can view the error messages in the wp-content directory. Select the debug.log file and click ‘‘View‘‘.
Note: For security reasons, be sure to delete the inserted lines when you are finished working with the error log.