Single Click Plugin Updater WordPress Plugin

This plugin extends the plugin update notification feature introduced in WordPress 2.3 by adding an “update automatically” link to update notifications. When you click the link, the new version of the corresponding plugin is downloaded and installed automatically. It also lets you know which plugins have update notifications enabled.
Update 06.04.2008 : Version 2.0.1 with much more features is out. More info here.

Download it now! (37 Kb)

How It Works (In Detail)

To be able to display the new link this plugin will hide the original update notification and display a slightly modified one. Here’s what happens when you click the “update automatically” link :

  1. If the plugin that needs to be updated is active, it is deactivated.
  2. The Plugin Updater retrieves the plugin’s page from WordPress.org and finds the download link.
  3. The new version is downloaded and extracted to the wp-content/plugins directory (this directory must be writable by the Updater plugin).
  4. If necessary, the updated plugin is re-activated.

All this happens in the background, so if everything works OK you’ll end up back at the “Plugins” tab. If there are any errors the plugin will display an error message and abort the upgrade.

Requirements

  • WordPress 2.3 or newer.
  • CURL library installed or allow_url_fopen enabled in php.ini. If you don’t know what that means, don’t worry – at least one of these is available on most webservers by default.
  • The /plugins directory must be writable by WordPress. The exact file permissions depend on the server configuration. Read more about file permissions. 666 or 755 may be sufficient, and 777 will always work, though this is not recommended due to security risks.

The plugin has been tested and works under Firefox 2.x, Opera 9.x and, as of version 1.0.5, Internet Explorer.

Installation

To install the plugin, please follow these steps:

  • Download the one-click-plugin-updater.zip file (below) to your computer.
  • Unzip the file.
  • Upload “one-click-plugin-updater” folder to the “/wp-content/plugins/” directory.
  • Activate the plugin through the ‘Plugins’ menu in WordPress.

That’s it.

Download

one-click-plugin-updater.zip (40 Kb)
CC-GNU GPL

Related posts :

