Fix errors showing up frontend

Errors and mistakes happen, but these should never show up on your website.

Errors related to Security Ninja or any other plugin should never appear on the frontend, but this can happen depending on how your WordPress installation is configured. Fortunately, we can tell WordPress to not display them.

Remove error messages showing up

If you wish to remove these errors, in general, you need to edit wp-config.php:

define('WP_DEBUG', false); 
define('WP_DEBUG_LOG', false); 
define('WP_DEBUG_DISPLAY', false);

Replace any existing definitions you see with the ones above.

This prevents errors from PHP and WordPress from showing up on the front of your website.

Write errors to a file instead

If you want to log the errors for finding and fixing a problem, but not display on your website, you can change the settings to this:

define('WP_DEBUG', true); 
define('WP_DEBUG_LOG', true); 
define('WP_DEBUG_DISPLAY', false);

This prevents errors from PHP and WordPress from showing up on the front of your website, but errors are logged to a text file /wp-content/debug.log that you can access via FTP or your control panel at your website host.

Please note when you are looking at this file that there are different levels of errors.

Notices and warnings are just what they say, notices and warnings – these are things the developers should look to fix, but nothing that is breaking functionality.

Fatal Errors are when there is a serious error that prevents the website from loading.

This can help you with debugging, please send this file to the support team if requested.

Was this helpful?

Next Article

Re-install WordPress