Title: Call to undefined function wp_cache_get()..??
Last modified: October 3, 2016

---

# Call to undefined function wp_cache_get()..??

 *  [angelleye](https://wordpress.org/support/users/angelleye/)
 * (@angelleye)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/call-to-undefined-function-wp_cache_get/)
 * I’m updating a number of sites to WP 4.6.1. My process for each is to update 
   all the plugins and themes, and then I update WP itself. I do this every month
   so I’m never very far behind.
 * For some reason, each site I’m updating right now is throwing this error after
   the files are updated:
 * [03-Oct-2016 23:33:14 UTC] PHP Fatal error: Call to undefined function wp_cache_get()
   in /home/airassoc/airassociatesmo/wp-includes/option.php on line 1113
 * I am not able to get the admin panel to load that point until I go in and completely
   disable the cache plugin. That includes the plugin folder itself as well as the
   individual files under /wp-content.
 * One of the sites I was able to get the caching plugin re-activated after completing
   the WP updates successfully. On another I was not able to get it to re-activate
   for some reason, even after disabling to apply the updates successfully.
 * It’s happening on every site I update with this plugin right now.

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

 *  Thread Starter [angelleye](https://wordpress.org/support/users/angelleye/)
 * (@angelleye)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/call-to-undefined-function-wp_cache_get/#post-8249290)
 * 2 more sites followed the same exact pattern. I updated to 0.9.5.1 prior to updating
   WP to 4.6.1 and when I did that I wound up with the error mentioned.
 * On this last site I just did, I went ahead and left the cache plugin on 0.9.4.1
   and updated WP to 4.6.1 without any issues. Then I updated the cache plugin after
   that to 0.9.5.1 and it seems to be working fine.
 * So the problem seems to happen with W3 Total Cache 0.9.5.1 updated before updating
   WP to 4.6.1.
 * I just did this with 5 sites. 4 of them I ran into the problem because I updated
   W3TC prior to updating WordPress. Of those 4, 3 of them I was able to get W3TC
   activated again after successfully updating WordPress. 1 of them keeps giving
   me that error even after everything has been updated.
 * Again, the last one I updated WordPress before updating W3TC and that seems to
   have worked just fine.
 *  [Ashok](https://wordpress.org/support/users/bappidgreat/)
 * (@bappidgreat)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/call-to-undefined-function-wp_cache_get/#post-8250321)
 * [@angelleye](https://wordpress.org/support/users/angelleye/), it’s always best
   practice to update all plugins and themes one by one, **but of course after making
   sure that your wordpress is in latest version**. This is because, if a plugin
   adds a function which is available in latest version of wordpress, in that case
   you will get a fatal error. So, always update wordpress first and then other 
   things.
 * I am not saying your issues are because of the same thing I explained above though.
   It’s good thing you have running all sites fine but one. Looking at the error
   it seems there are missing files in your wordpress installation.
 * Would you please download the wordpress as zip, then extract it and upload everything
   except wp-content folder and wp-config.php to overwrite your current installation?
   Make sure you don’t upload wp-content folder and wp-config.php file. To stay 
   safe you may want to take a full backup for your site first.
 * Have a good day!
 * Cheers
    Ash
 *  Thread Starter [angelleye](https://wordpress.org/support/users/angelleye/)
 * (@angelleye)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/call-to-undefined-function-wp_cache_get/#post-8251284)
 * Thanks for the response.
 * The sites aren’t missing any files. We’re talking about 10 different sites now,
   and when I disable W3TC everything works fine on them. I have done 5 more sites
   now since these first ones I mentioned, and as long as I update WP first then
   it seems to be ok.
 * On that note, what you said makes sense about updating WP before updating plugins,
   however, in this case I’m still a little bit confused because [wp_cache_get()](https://core.trac.wordpress.org/browser/tags/4.6/src/wp-includes/cache.php#L120)
   was introduced in WP as version 2.0.0. Based on what you’re saying the sort of
   thing I’ve been seeing should only happen if wp_cache_get() was introduced in
   the WP update that I hadn’t applied before updating a plugin that uses it.
 * So still not sure why it’s happening, but I can tell you that it’s easily reproducible
   if you simply update W3TC to 0.9.5.1 prior to updating WP. 0.9.4.1 does not have
   this problem.
 *  [benfitts](https://wordpress.org/support/users/benfitts/)
 * (@benfitts)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/call-to-undefined-function-wp_cache_get/#post-8428184)
 * Same issue on a site with W3 Total Cache plugin installed.
    Disabled plugin. 
   Re-enabled. Problem went away.
 * My issue I was copying some files from test to production where the plugins were
   already upgraded so that’s why I got a little out of sync. Simply disabling and
   re-enabling fixed it.
 *  [kardkovacsi](https://wordpress.org/support/users/kardkovacsi/)
 * (@kardkovacsi)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/call-to-undefined-function-wp_cache_get/#post-8512102)
 * I updated the plugin and tried to disable for some reason. Bummm, everything 
   went down.
    I had to rename the w3-total-cache folder under the plugins directory
   to make the website work again. Is there any solution to restore the w3-total-
   cache? If I rename back the plugin directory then my site will go off again. 
   I tried to delete the plugin and reinstall without any luck. It killed immediately
   my site.
 *  Thread Starter [angelleye](https://wordpress.org/support/users/angelleye/)
 * (@angelleye)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/call-to-undefined-function-wp_cache_get/#post-8512274)
 * If renaming the cache folder solves the problem then it sounds like something
   about the caching in general is what’s causing it. You’ll need to make sure to
   fine-tune W3 Total Cache to work well with WooCommerce, which would be something
   you’ll need to reach out to their support about.
 * I personally like to use WP Rocket for caching because it’s already tuned out
   of the box for WooCommerce and it never causes any issues.
 *  [kardkovacsi](https://wordpress.org/support/users/kardkovacsi/)
 * (@kardkovacsi)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/call-to-undefined-function-wp_cache_get/#post-8512813)
 * I do not have WooCommerce plugin. It worked well until I tried to disable it.
   I removed w3-total-cache folder from the plugins the db.php as well then reinstalled
   the plugin and it works again.
 *  Thread Starter [angelleye](https://wordpress.org/support/users/angelleye/)
 * (@angelleye)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/call-to-undefined-function-wp_cache_get/#post-8514716)
 * Whoops, sorry, I didn’t even realize what plugin repo this was. I thought it 
   was from one of my own. Sorry for the confusion.
 *  [oelenberger](https://wordpress.org/support/users/oelenberger/)
 * (@oelenberger)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/call-to-undefined-function-wp_cache_get/#post-8521097)
 * I ran into the same problem. I had to update the permalink settings after I fixed
   everything else. Now when I share my home page URL on Facebook I get this for
   my meta “Fatal error: Call to undefined function wp_cache_get() in /hermes/walnaweb10a/
   b2039/moo.ehrconcepts/wp-includes/option.php on line 1117”
 * What do you think is causing this… I think its only on our homepage.
 * ehrconcepts.com
 * Thanks
 *  [mpersinger](https://wordpress.org/support/users/mpersinger/)
 * (@mpersinger)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/call-to-undefined-function-wp_cache_get/#post-8582947)
 * Thanks for the help I had the same issue and now it is fixed. It was definitely
   W3 Total Cache causing the issue. Every time I upgraded WordPress to 4.7 it would
   run halfway thru the updates and then choke on the database upgrade and throw
   this error
 * PHP Fatal error: Call to undefined function wp_cache_get() in /wp-includes/option.
   php on line 1123, referer: /wp-admin/upgrade.php?step=upgrade_db
 * I tried deactivating W3TC and upgrading but same result. Admin will not load.
   Frontend working normal but admin stuck and won’t load.
 * As soon as I deleted /wp-content/w3tc-config/ everything started working again.
   
   I didn’t have to remove W3TC all I had to do was delete this one directory. After
   I got everything upgraded I turned W3TC back on and had no problems.
 *  [deco1974](https://wordpress.org/support/users/deco1974/)
 * (@deco1974)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/call-to-undefined-function-wp_cache_get/#post-8650199)
 * Hero! this is solved the problem, while updating to 4.7.1
 *  [Antonio](https://wordpress.org/support/users/sonorobit/)
 * (@sonorobit)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/call-to-undefined-function-wp_cache_get/#post-8704640)
 * Also fixed the issue by deleting the wp-content/w3tc-config/ folder, after that
   4.7.2 asked to do a database upgrade.
    -  This reply was modified 9 years, 4 months ago by [Antonio](https://wordpress.org/support/users/sonorobit/).
 *  [Kimberly](https://wordpress.org/support/users/amiga500/)
 * (@amiga500)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/call-to-undefined-function-wp_cache_get/#post-8707215)
 * i am curious what all of you have in common that might be causing this problem.
   I wonder if all of you are using object caching and/or database caching with 
   w3tc and when wordpress gets upgraded the process causes some wacky miscommunication
   to that type of cache leading to the fatal error. And so i wonder if w3tc isn’t
   disconnecting from it prior to the upgrade or not flushing it after the upgrade…
   if that even matters. Just me thinking aloud and likely isn’t the case.
 *  [Asif Somy](https://wordpress.org/support/users/x_mysterious_x/)
 * (@x_mysterious_x)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/call-to-undefined-function-wp_cache_get/#post-9325602)
 * in **/wp-content/w3tc-config** I deleted **master.php** and **master-admin.php**
   files and then activated plugin again. A new master file is generated in same
   folder and boom error is gone.

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

The topic ‘Call to undefined function wp_cache_get()..??’ is closed to new replies.

 * ![](https://ps.w.org/w3-total-cache/assets/icon-256x256.png?rev=1041806)
 * [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w3-total-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w3-total-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/w3-total-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w3-total-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w3-total-cache/reviews/)

 * 14 replies
 * 10 participants
 * Last reply from: [Asif Somy](https://wordpress.org/support/users/x_mysterious_x/)
 * Last activity: [8 years, 11 months ago](https://wordpress.org/support/topic/call-to-undefined-function-wp_cache_get/#post-9325602)
 * Status: not resolved