How To Enable Debugging Mode In WordPress To View Errors In WP-Config

Posted on 02/05/2018 by Neil Skoglund

Are you experiencing unknown errors or bugs with your WordPress site? If the answer is yes then now may be the time to set up WordPress error logs in the wp-config file. The wp-config file controls not only your settings but is also a powerful debugging tool. This tool can help you find any errors plaguing your site by identifying the offending script or plugin that might be causing the issue and is invaluable useful to any WordPress developer as a result. In this article, we will explore how to create an error log and then how to review it afterwards.

 

Setting Up A WordPress Error Log

First of all, you will need to edit your wp-config.php file by accessing the File Manager in your cPanel dashboard. The wp-config.php file can be found in the root directory of your website. Once located, open the file in any text editor. Find the line that reads "That’s all, stop editing! Happy blogging". 

It is just before this line that you will need to add the following code:

define( 'WP_DEBUG', true );

By adding this code, you are turning on the WordPress debug mode. In this mode, you will be presented with errors and bugs within your WordPress admin area. If you would like your errors to be logged then you will need to add the following line of code just below the line you have added:

define( 'WP_DEBUG_LOG', true );

Once you have added your code, save your changes and upload the text back into your wp-config.php file and back to your website.

 

How To Review Your WordPress Error Logs

Reviewing your error logs once they have been created is really simple. All you need to do is access the file manager in cPanel once again and head to the /wp-content/ folder. Once inside you will find a file called debug.log.

This file contains all WordPress errors, bugs, warnings and notices that have occurred on your site and can be viewed or downloaded.

 

If you enjoyed this article, visit our Facebook and follow us on Twitter for more WordPress related content from our Blog

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

© Copyright 2019 FreshSites Limited. Registered in England and Wales no. 7812509
Website Design by Pyxal
How To Enable Debugging Mode In WordPress To View Errors In WP-Config | FreshSites How To Enable Debugging Mode In WordPress To View Errors In WP-Config | FreshSites How To Enable Debugging Mode In WordPress To View Errors In WP-Config | FreshSites How To Enable Debugging Mode In WordPress To View Errors In WP-Config | FreshSites How To Enable Debugging Mode In WordPress To View Errors In WP-Config | FreshSites How To Enable Debugging Mode In WordPress To View Errors In WP-Config | FreshSites How To Enable Debugging Mode In WordPress To View Errors In WP-Config | FreshSites How To Enable Debugging Mode In WordPress To View Errors In WP-Config | FreshSites How To Enable Debugging Mode In WordPress To View Errors In WP-Config | FreshSites How To Enable Debugging Mode In WordPress To View Errors In WP-Config | FreshSites How To Enable Debugging Mode In WordPress To View Errors In WP-Config | FreshSites How To Enable Debugging Mode In WordPress To View Errors In WP-Config | FreshSites How To Enable Debugging Mode In WordPress To View Errors In WP-Config | FreshSites How To Enable Debugging Mode In WordPress To View Errors In WP-Config | FreshSites