How to enable debugging and error log in WordPress

Occasionally, your site may encounter a plugin conflict or other difficulty that prevents it from loading or accessing the Administration Dashboard. WordPress error logs may assist you in determining the source of problems on your site; but, in order to generate those logs, you must enable a feature called Debugging Mode, which by default is disabled for security reasons. Debugging mode will generate a file containing a list of all error messages encountered on your site.This tutorial will walk you through the process of enabling debugging in WordPress.

Enabling debugging mode in WordPress

To enable debugging in WordPress, follow these steps:

  1. Log in to cPanel.
  2. If you do not know how to log in to your cPanel account, please see this article.
  3. In the FILES section of the cPanel home screen, click File Manager:

  4. In the left sidebar, click the name of the directory that you want to open. The directory's contents appear in the right pane.

  5. Locate the wp-config file in the WordPress installation directory:

  6. Open the wp-config.php file in your preferred IDE or text editor.

  7. Add the following lines at the end of the file:

    define( 'WP_DEBUG', true );
    
    define( 'WP_DEBUG_LOG', true );
    

  8. Save the changes. WordPress will now log all errors in the wp-content folder in a file called debug.log. Keep in mind that debug mode will not prevent the dreaded white screen of death, but it will assist you in identifying the offending plugin or theme.

More Information

For more information about error logging and file manager, please visit:

Get Managed WordPress Hosting

Article Details

Other Articles in This Category

Show More

Related Articles

Show More

Did you find this article helpful? Then you'll love our support. Experience the A2 Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.

Usamos cookies para personalizar o site para você e para analisar o uso do nosso site. Você demonstra que concorda com isso ao clicar em "Eu concordo" ou ao continuar usando este site. Mais informações sobre cookies podem ser encontradas em nossa Política de privacidade.