Skip to content
Prem Tiwari
  • WP Tutorials
  • Plugins
  • About Me
  • Featured On
  • Let’s Talk
Prem Tiwari
Home / WordPress Tutorials / How to hide PHP Warnings and Notices in WordPress

How to hide PHP Warnings and Notices in WordPress

ByPrem Tiwari Last updated onFebruary 2, 2024

Hiding PHP warnings and notices in WordPress is not recommended as it can make it difficult to identify and troubleshoot potential issues on your website. Instead of hiding them, it’s better to address the root cause of the warnings and notices. However, if you have a specific reason to temporarily suppress them or if you’re working in a development environment.

The solution:

If you simply set WP_DEBUG to false in your wp-config.php file you should be fine. These don’t affect your site in any way. Add the below code in your wp-config.php file:

define('WP_DEBUG', false);

OR you can also add the below code in your wp-config.php file for completelly remove the notices and warning from your WordPress pages:

ini_set('display_errors','Off');
ini_set('error_reporting', E_ALL );
define('WP_DEBUG', false);
define('WP_DEBUG_DISPLAY', false);

I hope the above solutions helps you. Share your love by sharing this tutorial on social media. Thanks!

Found it helpful? Share it with your friends on social media!

  • Facebook
  • Post on X
  • LinkedIn
Prem Tiwari

Prem Tiwari is a passionate advocate of open source technology, with over 10+ years of experience in the WordPress domain. He has great experience when it comes to scaled WordPress projects which caters the need for big enterprise clients on WordPress and WordPress VIP-GO platform.

Facebook Twitter Instagram YouTube Linkedin

Post navigation

Previous Previous
Speaking at WordCamp Mumbai on Make Your WordPress Site Hack-Proof
NextContinue
Disable Features – All-in-One plugin to disable unnecessary features

Collections

  • Crawling and indexing
  • Meetup
  • PHP
  • Plugins
  • SEO
  • Tech Talks
  • WooCommerce Tutorials
  • WordCamp
  • WordPress Tutorials
  • Privacy
  • Cookies
  • Disable Update Notifications
Facebook Twitter Instagram YouTube Linkedin WordPress
Scroll to top
  • WP Tutorials
  • Plugins
  • About Me
  • Featured On
  • Let’s Talk