PHP Notices, Warnings and Errors on Your WordPress Site

PHP Notices, Warnings and Errors on Your WordPress Site

Websites are never too far from problems. If you run a WordPress website, you will need to spot and fix problems.

WordPress works on PHP. When PHP runs into issues, it reports them to you. This may be helpful to you as the website owner, but these same errors may also be seen by your site visitors.

In this tutorial, you will have a brief introduction to these errors. You will learn the different types that might appear on your site front end. You will also master how you can stop them from showing.

If you want an easy way to find all these error messages we recommend Logtivity which has a hosted errors logs service. It doesn’t matter where your site is hosted, Logtivity will record the errors and point you to the file that’s causing problems.

There are three main types of PHP messages: notices, warnings, and errors. Let’s take a look at each of them.

What are PHP Notices?

PHP notices are the least important. As stated on the official PHP website, you will see PHP notices when:

the script encountered something that could indicate an error, but could also happen in the normal course of running a script

What are PHP Warnings?

Warnings deserve more attention but most likely won’t break your website. According to the official PHP website, warnings are:

non-fatal errors. Execution of the script is not halted

What are PHP Errors?

PHP errors are the most important kind of PHP problems. They most likely will break your website. According to the official PHP website, errors are:

Fatal run-time errors. These indicate errors that can not be recovered from, such as a memory allocation problem. Execution of the script is halted.

Solution #1: Disable Error Reporting on Your Site

  • In the root of your WordPress website, find the wp-config.php file:
wp-config file in wordpress directory tree
  • Make sure you have in the file the following code:
define('WP_DEBUG', true);

On some hostings, setting WP_DEBUG to true may not work. If this is your case, you may need to add to your wp-config.php the following:

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

Solution #2: Fix the Problem

This is a crazy idea, right? Fixing an issue is harder than hiding a problem.

Here are some tips to help you fix the problem. Don’t forget to backup your site before applying any of them.

  • Ensure your WordPress site and all its plugins and themes are up-to-date.
  • If you have just updated a plugin and you’re seeing errors, try rolling back to a previous version.
  • Run a search on Google and See if someone already reported the same error message. Check if they have found a solution.
  • Study the message itself for hints about the issue. Often it will point to the extension or template that has prompted the problems. Disable the plugin or theme to check if that fixes the problem.
  • If it does, report the issue to the plugin / theme developer. You can use the sharing feature in Logtivity to show them the error.


  • Alex Smirnov

    Born from Ukrainian mother and Russian father, Alex migrated to the United Kingdom in 1999. He is a self-taught Microsoft Certified Professional. He enjoys learning content management systems and helping web site developers make the most of them.

0 0 votes
Article Rating
Notify of

Newest Most Voted
Inline Feedbacks
View all comments
4 years ago


3 years ago

Hello Alex! I’m trying to get on with setting up the PHP log to only log the PHP Errors. Whatever i try, it keeps logging everything.
IS this setup in wp-config.php should work? (php 7.4)
[code]define(‘WP_DEBUG’, true);[/code]
[code]define(‘WP_DEBUG_DISPLAY’, false);[/code]
[code]define(‘WP_DEBUG_LOG’, ‘wp-content/themes/mytheme/mylog.log’ );[/code]
[code]ini_set(‘error_reporting’, E_ERROR );[/code]

any idea what i’m doing wrong? (i even tried to set the error reporting in php.ini, with same (no) results..
Best wishes,

Karan Gupta
Karan Gupta
3 years ago
Reply to  Wiktor

define(‘WP_DEBUG’, true);
define(‘WP_DEBUG_DISPLAY’, true);
define(‘WP_DEBUG_LOG’, ‘wp-content/themes/mytheme/mylog.log’ );
ini_set(‘error_reporting’, E_ALL );

Karan Gupta
Karan Gupta
3 years ago
Reply to  Wiktor

ini_set(‘error_reporting’, E_ALL );

3 years ago

Really helped

2 years ago

Tengo estos mensajes que no logro quitar:

Notice: Undefined index: quiz_passing_score in /home/globalticom/public_html/wp-content/plugins/wplms-h5p-plugin/vibebp/class.init.php on line 55

Warning: Use of undefined constant WPLMS_API_NAMESPACE – assumed ‘WPLMS_API_NAMESPACE’ (this will throw an Error in a future version of PHP) in /home/globalticom/public_html/wp-content/plugins/wplms-mycred-addon/vibebp/includes/class.init.php on line 166

Would love your thoughts, please comment.x