WordPress site down Fatal error: Call to undefined function wp_doing_cron()
Hello, I have a WordPress site that is giving me an error ( Fatal error: Call to undefined function wp_doing_cron() in on line 126) I tried to login to wp-admin and get the same error. Any suggestions on a direction to fix this?
* HostingWordPress
Last Comment
Deerek11
8/22/2022 - Mon
Ethan Jakson
There might be some disturbances in the PHP code of your wordpress site. That's why the error is occurring.
David Favor
The function you mention lives in wp-includes/load.php so to debug.
1) Check wp-includes/load.php to ensure you find the line...
If not, your site has been corrupted. Likely not a hack, as hackers don't normally break sites, they inject backdoors to access sites.
If you're missing this function, then do a manual reinstall, per...
https://codex.wordpress.org/Upgrading_WordPress which will have your unzip/untar the latest WordPress install into your WordPress install directory, overwriting any corrupted files. Then visit the link...
2) You didn't mention what occurred on the site (likely a plugin you installed or custom code you installed via SFTP), so the likely reason for this is your WordPress core files are okay, you've just made the mistake of installing some broken code on your site. If broken code attempts to run wp_doing_cron() before all WordPress core files have loaded first, then you'll see this error.
If you know what was installed, you'll have to do a manual uninstall.
You'll do this by appending some string to the end of the theme or plugin directory causing the problem.
Like rename plugins/foo to plugins/foo-aside which will deactivate the plugin temporarily.
3) You can also enable WP_DEBUG + look at your debug log. You'll likely find the exact file + line number where problem occurred, along with a full stack trace showing entire calling tree.
Just having the message you posted above is insufficient for debugging, as there's no context (stack trace).
Deerek11
ASKER
I can give more details, the problem is I didn't create the site I took over the site, I just did some updates. I don't have the theme but prior to doing my updates, I did run a backup with updraft plus. The site is hosted with Siteground, but I am not sure what happened to the site the customer called me and told me that the site was down, so it could have been someone in the organization messing around in WordPress or god only knows.
Can I reinstall WordPress without having the theme? What other information do you need to assist
Enable WP_DEBUG in your wp-config.php file + likely you'll see the exact problem.
If you get stumped, attach a copy of your debug.log file for review, or a clickable URL to your debug.log file, which is usually something like https://foo.com/debug.log or similar.
Deerek11
ASKER
what are you guys thought about paying 19.99 for a one time use of the backup tool to restore the website? Site ground offers this, but my concern is I am kind of sure the site was up this past Friday but I am not sure if site ground is gonna give me the option of picking a day to restore from I have never used their restore tool.
Deerek11
ASKER
I just found this backup and restore option in the control panel
Should I try to run the restore / full account , what could go wrong?
I've used that backup restore at Siteground without a problem. However, it was for a site I custom built. At the very least you could make sure you download a complete backup of the current site and then use that Siteground feature. If things go further south, then you can reinstall your backup and keep picking away at it.