WordPress Question: Why Do Plugins Disappear When Auto-Update Fails?

Hey folks – we’re currently asking our readers to send in questions about WordPress, the best of which we will publish here on the blog. Please submit your own WordPress question for a chance to win a free membership at WPMU DEV.

Today we’ve got a question about automatic updating problems with WordPress plugins, from a WPMU reader by the name of Gobi.

Why do WordPress plugins disappear when their automatic upgrades fail?Why do WordPress plugins disappear when the automatic update fails?

This causes all sorts of visual destruction to my site, and often requires an FTP session to reinstall the original files.

Isn’t there a better way for a plugin upgrade to fail?


Have you ever experienced a similar issue? Do you know how this problem can be resolved? If you have any ideas, please leave a comment below and let us know. Gobi will be grateful!

Don’t forget to send us your own question about WordPress. There’s a three month membership at WPMU DEV up for grabs every day. You should also check out yesterday’s WordPress question if you haven’t already.

Featured Plugin - WordPress Google Maps Plugin

Simply insert google maps into posts, sidebars and pages - show directions, streetview, provide image overlays and do it all from a simple button and comprehensive widget.
Find out more

Image credit: Update button concept from Bigstockphoto.

Comments (8)

  1. As of my knowledge this is “regular” behavior…
    The logic behind is this: In WordPress if an active plugins’ folder gets renamed or deleted then WordPress deactivates this plugin automatically because it can no longer detect its main plugin file.

    And note the following which happens during an automatic plugin update: WordPress removes the plugin folder with the files, uploads the updated plugin folder/files an re-activates it.

    So if the update failes it will be in the most cases that import plugin files still not there or the whole upload process failed so there’s no new folder with new files. So WordPress cannot re-activate and detect this plugin anymore. Verdict: plugin no longer there and WordPress cannot list it.

    The only sulotion would be: re-upload via FTP. If you have ongoing update problems you should check your internet connection and/or your server settings. Some servers/hosting providers have strange settings so you might have to include some constansts or paths in your wp-config, most definitely regarding the temp folder settings for PHP… In the meantime updates via FTP should always work :-)

    Hope this helps a bit, Dave from Germany :)

  2. If i remember correctly, When you update a plugin from the admin panel the flow is something like this:

    * WordPress Downloads the New Version.
    * WordPress Unpacks the update…
    * WordPress Installs the latest version…
    * WordPress Removes the old version of the plugin…
    * WordPress Try’s to reactivate the plugin (new version)…
    and hopefully you get
    ” Plugin updated successfully. ”

    but if not you can see that a part of the update sequence (this one: “* WordPress Removes the old version of the plugin…”) is actually removing the plugin so if the update fails there is no old version to fallback to which causes “all sorts of visual destruction to your site”.

    As for “Isn’t there a better way for a plugin upgrade to fail?”
    currently this is the only way WordPress knows how to update plugins but there are a few alternatives such as using version control systems (SVN,GIT,FOSSIL …) to update the plugins easily and you will also have the older versions to go back to if something goes wrong.

    There is also another project on github called “Theme-Updater” which is quite nice in the way that it also creates a backup of older versions and lets you revert back to them in a single click form the admin panel, so it shouldn’t be that hard to port that to plugin update system.

  3. Since upgrading to the latest WordPress version, all my plugin auto-updates fail. They then get automatically dropped from the plugin list.

    I have found the way around this is before you do an auto-update, deactivate the old plugin first. Then it upgrades and activates smoothly.