Some of you may have noticed while logging in a small panel in the dashboard called Site Health Status. It first appeared around six months ago and is part of the core WordPress installation, which has gone through several major changes over the past six months.
What is it?
It performs some tests when you visit your website and gives you a summary on the home page. You can also locate the detail by going to Tools, and then Site Health.
Over the past 2 months I have been working my way around all websites and have noticed some trends with this health check. It often shows critical errors and needs improvement. I asked the hosting provider for optimised settings for a WordPress website to get the best performance. You may find that question a little odd, but sometimes there can be wide variances in performance, and whenever I see this I go back to the hosting provider and start asking questions. Which is why I have opened around 380 support tickets over the past 3 years. I asked for a set of changes to apply to every account to get them all to the same level of performance.
There are often things that need to be done in addition to the parameters configured by default. Anyway I will not bore you with the details, but I have found a set of parameters to be added in the hosting which achieves a generally faster website, and that is what I have been doing in the background. I am about 3/4 of the way through and anticipate I will have been through all sites by the end of September.
Below is the dashboard panel summary for the Site Health Status.
The image below is an example from a live site, viewing the detailed Site Health Page.
Is my site sick?
Well, I have been asking that question, because the health check provides some unexpected results. There is also a wide variance in the results on successive tests. So I raised the question with the hosting provider to ask……
Then I entered the longest support thread I have ever had with them. Well over 1 month going back and forth. We are not done yet, and when I finally get this resolved I will let you know. But this is what I have found out. Some of it I knew already. However the bottom line for me is a health check provided by WordPress in the core functionality should simply pass every time. If it does not work predictably, or throws an error then it should be investigated.
Initial observations
While working around sites and optimising them (more memory, more PHP variables, buffering turned on, site optimisation turned on, CDN turned on….) I noticed that the health check often showed up as “requires attention”.
However there were no indications from the outside of the site (the users view) that anything is wrong. The site functions normally, and is quite quick. However the health check reports there is something wrong.
Most likely a false positive
It looks like the results WordPress is reporting are “False Positives” this means an error is being incorrectly reported. They are often inconsistent on subsequent tests, and clearly the site is not broken. So why are they occurring?
WP-Cron
WP-Cron is a house keeping function built into the website. It is triggered whenever someone visits a page. What should happen is any tasks that are due to run, start when WP-Cron is spawned. However this presents a problem to hosting companies. (Not just the one you are with, but most of them). WP-Cron can be processor intensive if there are lots of page views. If it is processor intensive, it will limit how many websites can be placed on any given server. One way to reduce that load is to disable it, which is what I have been doing, and replace it with a call from the control panel which is executed every minute to check to see if there are any housekeeping functions required. This is not a standard WordPress installation, this is extra, and leads to a more efficient site. Especially as it turns out that if you leave the installation as a standard WordPress installation, then the naturally occurring WP-Cron events are throttled back by the hosting anyway. Something I had to find out and was not published.
WP-Cron is restricted to executing once per minute by the hosting company. If you try to execute it more than once a minute it will not work. If there are several tasks, maybe only one of them is completed. When you visit the health check screen or trigger it you are doing this asynchronously, it is quite possible that the request has already been triggered for that period. This is reason why there are occasional failures.
My opinion
I am not happy that these are failing. The position I have put to the hosting company is that these tests have been applied by the WordPress developers and are indicative of the performance of the hosting platform that WordPress is running on. While I can accept from an engineering point of view that the native WP-Cron in all WordPress websites may not be efficient, or take up too much processing power, it is how it was designed. If the hosting company claims that their hosting is WordPress optimised then it would not be unreasonable to expect that a health check passes consistently. That is a very difficult argument to defend from a hosting company point of view.
What they have said
They understand the position I have represented, and are currently looking into applying methods in handling WP-Cron requests to get around the problem, such that all sites indicate a pass. That work is ongoing.
Reality Check
Based on the feedback I have had and various tortuous explanations and going back and forth, I am reasonably content that the failures are not real. I also want to stress here that, you would not be aware of any problems from the outside users view of the site, and therefore would be unlikely to be looking for any problems. This whole area is pretty deep in the bowels of how WordPress works. But I am not letting the hosting company off of the hook, because it is their hosting implementation is showing the problem.
Looking around the internet, lots of people are raising the same thing. This may lead to pressure being applied to the WordPress development team by Hosting Companies to reconsider how these tests run to ensure they run in all environments. Even those that rate limit WP-Cron.
So inconclusive right now, so we watch and wait.
But, if you see anything else wrong with your website, or the perfomance is very sluggish, always raise it to my attention and I will check to see if there is some other problem present. As always please contact me through the usual channels.