Disabling WordPress debugging ensures that your website does not display technical errors or internal system information to your visitors. This procedure is intended for Site Administrators who have completed troubleshooting and want to return their WordPress site to a standard production state.
Before you begin
You will need:
Administrator access to your WordPress site or the ability to edit files via FTP/SFTP or a File Manager.
Access to the directory where your WordPress installation is located.
Disabling the debug mode
To disable debugging, you must modify the wp-config.php file located in your WordPress root directory.
Access your site's files using an FTP client or your hosting provider's File Manager.
Locate the
wp-config.phpfile in the root directory of your WordPress installation.Open the file and search for the following line:
define( 'WP_DEBUG', true );Change the value from
truetofalse:define( 'WP_DEBUG', false );If the line does not exist, add the following code block before the line that says
/* That's all, stop editing! Happy publishing. */:define( 'WP_DEBUG', false );
Save the changes to the file.
Confirm the result
To verify that debugging is disabled:
Refresh your website's homepage and internal pages.
If a non-existent page or a broken plugin causes an error, the site should now display a generic "Page Not Found" or a standard WordPress error page rather than a detailed technical stack trace.
You can also check your site's source code; it should no longer contain "Debug" related headers or information.
Limitations
This procedure only disables the standard WordPress debug mode. If you have installed specific plugins that have their own internal logging or debugging features, those may still be active. You must check the settings of those specific plugins if you require them to be disabled as well.
