Explore Topics

How to Disable PHP Warnings and Notices in WordPress?

Last Updated : 18 Apr, 2025 - Asked By Ashok

wordpress  disable warnings 

Answers
2023-11-09 05:53:26

Notices and warnings are the kind of errors that do not stop WordPress from loading your website. The purpose of these errors are to help developers debug issues with their code. Plugin and theme developers need this information to check for compatibility and best practices.

However, if you are not developing a custom theme, plugin, or website, then these errors should be hidden. Because if they appear on the front-end of your website to all your visitors, it looks extremely unprofessional. If you see an error like above on on your WordPress site, then you may want to inform the respective theme or plugin developer. They may release a fix that would make the error go away. Meanwhile, you can also turn these errors off.

For this you will need to edit the wp-config.php file.

Inside your wp-config.php file, look for the following line:

                       define('WP_DEBUG', true);

 

Sometimes it is already set to false in either case, you need to replace this line with the following code:
                     1 ini_set('display_errors','Off');
                     2 ini_set('error_reporting', E_ALL );
                     3 define('WP_DEBUG', false);
                     4 define('WP_DEBUG_DISPLAY', false);

 

 

Your Answer



Other Resources

Quiz Image
Quiz

Test your knowledge with interactive quizzes.

Interview Questions Image
Interview Questions

Prepare for interviews with curated question sets.

Q&A Image
Q&A

Ask your coding-related doubts and get answers.

Certification Image
Certification

Earn certifications to enhance your resume.

internships Image
Internships

Hands-on projects to improve your skills.

Quiz Image
Quiz

Test your knowledge with interactive quizzes.

Interview Questions Image
Interview Questions

Prepare for interviews with curated question sets.

blog Image
Blogs

Add your technical blogs and read technical topics.

Certification Image
Certification

Earn certifications to enhance your resume.

Q&A Image
Q&A

Hands-on projects to improve your skills.

People Also Asked