Tutorials for web designers and developers
Tutorials for Developers_
php and wordpress warnings

How to hide PHP Warnings And Notices in WordPress

PHP warnings and notices can be generated due to WordPress and PHP conflicts. But you don’t have to worry as they can be fixed in newer versions. However, there is a simple hack for this.

How To Hide Them?

If you have set WP_DEBUG to false in your wp-config.php file that will fix the issue.

define('WP_DEBUG', false);

However, if it doesn’t hide errors simply paste following code after  define('WP_DEBUG', false); in your wp-config.php file.

with this code:

ini_set('display_errors','Off');

ini_set('error_reporting', E_ALL );

define('WP_DEBUG', false);

define('WP_DEBUG_DISPLAY', false);

You will see the magic and no more errors will be there.

Share on facebook
Share on twitter
Share on linkedin
Share on whatsapp
Share on email

Leave a Reply

Your email address will not be published.