I enabled the errors in my wp-config file:
define('WP_DEBUG', true);
But I have an empty white page. No errors are listed.
I enabled the errors in my wp-config file:
define('WP_DEBUG', true);
But I have an empty white page. No errors are listed.
Comments are closed.
The below code, inserted in your wp-config.php file, will log all errors, notices, and warnings to a file called debug.log in the wp-content directory. It will also hide the errors so they do not interrupt page generation.
this code you must have to insert BEFORE / That’s all, stop editing! Happy blogging. / in the wp-config.php file.
source: https://wordpress.org/support/article/debugging-in-wordpress/
Add these two lines below the
then delete them when you don’t need them any more.
You can write this into your .htaccess file.
Please change the error_log directory.
Plugins or themes that are using PHP’s
set_exception_handler()
(see the docs) can also cause errors to not be shown, because their callback might just silently ignore the error. For example, I experienced the exact same thing using NextGen Gallery, but once I deactivated it, errors appeared as normal on both the page and in thedebug.log
file.Another thing to check is the
WP_CONTENT_DIR
variable as that is where thedebug.log
file would be put. It may be checked as suggested in this question, or using the Wordfence plugin->Tools->Diagnostics->WordPress Settings. Normally it is not explicitly set unless there’s a custom configuration. Though it can can be set inwp-config.php
e.g.define('WP_CONTENT_DIR', '/var/www/sites/wordpress/wp-content');