Articles on: Website Creation
This article is also available in:

How to enable Wordpress debugging mode via cPanel?

If you want to better understand some errors appearing on your site or its pages, the debugging mode of WordPress can help you. It shows you information about all the errors on your website right now.

Debugging mode can be enabled in two ways. You can simply check the option in the WordPress Manager tool, or edit the wp-config.php file using the File Manager cPanel.

Here are the steps to enable debugging mode via Wordpress Manager



Log in to your cPanel account (via your customer account or https://www.bmoname.com:2083).

In the Software section, click the Wordpress Manager icon.



Then click the update button next to the domain you want to enable debugging.



In the domain window, select Enabled under the Debug Mode option.



The mode will then be instantly activated on your WordPress site.

Here are the steps to enable Wordpress debugging via cPanel File Manager



Log in to your cPanel account (via your customer account or https://www.bmoname.com:2083).

In the Files section of your control panel, click the File Manager icon.



Then open the root directory (public_html) of your website.



Find and open the Wordpress wp-config.php.



Look for the line 'WP_DEBUG' in the file. You should find it in the following line of code:

define( 'WP_DEBUG', false );

In this case, you must replace the word false with true. The line should read as follows:

define( 'WP_DEBUG', true );

If the file does not contain any lines related to debug mode, you must insert one. It must be added before the next line:

/*That’s all, stop editing! Happy publishing. */

WP_DEBUG_LOG error log



It is possible to record an error history on your website. To do this, simply activate the WP_DEBUG_LOG. To enable it, simply add the following line to the wp-config.php file under the WP_DEBUG line:

define('WP_DEBUG_LOG', true);

That’s it! Errors will now be saved in the debug.log file. This file is located in the wp-content folder on your website.

WP_DEBUG_DISPLAY



WP_DEBUG allows debugging mode on your website to better track all possible errors. However, you may not want to post them on the website. If you want to hide errors so that they are only available from the log, simply add this line when you enable WP_DEBUG:

define('WP_DEBUG_DISPLAY', false);

That’s it! Now you know how to enable and disable debugging mode for WordPress

Updated on: 20/04/2023

Was this article helpful?

Share your feedback

Cancel

Thank you!