Title: Uncaught Error: Call to undefined function current_time()
Last modified: August 17, 2020

---

# Uncaught Error: Call to undefined function current_time()

 *  Resolved [casethemes](https://wordpress.org/support/users/casethemes/)
 * (@casethemes)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/uncaught-error-call-to-undefined-function-current_time/)
 * Hello,
 * I have used the Redux Lite plugin with the Consultio theme sold on ThemeForest.
   My client has encountered this problem. I have been unable to fix the problem.
   So I hope you can examine this for me. I sincerely thank you.
 * >  Fatal error: Uncaught Error: Call to undefined function current_time() in /
   > var/www/html/wp-includes/functions.php:2428 Stack trace: #0 /var/www/html/wp-
   > includes/functions.php(2287): _wp_upload_dir() #1 /var/www/html/wp-content/
   > plugins/redux-framework/redux-core/class-redux-core.php(263): wp_upload_dir()#
   > 2 /var/www/html/wp-content/plugins/redux-framework/redux-core/class-redux-core.
   > php(170): Redux_Core->init() #3 /var/www/html/wp-content/plugins/redux-framework/
   > redux-core/framework.php(29): Redux_Core::instance() #4 /var/www/html/wp-content/
   > plugins/redux-framework/class-redux-framework-plugin.php(149): require_once(‘/
   > var/www/html/w…’) #5 /var/www/html/wp-content/plugins/redux-framework/class-
   > redux-framework-plugin.php(86): Redux_Framework_Plugin->includes() #6 /var/
   > www/html/wp-content/plugins/redux-framework/redux-framework.php(40): Redux_Framework_Plugin::
   > instance() #7 /var/www/html/wp-settings.php(382): include_once(‘/var/www/html/
   > w…’) #8 /var/www/html/wp-config.php(80): require_once(‘/var/www/html/w…’) #
   > 9 /var/ww in /var/www/html/wp-includes/functions.php on line 2428
   > There has been a critical error on your website.
   > Learn more about debugging in WordPress.
 * Thanks a lot!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Funcaught-error-call-to-undefined-function-current_time%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Plugin Contributor [Dōvy Paukstys](https://wordpress.org/support/users/dovyp/)
 * (@dovyp)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/uncaught-error-call-to-undefined-function-current_time/#post-13268878)
 * Ok, that’s a really weird bug. If the fix I just put into the code doesn’t work,
   just delay the load of your plugin until after plugins_loaded, or possibly setup
   theme.
 * Long story short, wp_upload_dir() is called in the core, which calls the current_time()
   function. For whatever reason it hasn’t been loaded at that time. So… I included
   it.
 * We’ll see if that works. Let me know!
 *  Thread Starter [casethemes](https://wordpress.org/support/users/casethemes/)
 * (@casethemes)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/uncaught-error-call-to-undefined-function-current_time/#post-13275142)
 * I can send you the site information. Can you check the problem for me. Thanks!
 *  Plugin Contributor [Dōvy Paukstys](https://wordpress.org/support/users/dovyp/)
 * (@dovyp)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/uncaught-error-call-to-undefined-function-current_time/#post-13275534)
 * Sure, [dovy@redux.io](https://wordpress.org/support/topic/uncaught-error-call-to-undefined-function-current_time/dovy@redux.io?output_format=md).
 *  [afivan](https://wordpress.org/support/users/afivan/)
 * (@afivan)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/uncaught-error-call-to-undefined-function-current_time/#post-13396056)
 * Hello,
 * I’ve also encountered this issue on my server. The problem is that I disabled
   the plugins witht he command mv plugins/ plugins-bkp
 * But still no luck, it seems the error comes from core WP. I didn’t have this 
   problem previously, just yesterday I tried to go to my blog and the problem appeared.
   If I restart Apache, it does’t appear for the first time, but still nothing shows
   in the page, and after the second time I get this stacktrace:
 * Fatal error: Uncaught Error: Call to undefined function current_time() in /var/
   www/wordpress/wp-includes/functions.php:2428 Stack trace: #0 /var/www/wordpress/
   wp-includes/functions.php(2287): _wp_upload_dir() #1 /var/www/wordpress/wp-includes/
   functions.php(2241): wp_upload_dir() #2 /var/www/wordpress/wp-includes/post.php(
   503): wp_get_upload_dir() #3 /var/www/wordpress/wp-includes/post.php(6221): get_attached_file()#
   4 /var/www/wordpress/wp-includes/post.php(6272): wp_attachment_is() #5 /var/www/
   wordpress/wp-includes/media.php(193): wp_attachment_is_image() #6 /var/www/wordpress/
   wp-includes/media.php(955): image_downsize() #7 /var/www/wordpress/wp-includes/
   media.php(1119): wp_get_attachment_image_src() #8 /var/www/wordpress/wp-includes/
   general-template.php(929): wp_get_attachment_image_url() #9 /var/www/wordpress/
   wp-includes/general-template.php(970): get_site_icon_url() #10 /var/www/wordpress/
   wp-includes/general-template.php(3256): has_site_icon() #11 /var/www/wordpress/
   wp-includes/class-wp-hook.php(287): wp_site_icon() # in /var/www/wordpress/wp-
   includes/functions.php on line 2428
 * I cannot understand why it doesn’t find the function, it’s there in functions.
   php
 * Can you help me please?
 * Thanks!
 *  Plugin Contributor [Dōvy Paukstys](https://wordpress.org/support/users/dovyp/)
 * (@dovyp)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/uncaught-error-call-to-undefined-function-current_time/#post-13396685)
 * So what we’ve found is this is a manifested permissions error. Long story short
   Redux isn’t able to read this file because either Redux or the WP core are under
   the wrong permissions.
 * I would love to try and fix this though, because perhaps I can find a way to 
   make sure that Redux does things as it should. Would you be willing to provide
   me wp-admin access?
 * If you’d prefer not, the best bet is to follow a guide like this to fix your 
   permissions.
    [https://www.wpbeginner.com/beginners-guide/how-to-fix-file-and-folder-permissions-error-in-wordpress/](https://www.wpbeginner.com/beginners-guide/how-to-fix-file-and-folder-permissions-error-in-wordpress/)
 * If you’re more tech savy, here’s a bash script: [https://gist.github.com/Adirael/3383404](https://gist.github.com/Adirael/3383404)
 * I hope that helps!
 *  [afivan](https://wordpress.org/support/users/afivan/)
 * (@afivan)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/uncaught-error-call-to-undefined-function-current_time/#post-13398556)
 * I’ve ran the bash script, but with no luck. I mention I didn’t install the redux
   plugin at all. This is very weird, the wordpress installation was working just
   fine, but all of a sudden it stopped…
 *  [afivan](https://wordpress.org/support/users/afivan/)
 * (@afivan)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/uncaught-error-call-to-undefined-function-current_time/#post-13398629)
 * It seems that I’ve solved the issue. I took the newest version of WP and I copied
   all files from wp-includes to my blog and now it works
 *  Plugin Contributor [Dōvy Paukstys](https://wordpress.org/support/users/dovyp/)
 * (@dovyp)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/uncaught-error-call-to-undefined-function-current_time/#post-13403432)
 * WordPress couldn’t read the file and it manifested by saying that function didn’t
   exist. 😉
 * Glad to hear it was solved! Best of luck to you.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Uncaught Error: Call to undefined function current_time()’ is closed 
to new replies.

 * ![](https://ps.w.org/redux-framework/assets/icon.svg?rev=2889347)
 * [Redux Framework](https://wordpress.org/plugins/redux-framework/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/redux-framework/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/redux-framework/)
 * [Active Topics](https://wordpress.org/support/plugin/redux-framework/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/redux-framework/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/redux-framework/reviews/)

## Tags

 * [current_time](https://wordpress.org/support/topic-tag/current_time/)
 * [redux](https://wordpress.org/support/topic-tag/redux/)
 * [themeforest](https://wordpress.org/support/topic-tag/themeforest/)

 * 8 replies
 * 3 participants
 * Last reply from: [Dōvy Paukstys](https://wordpress.org/support/users/dovyp/)
 * Last activity: [5 years, 9 months ago](https://wordpress.org/support/topic/uncaught-error-call-to-undefined-function-current_time/#post-13403432)
 * Status: resolved