Diagnosing WordPress issues, especially for non technical individuals can be daunting. This guide shows you a quick way to use the error log to give you feedback on what’s wrong with your site.
Retrieving error log entries allows you to either fix the problem yourself or have someone knowledgeable in WordPress internals handle it.
Steps to capture the error log
1. Open the File Manager in your web host’s management panel.
Log into your hosting provider account and bring up your CPanel or equivalent interface. Open the File Manager.
2. Go to the document directory of your website installation.
This will most likely be in the public_html directory or a subdirectory of public_html depending on if you are hosting more than one domain with this account.
3. Make a backup of wp-config.php.
Make a backup of wp-config.php to ensure you can restore the system after you’re done debugging.
Note: When you make a backup of the file using the CPanel File Manager, a dialog will ask you where you want to copy the file to. Since you’re just copying a backup to the same directory, type in a new filename here as shown below.
4. Open wp-config.php and insert or edit lines that control logging.
The following constant definitions need to be either added or edited in your wp-config.php file:
define('WP_DEBUG', true); define('WP_DEBUG_LOG', true);
Most WordPress installations already have an entry for WP_DEBUG set to false so you’ll need to change this value to true. It’s not that common to have WP_DEBUG_LOG already set in the wp-config so most likely you’ll have to add that line.
This page has a detailed explanation of what the debugging directives do.
5. Repeat the failed WordPress operation.
You may have observed the problems on a particular screen on the admin page, page on your site or are experiencing something as catastrophic as your site not coming up at all. Go into WordPress and simply repeat the operation or refresh the page that isn’t working properly.
6. Go to the WordPress content folder and open debug.log.
Go to the WordPress content folder. This is usually called wp-content, unless you renamed it with a security plugin.
Open the log file debug.log, go to the bottom and look for line entries with timestamps that correspond to your recent site interactions. You may see zero, one, or many lines with the appropriate timestamp.
7. Fix identified problems yourself or send log information to someone who can.
Depending on your level of confidence and understanding you can either act on this information or copy and paste the latest log entries into an email that you can send to someone more technical.
8. Restore the original wp-config.php.
Finally, remove the wp-config.php that you edited and rename the copy to wp-config.php
Go to Source
Author: Robert Riley