CityHost.UA
Help and support

Enabling debug mode for WordPress

Debug is a special service mode of WordPress, when activated, instead of basic non-informative error messages, WordPress will display them as a completely structured and understandable set of data.

Take the following error for example:

In general, it is clear from the error that WordPress does not load due to some error related to the database, so let's turn on the debug mode and see how the error text changes:

Now, from the text of the error, we can conclude that WordPress does not have a connection with the database, because the configuration file contains incorrect data for connecting to the database - login or password.

How to enable debug mode

1. Open the configuration file wp-config.php located in the root folder of the site using any editor, through [file manager] or [FTP connection]

2. Near the end of the file, find the following line:

 define( 'WP_DEBUG', false );

3. To enable debug mode, you need to change the parameter false to true . Enabled debug mode looks like this:

 define( 'WP_DEBUG', true );

4. After enabling debug mode, save the changes to the file and reload the browser page with the error to apply the changes.

5. After finishing the work, we strongly recommend turning off the debug mode by changing the parameter to false , because the debug mode can display sensitive information.