How To: Display Error Messages in WordPress
One question we get a lot at WebDevStudios is what to do when you receive the dreaded WordPress White Screen of Death. WordPress by default hides all error messages from displaying. This is for security reasons as error messages can actually help hackers penetrate your website.
So how do you display error messages in WordPress? Easy! Just add the line of code below to the top of your .htaccess file in the root directory of your WordPress website.
php_flag display_errors on
That’s it! Error messages will now display across your entire WordPress website.
Another method used to display WordPress error messages is the WP_DEBUG flag:
define(‘WP_DEBUG’, true);
Just drop that line of code in your wp-config.php file and errors will start displaying.
Remember to only use these techniques to help troubleshoot errors and remove it as soon as you are done.
If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader or join our newsletter and receive future articles emailed directly to you.
Comments
Do you have any idea how many hours could have been saved had I known this years ago?!? Thanks for the tip!
[...] afortunadamente bien sencilla. Solo tienes que añadir la siguiente línea arriba del todo del fichero .htaccess alojado en la [...]
[...] Ever wanted to know what the actual problem is when WordPress returns a blank white screen? Turns out a simple line of PHP can tell WordPress to output the error. [Link] [...]
Good tutorial, although for clarification purposes I would say you should add “Run-time” to the description of this, because you are talking about displaying php error messages.
Thanks
very helpful …
I also have a web site having problems online 1045 …
but can be overcame …
thank you …
do not forget to visit the it.alonearea.com



[...] Ever wanted to know what the actual problem is when WordPress returns a blank white screen? Turns out a simple line of PHP can tell WordPress to output the error. [Link] [...]