wordpress turn off php warnings

To turn off PHP warnings in WordPress, follow these steps:

  1. Access your WordPress website's root directory using an FTP client or file manager provided by your hosting provider.

  2. Look for the wp-config.php file in the root directory and open it in a text editor.

  3. Locate the line that says define('WP_DEBUG', true); and change it to define('WP_DEBUG', false);. This line enables or disables the WordPress debug mode.

  4. Save the changes and close the wp-config.php file.

By changing the WP_DEBUG constant to false, you are disabling the debug mode in WordPress. This will prevent PHP warnings from being displayed on your website.

Note that turning off PHP warnings can be useful for production environments where you don't want error messages to be shown to visitors. However, it's important to keep in mind that hiding warnings can make it more difficult to identify and fix potential issues with your website. It's recommended to only turn off PHP warnings temporarily and enable them again when debugging or troubleshooting is needed.