The purpose of these warning and notices are to help developers debug potential issues with their code. Plugin and theme developers use this information to check for compatibility and that best practices are being adhered to in their code.
However, it is considered a best practice to hide these warning and notices on live production sites because they can leak important private information that could be used to compromise your site.
To hide these messages you will need to edit your
Login to your server with any FTP application like FileZilla or Transmit. Or, if you have cPanel as your web host control panel, open the File Manager then navigate to the root folder of your website.
wp-config.php file, look for the following line:
define( 'WP_DEBUG', true );
false so the line of code looks like this:
define( 'WP_DEBUG', false );
Save the file, overwriting the original.
On most web hosts that is all it takes. On some lessor expensive shared web hosts this will not work on it own. If you make the above change and you still see these messages, replace the
define( 'WP_DEBUG', false ); line with the following:
ini_set( 'log_errors', 'On' ); ini_set( 'display_errors', 'Off' ); ini_set( 'error_reporting', E_ALL ); define( 'WP_DEBUG', false ); define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', false );
Save the file again and overwrite the original.