WordPress 2.5 Automated Plugin Updater

WordPress users have long complained about the time and effort required to update all of their plugins. WordPress 2.5 RC1 introduces a new feature that allows you to update plugins to their latest version simply by clicking a link and entering your FTP password.

I’ve tried this out on a test installation of WordPress, and it’s great. There are, however, a few issues with this new feature.

The automatic upgrade does not deactivate your plugin first and then reactivate it after upgrading. If the plugin requires activation to run any checks for WordPress version, or do any db fixes, or “activate” any new features then it won’t do this and the plugin won’t work as expected. In most cases this can be simply remedied by remembering to deactivate and then reactivate the plugin after the upgrade is complete.

This is important because plugins sometimes update database entries when a plugin is re-activated after an update. So if you use the automated updater, be sure to deactivate and re-activate the plugin after the update has completed, to insure that the plugin will continue to work correctly.

If the plugin is in the plugins root directory instead of it’s own directory then the automatic upgrade will change it’s location. For example say you have a plugin named myfunplugin.php and it’s located at ../wp-content/plugins/myfunplugin.php – after automatic upgrade does it stuff the plugin will now be located at ../wp-content/plugins/myfunplugin/myfunplugin.php. This could be a breaker for any plugin that has functions referencing the original location of the plugin.

Some plugins, my own GoCodes plugin included, break if they are renamed or moved into a subdirectory. Many plugin authors are likely working on fixes for this (myself included). If a plugin stops working after updating it, it may be because of this. The solution? Use your FTP client to move the plugin file back to the /wp-content/plugins/ directory.

Exercise caution when using this new feature, if you have upgraded your WordPress installation already. Be aware that you may have problems when updating plugins in this easier manner, and you may have to fix issues caused by the system.

  • http://unfoldingneurons.com Darren

    Just an update that some changes that have made it into the trunk version of WP 2.5 since I posted my article make it so that plugins <em>are</em> now deactivated when upgrading and then a reactivation attempt is made.  It looks like the issues I raised about the Automatic updater are being addressed :)

  • http://www.webmaster-source.com Matt

    Well, I guess some of the changes I made to my GoCodes plugin weren’t necessary then… :D