Update WordPress and W3 total cache plugin error

Published by Tobias Hofmann on

2 min read

WordPress is easy to update … if everything works. I updated my WordPress version many times without problems, patches are installed automatically. Only minor versions I do install manually. Last time I updated, an error happened. Luckily, not for my users, the public site was up and running. My admin site (wp-admin) was broken. To be more precise: the update was not completed. While loading the update page to trigger the DB update, I got an error message: not found.

Looking at the web server log, I could see that something went wrong with a PHP call:

PHP Fatal error:  Call to undefined function wp_cache_get() in /var/…/wp-includes/option.php on line 1123

I use a plugin called W3 total cache for speeding up the loading of my site. My idea was to uninstall this plugin and see if it works again. Problem: how to uninstall a WordPress plugin without being able to log in? During running an update? Of course, if you do not try, you do not learn. First step was to do a backup (yeah …). Next step was: delete the plugin manually. This I did by deleting/moving the W3tc related files.

  • /wp-content/plugins/w3-total-cache
  • advanced-cache.php
  • db.php

After this I accessed /wp-admin again and could complete the WordPress upgrade of the database. The W3-total-cache plugin was not installed anymore, so I reinstalled it.

Why reinstalling a broken plugin? The plugin is (as of the writing of this text) not compatible with my WordPress version. Therefore, I only install it to remove the plugin. I did so manually and to keep my WordPress installation not a total mess, I want to delete the plugin the official way. In the dashboard > Plugins > Installed Plugins the plugin is listed. Instead of activating it, I am going to delete it.


Next step is to install another cache plugin.

Let the world know
Categories: Technology

Tobias Hofmann

Doing stuff with SAP since 1998. Open, web, UX, cloud. I am not a Basis guy, but very knowledgeable about Basis stuff, as it's the foundation of everything I do (DevOps). Performance is king, and unit tests is something I actually do. Developing HTML5 apps when HTML5 wasn't around. HCP/SCP user since 2012, NetWeaver since 2002, ABAP since 1998.


Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.