php and wordpress warnings

Hide PHP Warnings in WordPress

In PHP, Wordpress by Shania RiazLeave a Comment

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('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.

About the Author

Shania Riaz

Facebook Twitter

Shania Riaz is WordPress Designer at Hfarazm Software. Her expertise includes WordPress Customization and Bug Fixing. She holds a Software Engineering Degree from The University of Central Punjab, Lahore.

Leave a Comment