To enable debugging in WordPress, you need to modify the wp-config.php file. Here’s how you can do it:
Connect to your WordPress site using an FTP client or the file manager in your hosting account.
Locate the wp-config.php file in the root directory of your WordPress installation.
Open the wp-config.php file in a text editor.
Add the following line of code at the top of the file, before the line that says /* That’s all, stop editing! Happy blogging. */:
define(‘WP_DEBUG’, true);
Save the changes to the wp-config.php file and upload it back to your server.
After adding this line, any errors or warnings generated by your WordPress site will be displayed on the front-end.
When you’re finished debugging and want to turn off debugging, simply return to the wp-config.php file and change true to false.
It’s important to note that debugging should only be enabled on a development or staging site, and never on a live, production site, as it can expose sensitive information and slow down your site.