There was a problem loading the comments.

How do I enable and view Wordpress error messages? (Using debug mode) Cpanel

Support Portal  »  Knowledgebase  »  Viewing Article

  Print
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.

76c302dca97f9ebe69fd8872147729358e91c28360036cf1a13d32398106ab48ef10507b43e62f98?t=a71635f5d3367f2dcdbc0b147744c794

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.

af0f9f1e62da4eef21223499e95b9dea85d73734d916e335f16f6ec87bec8fcde922c2c44b0a39ed?t=290499918352ae2b3c795dc6dc5a30da

3. When you find the file, right-click on it and select Edit.

8a678d9fdd7ab6ce020c69be49e8430b6e33bcf62f6299ff6e8c3afe18c789dd1dee0cf1b4a8454e?t=8e49e9529ed1f2f05ca004823154d164

4.  You will be greeted with a menu — press “Edit”.

c5e2ae7c3a6635d01e76ff79ab4194753ff3fce514f9e4a47ecf8567c3abdbc575e1df5c592567f5?t=ed6131e10e28d729f810f9936cea4323

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);

51cbc14244c192b5d73392eb96ba2965234f29c39e52b668ce87828a67e19465d2c08dd0fb5acdd6?t=5ba19f970582b6eb3678c795b43df41f
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.

Share via
Did you find this article useful?  

Related Articles


Comments

Add Comment

Replying to  

CAPTCHA
© Getspace - EN