Turn on WordPress error reporting

If your site is experiencing issues that you think might be related to PHP issues, here’s how you turn on error reporting in WordPress:

Find line one below in wp-config.php, comment it out, and add the rest below. This is meant to be done on a development site, in a local environment.

https://gist.github.com/spigotdesign/098fbaae4731a75cb354

WordPress will now start logging errors in debug.log file within /wp-content directory.

Even if you don’t notice major errors with your site you can still often find warnings on deprecated code or other PHP issues.

Related posts

Leave the first comment