RankMath Pro Analytics Not Updating

Whew. Talk about a rabbit hole.

I’m supposed to be writing about why it is good for the economy that the Democrats won control of the Senate. (They will pass economic stimulus that Mitch McConnell would have blocked because he doesn’t want Biden to get any credit for the economy getting better…) Instead, I’m learning about wp-cron because my RankMath Pro analytics are not updating leaving them blank.

Okay, this post is going to be a bit on the technical side. This is for the part of you freelance writers and independent writers who run and manage your own WordPress websites. If you just bang out content as a writer, then this isn’t going to be your jam.

wp-cron wordpress

I installed RankMath Pro on one of my websites, but the RankMath Pro Analytics do not update, even when I do a manual update. They worked at first, but now are blank after showing two weeks of data and two weeks of blank data before going all empty.

RankMath Pro Analytics Issue

There are basically two main SEO WordPress plugins out there that you should be using as a writer. One is Yoast’s All-In-One SEO plugin, and the other is the RankMath plugin. I’m not going to get into whether RankMath is better than Yoast, or the Yoast SEO plugin is better than RankMath. Truth be told, I have a lot of websites, and I use one on some of them, and the other on the others. For whatever it is worth, I use one of those two on all of my websites. You can do what they do by hand, but as the meme goes, “Ain’t nobody got time for that.”

Both the Yoast SEO plugin and the RankMath plugin have pro versions that unlock more features. In general, I’m not sure I need any of the extra features. The Yoast pro version costs $89/year PER SITE! That would get very expensive, very fast for me, so no dice. The RankMath Pro version is newer but they offered a $59 subscription for one year, and I can use it on all my sites. I’m willing to shell out $59 to see if maybe there is some extra juice. If not, I’ll just cancel before the year is up. Let’s call it R&D for website publishing.

Should I refinance my student loans with SoFi?

One of the intriguing things about the pro version of RankMath is an analytics feature. Sure, I get a lot of analytics in a lot of other places, but this is inside the WordPress dashboard, and it comes formatted in a different way, so maybe it would be useful.

Unfortunately the RankMath Analytics is not working on my WordPress website. The RankMath Pro support is pretty good. I get answers faster than I can get around to trying them out, so thumbs up to RankMath Pro support.

WP-Cron Problems with RankMath Pro

RankMath Pro support informed me that there is a problem with my wp-cron jobs, and I need to contact my host to resolve the issue.

I have been using self-hosted WordPress for over a decade now. Contacting my host is beyond a last resort for me. In my opinion, the host’s job is to keep my website up. After that, either I can fix it, or I need a new host, or a new plugin, as far as I’m concerned.

I’ve been through issues with bad plugins, conflicting plugins, WordPress database problems, the wrong version of PHP, bizarre caching errors, and getting websites back after getting stuck mid-maintenance, or from redirect loops. I can edit an .htaccess file in my sleep, and I know my way around wp-config.ini. I have not, however, ever come across a problem with wp-cron.

To the Google!

— Me.

What Is wp-cron?

It turns out that WordPress uses a fake cron job within itself where is basically checks a clock while doing regular WordPress stuff like loading a page for a user, and if it is time, then it runs whatever is in wp-cron. The typical problem for WordPress sites and wp-cron is that it can spike your CPU load making the site slow for that user, PLUS maybe taking your website offline for using too much resources.

Honestly, I never bothered getting sucked into the performance game that so many others play with WordPress. When it comes to making money with websites, the only thing that matters is traffic. Traffic comes from content, so everything else is tweaking. I make sure my sites load “fast enough” and I go back to content. I don’t have any trouble with my site using too many resources, because I don’t use the cheapest web hosting. I’ve lost too much money from a down website in the past to take the chance on a down website now.

Instead, I get what seems like a good hosting deal, and then I build new sites there until I’m unsatisfied, or I find better web hosting, and then I build new websites there, usually after migrating a WordPress website I was having trouble with to the new webhosting.

WP-Cron vs Real Cron

Cron, I believe, is short for chronometer, which is a fancy word for stopwatch, or clock. Cron jobs on Unix-type hosts run at a specified time and interval, sort of like scheduled tasks on Windows.

A real cron job runs at the operating system level and runs whether your site is in use, or a user triggers it, or not. If it is set to run at 3:00 am, it runs at 3:00 am, and that’s that.

With wp-cron, however, it runs whenever a user triggers an event, and it is 3:00 am or later. For websites with plenty of traffic, that means your jobs basically run at 3:00 am. For websites that don’t have much traffic, it might not be until 5:30 am when a user visits the website and triggers the events in wp-cron. At that time, it might try and run several jobs scheduled in wp-cron, like the 3:00 am job, but also anything scheduled at 4:00 am and 4:30 am, and so on. Running so much at once can trigger your CPU to use too many resources and take your website offline, or otherwise cause issues.

Apparently, some webhosts, like HostGator disable wp-cron in order to keep this from happening.

Now, let me make something very clear. HostGator sucks as a webhost. All of the webhosting companies owned by GoDaddy suck. The HostGator administrator website is a minefield of ad popups. No one should use HostGator.

That being said, a long time ago (before GoDaddy bought HostGator), I signed up for HostGator and hosted some websites there. On my To Do list is “move websites off of HostGator,” but my To Do list is long, the days are not long enough, and well… if it ain’t broke, don’t fix it.

It turns out the solution is to change the fake wp-cron to a real cron job. WordPress is totally down with this, by the way. The comment at the top of wp-cron.ini includes this passive-aggressive statement about the existence of wp-cron:

WordPress Cron Implementation for hosts, which do not offer CRON or for which the user has not setup a CRON job pointing to this file.

Standard wp-cron.php file comment

It is simple enough to move to a real cron job, just two steps. I have just never done it before and before reading that line, it sounded like this is maybe a HostGator sucks, kind of thing. I mean, it is, but they aren’t the only ones.

The good news is that in all of this, I came across this webpage, which actually isn’t helpful for my current circumstances but reads like a high-level expert (someone above my level, and I’m an expert) that both knows what he is doing, and writes about it well. It’s hard to find guys like this who aren’t just publishing whatever their keyword research told them was a long-tail keyword phrase they could rank for as part of their marketing funnel. So, if nothing else, if that website turns out to be a useful resource we’ll consider this a win.

My RankMath Analytics Problem

Unfortunately, the more I think about this, the more I think that the cron thing isn’t my real issue with RankMath Pro Analytics not updating, because it doesn’t work when I follow the instructions to get data manually. Presumably, that does not go through wp-cron at all.

I will fix the wp-cron thing anyway, because it is easy, and it looks like the right thing to do even if it is not my issue this time.

Wish me luck.

Leave a Comment