Introduction
This article describes how to disable error logging in WordPress. This can be used to prevent your users from seeing any errors on your WordPress sites.
Procedure
- Verify that the options are not already configured in your
wp-config.phpfile by using grep and searching for the following strings:#egrep "display_errors|error_reporting|WP_DEBUG|WP_DEBUG_DISPLAY" wp-config.php
- If the desired entries are not found, using your favorite editor, open the
wp-config.phpfile and add the following line below thedefine('WP_DEBUG', false);so it looks like this:if ( ! defined( 'WP_DEBUG' ) ) {
define( 'WP_DEBUG', false );
define('WP_DEBUG_DISPLAY', false); - At the bottom of the file, add these two lines.
- "ini_set('display_errors', 'Off');"
- "ini_set('error_reporting', E_ALL );"
- Save and close the file.
Comments
0 comments
Article is closed for comments.