How to hide PHP Warnings and Notices in WordPress

Last week one of our WordPress clients install 3rd party theme and call for support. The client says, “I getting PHP notices and warnings on my page.”

In most cases, these are nothing to worry about as the plugin or theme developer should solve it quickly. 

But when they appear on productions site, it could be a bit challenging and a honey pot for hackers to try and play with the website.

Some of these warnings generate as a result of the theme or plugin developers keeping compatibility with an older version of WordPress as well as older PHP versions.

The resolution:

The resolution for these cases is straightforward.

Open to edit the wp-config.php file.


define('WP_DEBUG', false);

or if you don’t find it add it before the line:

/* That's all, stop editing! Happy publishing. */ ini_set('display_errors','Off'); ini_set('error_reporting', E_ALL ); define('WP_DEBUG', false); define('WP_DEBUG_DISPLAY', false);

These changes don't affect your site in any way. But will hide any error or warning message to appear.

I hope that helps someone out there!


More Posts

March 2022 – Kids on the Yard PR

“I can relate to this! Parents having a very tough time keeping their kids educational on track…” Sarah Maruani, a first-grade teacher, has founded Kids

Happy smiling arab schoolgirl using phone for virtual online study at home.

Online Summer Camp 2022

Numerous schools are supplying online guideline to struggling visitors. Unfortunately, there is an absence of research study on the effect of online small-group analysis intervention,

Sign up for our newsletters


Book Now Free SEO Consultation


Take your ecommerce site to next the level


Website Development