Question

How do I fix " Fatal error: Uncaught Error: Call to undefined function current_time()" Wordpress Droplet

I am getting this error on my wordpress install. Not sure what went wrong.

Fatal error: Uncaught Error: Call to undefined function current_time() in /var/www/html/wp-includes/functions.php:2416 Stack trace: #0 /var/www/html/wp-includes/functions.php(2275): _wp_upload_dir() #1 /var/www/html/wp-content/plugins/buddypress-group-email-subscription/bp-activity-subscription.php(29): wp_upload_dir() #2 /var/www/html/wp-includes/class-wp-hook.php(287): ass_loader() #3 /var/www/html/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters() #4 /var/www/html/wp-includes/plugin.php(478): WP_Hook->do_action() #5 /var/www/html/wp-content/plugins/buddypress/bp-core/bp-core-dependency.php(33): do_action() #6 /var/www/html/wp-includes/class-wp-hook.php(287): bp_include() #7 /var/www/html/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters() #8 /var/www/html/wp-includes/plugin.php(478): WP_Hook->do_action() #9 /var/www/html/wp-content/plugins/buddypress/bp-core/bp-core-dependency.php(318): do_action() #10 /var/www/html/wp-includes/class-wp-hook.php(287): bp_loaded() #11 /var/www/html/wp-includes/class-w in /var/www/html/wp-includes/functions.php on line 2416
There has been a critical error on your website.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

My previous answer is awaiting review by a moderator - I suspect because it contained a link to an article on the subject (or maybe all posts are moderated?)… but in the meantime, I am now confident that in our case the site was hacked using a recently discovered Wordpress File Manager plugin vulnerability. Google those terms and you can find plenty of articles about it :-( . I have opened a support ticket with Digital Ocean in relation to this (#3664280) with more details to back up that assertion.

Hi @alexdo I’m having the same issue on my Wordpress installation, it’s an old installation and no plugin or core updates have been made to the core. I disabled the plugins and theme through console but I’m getting the same error.

Hi, @webprotime

Could you please let me know if this is a new WordPress installation or not? Have you made any recent changes like core version or plugin update or if you’ve recently installed and activated any new plugins?

I will recommend you to go through your plugins and disabled them for a moment and then activate them one by one and test your website every time you activate a plugin as in this way you can check if the error is caused by a faulty plugin.

Hope that this helps! Regards, Alex