535 Responses to “Single Click Plugin Updater WordPress Plugin”

  1. Rob says:

    Just to say I hope you keep developing this plugin — it works really well for me … where the new one built-in to WP 2.5 doesn’t.

    Thanks

  2. White Shadow says:

    I’m not certain on this.

    This plugin is becoming obsolete with the introduction of the auto-upgrade function in WordPress core. On the other hand, the WP’s own version isn’t perfect either.

    I have just started testing 2.5-RC1. I guess I’ll see how it goes.

  3. Daniel says:

    Well, I have like 5 installation of the 2.5rc1 and auto upgrade does not work… so saying this plugin is obsolete is not correct

  4. ovizii says:

    just upgraded to 2.5 and I must say I will continue usign this plugin because:

    – this plugin marks “tracked” plugins by a small yellow line making it easy for me to manually check and update those plugins that are not automatically tracked
    – if I enable this plugin it automatically overrides the builtin update notification of wp 2.5 so there is no problem whatsoever
    – the builtin function asked me for my ftp credentials this plugin does not but still works for me, so I guess the checks wp has in place are much too strong 🙂

  5. White Shadow says:

    Thanks 🙂
    By the way, I have a few ideas for new features and fixes to implement, but I’ve been putting it off for a long time (lots of other stuff to do). Maybe, with the new WP version coming out, I’ll finally get around to it.

  6. […] still sticking with my own updater, as it seems to be more stable. I will also be adding some new features to that plugin… That […]

  7. Graeme says:

    Just trying to install a new plugin and I get this:

    Fatal error: Call to a member function dprint() on a non-object in /home/xxxxxxxx/public_html/wp-content/plugins/one-click-plugin-updater/oneclick-plugin-updater.php on line 574

    after it asks “Are you sure you want to install this plugin?”

  8. White Shadow says:

    It’s a simple bug, I’ll fix this immediately and upload the changes to WordPress.org. It should be up within 20 minutes.

    BTW, you can expect this new version to have some bugs – there’s lots of changes to the code and I can’t exhaustively test everything. Also, I was just about to write an extensive post about this version.

  9. […] Click Updater Plugin 2.0 This version of the WordPress plugin has a lot of new features, and, quite probably, a lot of new bugs, too. In fact, it’s so […]

  10. Graeme says:

    Now, the “Update now” option for a plugin has gone. So not actually “one click” updating at the moment.

  11. White Shadow says:

    Arrgh, I know, sorry. There’s a bug that only occurs in WP 2.3.x, it’ll be fixed by tomorrow.
    😛

  12. Simon says:

    I found an other bug:
    the installer is trying to do something in the root directory, and can’t install because of

    “Warning: mkdir() [function.mkdir]: open_basedir restriction in effect. File(/) is not within the allowed path(s): …”

    I don’t think this is supposed to be like that?

  13. White Shadow says:

    Yes, it isn’t supposed to do that. There was a bug where it tries to make a directory at “/” when the zip file contains an empty root directory, but I thought I’d fixed that. Are you sure you’re using the very latest version (2.0.3)?

  14. Diego says:

    Same here: after installing One Click Updater in WP 2.5, the “Update now” option that appears under the plugins is gone. So not actually “one click” updating at the moment.

    I would also like to suggest a feature: I used to like the ability to see which plugins required an upgrade in the upper side of all admin pages that the “Global Plugin Update Notice” provided, but apparently the two plugins can’t work together now in WP 2.5… Could you insert the feature in your plugin?

    Cheers, and congrats for a great plugin!

    Diego
    http://www.drbolsa.com

  15. White Shadow says:

    Make sure your browser reloads the plugin’s stylesheet (either F5 or Ctrl+F5 on the “Plugins” page). The new version has a different stylesheet, and the update rows will be invisible if it isn’t refreshed.

    The “Global Notice” plugin works, but it displays the default upgrade link, not the one this plugin uses. This is – technically – not wrong (it’d take a while to explain why).

    Anyways, I think I could add this feature to my plugin as well.

  16. Chris Masse says:

    I use your plugin with WP 2.5. It rocks. It is my most useful plugin. Thanks a lot.

  17. Simon says:

    With the new version 2.0.4 the problem with the root directory isn’t there anymore, but now it tries to create a directory /home/ (that’s from the absolute path!) (error: Can’t create directory ‘/home/!’)
    I was trying to install ‘http://downloads.wordpress.org/plugin/nextgen-smooth-gallery.0.10.zip’
    the error was:
    ‘Warning: mkdir() [function.mkdir]: open_basedir restriction in effect. File(/home/) is not within the allowed path(s):’
    Well I’ll just wait for a working version and report bugs in the mean time.
    And yes I am always using the very latest version from http://downloads.wordpress.org/plugin/

  18. Diego says:

    Hi again White!

    I upgraded to your new 2.04 version and now, whenever I try to update a plugin (by clicking “update now” under the plugin) I get this:

    Warning: mkdir() [function.mkdir]: SAFE MODE Restriction in effect. The script whose uid/gid is 21835/21835 is not allowed to access /mounted-storage/ owned by uid/gid 0/0 in /mounted-storage/home58a/sub001/sc30883-FDZZ/xxx.com/wp-content/plugins/one-click-plugin-updater/oneclick-plugin-updater.php on line 669

    Can’t create directory ‘/mounted-storage/’.

    The full installation log is below :
    Checking to see if /mounted-storage/home58a/sub001/sc30883-FDZZ/xxx.com/wp-content/plugins/ is writable.
    Okay.
    Nonce verification passed.
    About to upgrade 1 plugins.
    Upgrading ‘headspace2/headspace.php’, download URL is ‘http://downloads.wordpress.org/plugin/headspace2.zip’.
    The plugin that needs to be upgraded is not active. Good.
    Downloading ‘http://downloads.wordpress.org/plugin/headspace2.zip’…
    Downloaded 427611 bytes.
    Will save the new version archive (zip) to a temporary file ‘/tmp/PLG0vPWeX’.
    Warning: couldn’t create a temporary file at ‘/tmp/PLG0vPWeX’.
    Using alternate temporary file ‘/mounted-storage/home58a/sub001/sc30883-FDZZ/xxx.com/wp-content/plugins/one-click-plugin-updater/PLGddpwbv’.
    About to extract ‘/mounted-storage/home58a/sub001/sc30883-FDZZ/xxx.com/wp-content/plugins/one-click-plugin-updater/PLGddpwbv’.
    Extracting files from /mounted-storage/home58a/sub001/sc30883-FDZZ/xxx.com/wp-content/plugins/one-click-plugin-updater/PLGddpwbv…
    So far, the type is set to ‘plugin’.
    Need to load PclZip.
    gzopen() found, will use PclZip.
    Starting extraction to folder ‘/mounted-storage/home58a/sub001/sc30883-FDZZ/xxx.com/wp-content/plugins/’.
    Creating directory ‘/mounted-storage/’
    Can’t create directory ‘/mounted-storage/!’
    Main loop finished.

    I cannot use the FTP mode, even the original added to WP 2.5, it never worked for me.

    Thanks again for your great plugin.

  19. White Shadow says:

    As I commented on a different post, this apparently happens because the PHP system function is_dir() reports (incorrectly) that the directory in question (“/home/” or “/mounted-storage/”) doesn’t exist. That’s why the plugin tries to create it, and fails – because the directory actually does exist and the plugin doesn’t have the privileges to modify it.

    Now I need to find out why is_dir() doesn’t work….

  20. Diego says:

    Great, man!! You fixed it with this new release!!! 😀

    Cheers!

    Diego

Leave a Reply