Getting rid of Error Warnings and Notices on Your WordPress site

[vc_row][vc_column][vc_column_text]If you set WP_DEBUG to false in your wp-config.php file you should be fine. Warnings and notices don't affect your site in any way, so end users don't need to see them and often think there's something seriously wrong when they do.

Sometimes this doesn't work on cheap (usually shared) hosts - they often force displaying PHP warnings and notices. (like GoDaddy)

In that case, you can replace this line from your wp-config.php file:

define('WP_DEBUG', false);

with this:

ini_set('log_errors','On');
ini_set('display_errors','Off');
ini_set('error_reporting', E_ALL );
define('WP_DEBUG', false);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);

Once that's done, you can view all your warnings and notices in a file in wp-content called "debug.log".

This is especially useful on servers that have unusual setups for Apache, PHP etc., as it can be difficult to access the normal log files, especially on hosts that don't allow shell access or don't give users permission to view log files in real time.

[/vc_column_text][/vc_column][/vc_row]

Leave a Reply

Your email address will not be published.

I accept the Privacy Policy


Recent Posts

November 14, 2021
I can't believe this is necessary, but...
October 5, 2020
Easy Ways To Automate Your Website - 2 approaches

Isn't technology supposed to make life easier? I recently built a tool for a provider of an ERP system, to allow his clients to automatically publish inventory to their business websites and keep the sites in synch with his system. It got me thinking (again) about automation, and how business can do more with tools they're already using.

June 17, 2020
The Pivot: Making the shift from Commodity to Consultant

A lot of people - even companies - that provide technical services find themselves in the unfortunate position of being viewed as "the techs" and ignored when discussion turns to policy, marketing, or other topics relating to business management and strategy - the domain of consultants. This can be the case whether the tech is a twenty-something fresh out of school, or someone who's been in the industry for decades.
It's difficult to change people's perception once you've been slotted into a role. Far better to set expectations at the beginning of a relationship than try to change mid-stride.

June 4, 2020
An office without walls. A business without borders. There's no need to meet in person.

I should have known better, but I was hit with a wave of panic when the government announced the beginning of the corona virus lock down. I thought that might be it for my business. How would I get new clients? What about the meetings I had already scheduled? What if everybody stopped spending? Even in a digital business it's sometimes difficult to see past traditional expectations.

To my eternal relief, I learned better.

Subscribe To Our Newsletter

Join our mailing list to receive the latest news and updates from our team.

Email sending image

You have Successfully Subscribed!