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. White Shadow says:

    @Eric Wood – If you mean fully automatic updates that’s currently not possible with this plugin or WP core. You would still need to click the “upgrade” link(s) when an update is available.

  2. Eric Wood says:

    I know that there can’t be fully automatic plugin updating, I’d just like my plug in to show on the list (have the yellow square)

  3. White Shadow says:

    @Eric Wood – Ah, I see. Automatic updates (in this sense) are only available for plugins hosted on wordpress.org. See : WordPress can host your plugin

  4. Eric Wood says:

    @White Shadow – I know that there can’t be fully automatic plugin updating, I’d just like my plug in to show on the list (have the yellow square)

    Thanks for your help!

  5. […] OneClick will certainly change the way you install plugin and theme on your WordPress. Once installed and used with OneClick Installer Firefox extension, it simplifies the effort to install both plugin and theme to just one single click without the use of any FTP upload. […]

  6. […] One Click Plugin Updater ဒါကေတာ့ plugin ေတြကုိ upgrade လုပ္ဖို႕ click တစ္ခ်က္နဲ႕ တင္အဆင္ေျပပါတယ္ … […]

  7. Walt says:

    Hi. I’ve used this plugin for quite awhile. However, I’ve noticed quite often when I click on the upgrade option it works for awhile and then I get a 500 error. The new version of the pluigin installs correctly, but the plugin is not activated. This happens about every other time I try a plugin upgrade.

    When I use the built-in WP function (when the One-Click plugin is not active) I never have the problem, and if I use Plugin Central to do the same thing, I never have a problem.

    What can I check to see what’s happening?

  8. Tanin says:

    The “Delete Cache” button on the wp-admin pages should not be visible for registered users, only for admins.

  9. Tanin says:

    Oops. My previous comment can be deleted.

    When I meant to say was:

    The “There are new versions available for…” box on the wp-admin pages should not be visible for registered users, only for admins.

  10. White Shadow says:

    @Walt – You can turn on “Debug mode” in Plugins -> Upgrade Settings and see if you can find any clues in the debug output that will be produced when you try to upgrade a plugin. Other than that I can’t suggest much – error 500 is a very generic error that doesn’t tell us anything about the nature of the problem.

    @Tanin – Good point, I’ll change it.

  11. Hello,

    I’m trying to use this plugin on a server that is protected by a firewall. What url address I have to setup on the firewall rules to allow it to “detect” plugins updates and install then ?
    Thanks

  12. White Shadow says:

    @Humberto Cruz – Updates are “detected” via api.wordpress.org and downloaded from an appropriate URL on downloads.wordpress.org

  13. Walt says:

    OK. I set the debug option on and tried a plugin update. It looked like it ran ok. At the end of the script it had this:

    Extraction succeeded.
    Upgraded plugin was active. It will be reactivated.
    Main loop finished.
    Should redirect to http://(mydomain).com/wp-admin/plugins.php?action=activate&plugin=search-unleashed%2Fsearch-unleashed.php&_wpnonce=83cb376aac
    (Debug version = redirection will not happen. Script execution finished.)

    Normally, at the end it just goes to the 500 “something didn’t happen” error. Do you need more information?

  14. Walt says:

    By the way, I forgot to mention- even though the script claimed “it would reactivate the plugin”, it did not….

  15. White Shadow says:

    @Walt – It didn’t reactivate because it was in debug mode, just as it says on the last line of the log. Judging from the part of the log you posted, everything went just fine with the upgrade – or so the plugin thinks. No ideas.

  16. Navjot Singh says:

    A error comes while updating the plugins: Fatal error: Call to a member function dprint() on a non-object in /home/navjot/public_html/dailysms/wp-content/plugins/one-click-plugin-updater/do_update.php on line 127

  17. White Shadow says:

    @Navjot Singh – As far as I know it is impossible to get this error [in the current version] except if you somehow manage to launch an installation/upgrade while the updater plugin is deactivated. Which should be impossible. Mhm.

    … Not that this helps anything 😛

  18. For the last couple of versions I have not been able to install plugins, and to update them I have had to disable the plugin and use standard wordpress. This is the error I am getting when I try to install a plugin and when I turn on debugging I get pretty much the same info when trying to do an update:

    Plugin Installed

    However, I couldn’t verify that it really is a plugin. Hmm.

    View installation log
    Downloading ‘http://downloads.wordpress.org/plugin/cross-linker.1.3.2.zip’…
    Downloaded 15839 bytes.
    Will save the new version archive (zip) to a temporary file ‘/wp-content/plugins/one-click-plugin-updater/plg078c96f15341dbab189f5dd346b2e8e3.zip’.
    About to extract ‘/wp-content/plugins/one-click-plugin-updater/plg078c96f15341dbab189f5dd346b2e8e3.zip’.
    Extracting files from /wp-content/plugins/one-click-plugin-updater/plg078c96f15341dbab189f5dd346b2e8e3.zip…
    So far, the type is set to ‘plugin’.
    gzopen() found, will use PclZip.
    PclZip failed!
    PclZip says : ‘PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature’
    PclZip unavailable, using unzip.
    Extracting files from /wp-content/plugins/one-click-plugin-updater/plg078c96f15341dbab189f5dd346b2e8e3.zip…
    So far, the type is set to ‘plugin’.
    Running the unzip command.
    unzip returned value ‘0’. unzip log :
    Array

Leave a Reply