Evolve Help Center
Evolve Web Hosting Homepage Evolve Web Hosting Portal Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Published on: 02/09/2023 | Updated on: 05/15/2024 | Reading Time: 2 minutes

How to Wordpress Debugging and Error Troubleshooting

Check Error Logs on Server

If your web hosting plan uses cPanel check the public_html/error_log file by using File Manager or your FTP client. It provides very important error logging to issues you may be experiencing with your website.

If your web hosting plan uses DirectAdmin check the logs by opening your File Manager or connecting via FTP and navigating to domains/your-domain.com/logs (replace your-domain.com with the domain you are having issues with) and review the logs for any errors.

Enable Wordpress Debugging

Either open File Manager through your web hosting control panel or login via FTP and locate your wp-config.php file. Open the file using File Manager or using your favorite code editing software (if using FTP).

To Enable WP_Debug, change the last line to:
define( 'WP_DEBUG', true );

To Disable WP_Debug, change the last line to:
define( 'WP_DEBUG', false );

// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );

// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );

// Disable display of errors and warnings
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );

// Use dev versions of core JS and CSS files (only needed if you are modifying these core files)
define( 'SCRIPT_DEBUG', true );
You must insert the code mentioned above BEFORE /* That's all, stop editing! Happy blogging. */ in the wp-config.php file.

Make sure you disable WP_Debug as soon as you are done troubleshooting

Official Wordpress Debugging Documentation

Debugging in Wordpress Documentation