Debugging WordPress error can be sometimes a tough mission.

For that, we can use that simple code to create error log file in the website’s root.

Paste this into your wp-config.php:

ini_set('error_reporting', E_ALL);
ini_set('error_log', dirname(__FILE__) . '/error_log.txt');

Once an error is occurred, it will create the error log file named error_log.txt with a full report of that error.

Warnings will also be included, don’t ignore them!

Also, make sure this file’s weight isn’t getting too large… it takes maintenance.

How useful was this post?

Click on a star to rate it!

Average rating / 5. Vote count:

No votes so far! Be the first to rate this post.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?