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.
Facebook0TwitterReddit0StumbleUpon0 Do you need to increase the memory limit in WordPress? Getting an error about memory Exhausted? The memory limit is one of the most common WordPress errors as the default limit of memory in WordPress is only set to 64mb! But there’s good news! The Memory Exhausted error is...
Facebook0TwitterReddit0StumbleUpon0 A vulnerability has been discovered in the “All In One WordPress Migration” WordPress plugin. All versions earlier than, and including 6.97 contain a vulnerability which allows Cross-Site Scripting (XSS).With over 2 million active installations, this vulnerability has the potential to be high impact, however, this is lessened by the...
Facebook0TwitterReddit0StumbleUpon0HostPresto will be launching a European point of presence in the coming weeks, specifically in Amsterdam. For customers needing their data located within the EU still please contact support to request migration to this location with ticket subject ‘EU Migration’. We will ensure this is actioned well before the Brexit...