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 :
- If the plugin that needs to be updated is active, it is deactivated.
- The Plugin Updater retrieves the plugin’s page from Wordpress.org and finds the download link.
- The new version is downloaded and extracted to the wp-content/plugins directory (this directory must be writable by the Updater plugin).
- 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)

[...] 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 [...]
Now, the “Update now” option for a plugin has gone. So not actually “one click” updating at the moment.
Arrgh, I know, sorry. There’s a bug that only occurs in WP 2.3.x, it’ll be fixed by tomorrow.
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?
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)?
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
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.
I use your plugin with WP 2.5. It rocks. It is my most useful plugin. Thanks a lot.
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/
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.
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….
Great, man!! You fixed it with this new release!!!
Cheers!
Diego
No, I didn’t
I just added a workaround for the buggy function; it’s not really “fixed” yet.
[...] One Click Plugin Updater 2.0.5 » Janis Elsts (url) Upgrade plugins with a single click, install new plugins or themes from an URL or by uploading a file, see which plugins have update notifications enabled, control how often WordPress checks for updates, and more. Beta. [...]
1. Thanks again for your plugin, which I use with WP2.5. Better than the wordpress mechanism.
2. Hey, maybe there is a little bug. See on that page, See the 7th comment here:
vincentprat.info/dev/forums/feature-requests/user-roles-e-mail-address/page-1/post-38/
Again, thanks a lot.
Chris Masse
I looked at the forum post, and it looks like it might be a bug. Can you provide a bit more information about how it happened? Did you use the “Upgrade All” link? And were there any error messages?
Hi,
Yes, I clicked on “update all”.
No, there was no error message or else.
It upgraded, and then deactivated one active plugin and activated the inactive one, from the same author.
The list of my plugins:
midasoracle.org/about/software/
WP 2.5
FireFox 2.0.01.3, Windows Me
Thanks,
Chris Masse
I think I’ve found the bug. I fixed it, and version 2.0.6 will be up soon.
Great. Thanks a lot.
Have a great week.
Chris Masse
Hi Whitey,
I’m getting the same error (or very similar) again:
Warning: file_put_contents() [function.file-put-contents]: SAFE MODE Restriction in effect. The script whose uid/gid is 21835/21835 is not allowed to access /mounted-storage/home58a/sub001/sc30883-FDZZ/secretia.com/wp-content/plugins/copyfeed/copyrightfeed owned by uid/gid 99/99 in /mounted-storage/home58a/sub001/sc30883-FDZZ/secretia.com/wp-content/plugins/one-click-plugin-updater/oneclick-plugin-updater.php on line 730
Warning: file_put_contents(/mounted-storage/home58a/sub001/sc30883-FDZZ/secretia.com/wp-content/plugins/copyfeed/copyrightfeed/copyrightfeed.php) [function.file-put-contents]: failed to open stream: No such file or directory in /mounted-storage/home58a/sub001/sc30883-FDZZ/secretia.com/wp-content/plugins/one-click-plugin-updater/oneclick-plugin-updater.php on line 730
Can’t create file ‘copyfeed/copyrightfeed/copyrightfeed.php’ in ‘/mounted-storage/home58a/sub001/sc30883-FDZZ/secretia.com/wp-content/plugins/’
The full installation log is below :
Checking to see if /mounted-storage/home58a/sub001/sc30883-FDZZ/secretia.com/wp-content/plugins/ is writable.
Okay.
Nonce verification passed.
About to upgrade 1 plugins.
Upgrading ‘copyrightfeed/copyrightfeed.php’, download URL is ‘http://downloads.wordpress.org/plugin/copyfeed.zip’.
The plugin that needs to be upgraded is active. Deactivating.
Downloading ‘http://downloads.wordpress.org/plugin/copyfeed.zip’…
Downloaded 178049 bytes.
Will save the new version archive (zip) to a temporary file ‘/tmp/PLGWug4n5′.
Warning: couldn’t create a temporary file at ‘/tmp/PLGWug4n5′.
Using alternate temporary file ‘/mounted-storage/home58a/sub001/sc30883-FDZZ/secretia.com/wp-content/plugins/one-click-plugin-updater/PLGuxzwad’.
About to extract ‘/mounted-storage/home58a/sub001/sc30883-FDZZ/secretia.com/wp-content/plugins/one-click-plugin-updater/PLGuxzwad’.
Extracting files from /mounted-storage/home58a/sub001/sc30883-FDZZ/secretia.com/wp-content/plugins/one-click-plugin-updater/PLGuxzwad…
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/secretia.com/wp-content/plugins/’.
Extracting copyfeed/readme.txt
Extracting copyfeed/screenshot-1.png
Extracting copyfeed/screenshot-2.png
Creating directory ‘/mounted-storage/home58a/sub001/sc30883-FDZZ/secretia.com/wp-content/plugins/copyfeed/copyrightfeed/’
Extracting copyfeed/copyrightfeed/copyrightfeed.php
Found a plugin header! The plugin is : ©Feed
Can’t create file copyfeed/copyrightfeed/copyrightfeed.php in /mounted-storage/home58a/sub001/sc30883-FDZZ/secretia.com/wp-content/plugins/!
Main loop finished.
Thanks for your help
Fixed again with your new version. Sorry!
Nope… Actually, the update automatically worked with an inactive plugin, but not with an active one….
Ahh, this is confusing!
So what happened when you tried to upgrade an active plugin? Did you get the same error, or did it get deactivated, or what?
Ooops! Now it is working! I got the error only when trying to update the @Feed Plugin, and then it kept happening for a while because of the “Security Mode” the server gets into when something happens… Now I tried with 4 other plugins (2 on-2off) and it worked!
Damn…! It IS confusing. I got the error again. Apparently, it happens with some plugins and not with others: now it happened when updating th “Add Lightbox” plugin…
Maybe it only happens with plugins that have deeply nested directories? For example, the log you posted shows it failed when it tried to create a file in ” copyfeed/copyrightfeed/” (a nested plugin folder), but it extracted files to “copyfeed/” with no problems. What do you think?
Hi,
After updating the plugins, the line reads: “Plugin activated.”. Maybe it should read “Plugin(s) updated”.
I’ve thought about that, but it’s much easier to do it this way.
When the plugin that needs to be upgraded is active, the updater will do all the installation/upgrade stuff and finish by telling WP to reactivate the plugin. So essentially it passes control back to WP, which performs the reactivation and displays the “Plugin activated” message (it’s a bit more complex when upgrading multiple plugins).
I might be able to get my own status message in there (I’m not yet sure if there’s a hook for that), but it would be a more complex and possibly less stable solution.
Anyway, someday I will.
I’m getting the following error when I try to run an update:
The archive format is not supported.
The full installation log is below :
Checking to see if /home/imsoper/public_html/rifilmfestival.com/wp-content/plugins/ is writable.
Okay.
Error reporting set to E_ALL.
Nonce verification passed.
About to upgrade 1 plugins.
Upgrading ‘cforms/cforms.php’, download URL is ‘http://downloads.wordpress.org/plugin/cforms.8.2.zip’.
The plugin that needs to be upgraded is not active. Good.
Downloading ‘http://downloads.wordpress.org/plugin/cforms.8.2.zip’…
Downloaded 922547 bytes.
Will save the new version archive (zip) to a temporary file ‘/tmp/PLGxeExjV’.
About to extract ‘/tmp/PLGxeExjV’.
Extracting files from /tmp/PLGxeExjV…
So far, the type is set to ‘plugin’.
Need to load PclZip.
gzopen() found, will use PclZip.
PclZip failed!
Main loop finished.
I just tried it on my blog and it worked fine. Therefore, the problem is somewhere in your server configuration. It’s hard to say exactly where with the available information.
Have you tried updating or installing other plugins? If yes, did it work?