WP_Debug is a constant (a permanent global variable) that when enabled will display any PHP errors on the front-end of your site.
WP_Debug is the most useful tool when troubleshooting your site for any potential errors or warnings. If disabled and your site has an error you may see a blank white screen or content missing on the site but no error message, that makes it nearly impossible to figure out what the problem exactly is.
Enable via a plugin
In case you are looking for a one-click method or you are not comfortable with editing a file using FTP or SFTP access in general simply use the following to turn on
WP_DEBUG mode instead.
- Log into your WordPress website and navigate to Plugins » Add New.
- Locate the search field in the top right corner of the page and type in SO Turn On Debug.
- Click Install Now button.
- Then, click Activate button.
- Upon activation of the plugin,
WP_DEBUGwill be set to
TRUEin your site.
Note that debugging is used for development purposes only. So make sure to disable it again after you are done troubleshooting.
Enable via FTP or SFTP
Follow the steps below to enable
WP_Debug for your WordPress installation:
- Access your website’s root folder via FTP or SFTP.
- Locate the
- Open this file in any text editor.
- Search for
WP_Debugand if you find it set the value to
TRUEif currently set to
- If you didn’t locate
WP_Debugscroll down near the bottom of the file and add the following code right before the line that says
That's all, stop editing! Happy publishing.
define( 'WP_DEBUG', true );
true value in the line above is not set in apostrophes
(') because it is a Boolean value.
Last updated: 3 weeks ago