If you’re experiencing an error on your site, a great first step is to enable error logging so that you can get more info about what’s going wrong.
To enable error logging, start by accessing your site via FTP. You can use a standalone app like FileZilla if your hosting account doesn’t include a file manager tool.
Once connected, locate and open the wp-config.php file. At the bottom of the file, add the following three lines of code:
define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', false );
This code tells WordPress to enable debugging, save errors to the debug log, and not display any error messages on the site.
Once wp-config.php is saved, you can recreate the same error as before and the error message will be saved in the debug log. Then you can download the log at the following location: wp-content/debug.log.
You can use this info to debug the issue yourself or share it with us, and we can help to resolve the error.
After the error is resolved, you can delete the three lines of code added to your wp-config.php file.