CAOS throws this notice if gtag.js does not exist, or hasn’t been updated for a while.
First off, check if the file exists. If not, trigger a manual update from within CAOS’ settings screen. If it does exist, then it means that the scheduled update wasn’t able to run. This usually happens on low traffic sites (< 100 visitors/daily), because WP cron wasn’t able to properly finish its schedule.
Is your site a low traffic site? There’s no shame in that :-), but it probably means that not just CAOS’ scheduled jobs, but many of WordPress cronjobs aren’t able to run properly. To work around this, you need use real cronjob instead of using WordPress’ pseudo cron.
For this you’ll need SSH access to your server. If you don’t have this, contact your hosting provider and ask them to replace WordPress’ pseudo cron with a real cronjob.
First you need to disable WordPress’ pseudo cron. To do this go to wp-config.php (located in the root of your WordPress install) and add the following line right before the line that reads
/* That's all, stop editing! Happy blogging.*/
:
define('DISABLE_WP_CRON', true);
Then, open up a terminal, login to your server and run crontab- e
. This will open up your cron editor.
Then add the following:
*/5 * * * * wget -q -O - https://yourdomain.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1
That’s it. From now on, WordPress’ cron will run every 5 minutes.
If the notice at the top of CAOS’ settings screen said that the next cronjob is scheduled Never, you might need to re-activate CAOS (and CAOS Pro) after making the above changes to make sure the cronjob is now properly added to WordPress’ cron schedule.