How to Enable WordPress Debug Mode to Display Errors
When maintaining a WordPress website, you may encounter issues or errors preventing your site from functioning. Thus, learning how to enable WordPress debugging can prove important. You can determine and rectify all issues that may be causing your site to not work by enabling WordPress to debug mode.
In this article, we will discuss:
How to Enable WordPress Debug Mode
Make sure to install an FTP client on your device first. In this example, we will be using FileZilla. You can use other FTP clients if you wish to.
- Open FileZilla on your device. You need the information below to connect to FileZilla.
- Host - IP address or server hostname
- Username - FTP username
- Password - FTP password
- Port - 21 or leave blank
- Find the wp-config.php file. Download it by right-clicking for the option to appear.
- Use a text editor such as Notepad to open the downloaded file. In this article, we are using Notepad++.
- Look for the following code: define( 'WP_DEBUG', false );.
- To enable the debug mode, change false to true.
- Save the file after editing.
- Re-upload the edited file by dragging and dropping it in FileZilla where the original file is located. Overwrite the existing wp-config.php file by clicking OK.
- Visit your website using a web browser to trigger the error codes. The screenshot below shows that the error is due to a plugin called Contact Form 7.
- Now that we have identified the cause of the problem, we can try to break the connection by renaming the file in FileZilla. In the screenshot below, we went into the Plugin folder in FileZilla and renamed the Contact Form 7 folder. For the Rename option to appear, just right click on the folder and select Rename.
- Once done, refresh your website. It should allow your website to come back without error.
To troubleshoot WordPress 403 and 404 errors, please refer to How to Fix WordPress 403 Errors and How to Fix WordPress 404 Errors.
Review
You will need to turn on debug in WordPress to troubleshoot and maintain. Using this guide, you'll be able to enable debug mode either manually or installing a fitting plugin. You'll be at a better position to identify and solve the bugs. This is going to ensure that your website runs very smoothly, remember you are going to want to turn this off once you've fixed your website so it runs at its best performance as well as safety.