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)

October 20th, 2007 at 5:51 am
Doesn’t work. I have been using the one click installer for some time, but this one does not work at all. It displays the same message every time: “Error : couldn’t unzip the new version of the plugin.”
October 20th, 2007 at 1:11 pm
File permissions are probably to blame; though if the Oneclick installer works, I’ll have to see how it does that.
October 23rd, 2007 at 7:29 am
Hi. Also like the idea of this, but it does seem to require the zlib extensions to php be enabled. I have enabled them (off by default on my host, and yet it still claims they are not available. Does this all ring true? I’m uncommenting the line `extension=zlib.so` in my php.ini file for php5.
Thanks.
October 23rd, 2007 at 2:05 pm
Hey,
Looks like the zlib extension is required by the PclZip library which this plugin uses to unzip files. I didn’t write that library, so I don’t know much about troubleshooting it…
A Google search tells me you need to restart the webserver for the new php.ini to take effect. You could also try phpinfo() to see if the zlib extension is actually being loaded.
Meanwhile, I have uploaded a slightly modified version of the plugin that will now correctly fall back to using exec() to run unzip (the unix binary) when zlib is not available.
October 26th, 2007 at 12:28 pm
The plugin does not seem to be updating the others. It seems to run fine but the plugins don’t get updated.
October 26th, 2007 at 2:03 pm
This is probably a file permission issue again. Try temporarily setting your plugins directory to 777 (writable by anyone) and see if it works them. I’ll also upload a minor update of the plugin shortly that should be able to report the problem more accurately.
October 26th, 2007 at 2:55 pm
[...] Visit [...]
October 26th, 2007 at 4:38 pm
Hello again,
It was working very well, even with permissions at 755, which is great. But I just auto updated to the latest version 1.0.3, then an hour later tried to update Broken Link Checker to 2.2.1, and clicking on the update automatically link results in a blank page (like a php error or something).
They may not be related. Sorry.
October 26th, 2007 at 5:03 pm
In the version 1.0.3 I made slight changes to how this plugin determines whether it can write to the plugins directory. However, if this was the cause for your problem, there should be an explicit error message displayed. All I changed in broken link checker was that it would display an error message if CURL wasn’t available. Have you tried updating it manually? What about automatically updating other plugins?
I’ll need to do more testing before I can suggest anything.
October 27th, 2007 at 1:11 am
I just get the error,
Fatal error: Call to undefined function: is__writable() in /home/pagani/public_html/wp-content/plugins/one-click-plugin-updater/oneclick-plugin-updater.php on line 134
It doesn’t appear to be a permissions error. No change in permissions gets rid of this undefined call error.
October 27th, 2007 at 1:33 am
It’s a bug. I got it fixed, but I forgot to upload the newest version, sorry!
This should work.
I keep forgetting one needs to be very careful when releasing something that “works for me” to the public :/
October 27th, 2007 at 4:21 am
FWIW, this new version fixed my problem. Thanks!
October 27th, 2007 at 5:00 am
I found a bug!
This does not work in internet explorer 6. ( there is no auto update link when using internet explorer.
Please, can you fix that?
October 27th, 2007 at 5:01 am
and BTW, it works great in FF. Thanks a lot for your time!
October 27th, 2007 at 7:05 pm
It didn’t work in IE because Internet Exploder doesn’t support CSS2 very well. I’ve rewritten the CSS and it now works in IE (as in “it worked the one time I tried it”
).
October 28th, 2007 at 1:21 pm
Why is it that once I automatically update the plugins, I get duplicates. An old one and the new one. Is it possible that the old one be removed automatically or is it just me?
Anyways nice plugin, great for lazy people (or shall we say busy =) ) like me.
Swift
October 28th, 2007 at 2:03 pm
This hasn’t happened to me, but it might be possible when the old & new versions have different directory/file structure. This should be pretty rare.
I could make it delete the old plugin before/after downloading the new one, but that would be dangerous, e.g. there might be some config or cache files in the old plugin’s directory which would get deleted, too. So I won’t be doing that.
October 29th, 2007 at 6:49 am
Not working for me probably due to my not-so-good knowledge of things. It would be great if it could be like the “Automatic Wordpress Upgrade” where I can enter the details of the ftp, etc and let the program do the rest.
I have so many plugins in the /plugins directory that changing their file attrib takes such a long time that I want to just give it up.
October 29th, 2007 at 12:26 pm
Hey, Krishna, you don’t need to set the permissions for each file/folder in the /plugins directory! Just set the permissions for the /plugins directory itself.
October 29th, 2007 at 6:50 pm
Hey, I just thought I’d point out how much I love this plugin. Love it!
Might I offer an idea for a future version, or for a separate plugin? I’d like some visual indicator, on the plugins page, of which plugins are not being checked (i.e., if they are not in the wordpress.org/extend site), so I know to continue checking them manually every so often.
Thank you!
October 29th, 2007 at 8:03 pm
Yeah, I’ve already heard that idea somewhere else; unfortunately that would be hard to do because the wordpress.org API is undocumented and from the source code of WP I don’t see any suitable functions.
There is one “hack” I could try; maybe in some future version
November 2nd, 2007 at 12:40 am
[...] One Click Updater - Adds an “update automatically” link to plugin update notifications. [...]
November 6th, 2007 at 2:54 am
[...] Single Click Plugin Updater WordPress Plugin Detta plugin gör det mycket enkelt att ladda ner och uppdatera dina WordPress plugins. För att detta skall fungera krävs det att du använder version 2.3 eller nyare. [...]
November 7th, 2007 at 6:54 am
[...] OneClick Plugin Updater adds on to the functionality of the built-in WordPress plugin update notification. It lets you update the plugin with one-click right on the Plugins screen. [...]
November 7th, 2007 at 9:18 pm
[...] added a new feature to my single-click WorPress plugin updater - now you can see which of your plugins are checked for updates. Those plugins that have update [...]
November 7th, 2007 at 9:19 pm
Very impressive!
Great piece of software!!
November 8th, 2007 at 4:29 am
[...] One Click Plugin Updater - This is supposed to update my plugins with one click. It notifies me when one of the plugins has a new version, but throws an error when I try to upgrade something. [...]
November 14th, 2007 at 1:49 pm
@White Shadow “This hasn’t happened to me, but it might be possible when the old & new versions have different directory/file structure. This should be pretty rare.”
Yeah, that happened to me with a plugin that was once just a file while the update was a folder. The plugin was installed, but Wordpress only recognized the older one until I realized the problem and deleted it.
November 14th, 2007 at 2:07 pm
Mhm, that’s exactly what I was talking about. And since it’s not really a bug, there’s no “fix” either.
November 26th, 2007 at 5:42 pm
[...] One Click Plugin Updater - extensie pentru Wordpress 2.3 care îţi actualizează automat plugin-urile instalate. [...]
November 30th, 2007 at 2:40 pm
I think we should use “unzip -fod $somewhere $zipfile” instead “unzip -d ……”
-o to overwirte and -f to only overwrite newer file
November 30th, 2007 at 2:49 pm
Err, okay, that sounds right. I’ll update the plugin.
Originally I just glanced this fallback method from another WP plugin without checking all the details
December 1st, 2007 at 6:20 am
I keep hoping this one will work for me with every update!
Haven’t got there yet, though. I always get error messages like this:
Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /home/pagani/public_html/wp-content/plugins/one-click-plugin-updater/oneclick-plugin-updater.php on line 191
Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /home/pagani/public_html/wp-content/plugins/one-click-plugin-updater/oneclick-plugin-updater.php on line 191
Warning: Cannot modify header information - headers already sent by (output started at /home/pagani/public_html/wp-content/plugins/one-click-plugin-updater/oneclick-plugin-updater.php:191) in /home/pagani/public_html/wp-content/plugins/one-click-plugin-updater/do_update.php on line 89
December 1st, 2007 at 12:20 pm
Heh, hoping alone won’t get you anywhere, error reporting might
Okay, I’ll look into it, but if you’ve got Safe mode on it can be tricky…
December 1st, 2007 at 8:54 pm
Hi, The plug seems to wok, i have the upgrade link but when I use it it does nothing, I’ve got no error message, just the “plug in actevated” message on top of the plugin page but no upgrade. Evzerything is at 777, my plugin folder, all my plugins… Any idea?
December 1st, 2007 at 9:57 pm
Hey, if it shows “plugin activated”, it should have worked. Maybe it’s one of the cases when the new version has a different directory structure. Check if there are two instances of the “non-updated” plugin in the plugin list…
I looked through the code again and I’m pretty sure that if any step of the upgrade process fails, there should be at least some kind of error message.
December 2nd, 2007 at 6:24 am
Well, I’m on a hosted web service so I don’t know if there is a safe mode actually involved or not. I know it’s a linux machine running Apache 1.3.39, PHP v 4.4.7 and MySQL 4.1.22-standard.
Mostly, everything related to Wordpress and its plugins work fine. I had one theme once that had that “headers already sent” error when posting a long time ago, but that’s it.
December 2nd, 2007 at 2:19 pm
The error messages suggest it’s either safe mode or open_basedir restrictions, but that shouldn’t matter with the newest (1.1.3) version. The “headers already sent” message shows up as a consequence to those first errors, so it doesn’t really mean anything in this particular case.
December 2nd, 2007 at 9:14 pm
Well, this is interesting. With the latest version (1.1.3) I no longer get those errors shown above (open_basedir, safe mode) - in fact, I get no error messages at all…
..BUT, nothing actually updates. I click “update automatically”, there’s a pause (as you’d expect) then the plugins page reloads - the note at the top says “Plugin activated” (as you’d expect to see when one click updater works right) - BUT the plugin STILL says “a new version is available..” and the operating version is the old one, etcetera. Like nothing happened. I have three plugins that need an update and I got the same results on all of them.
Now, that’s still a big improvement from just getting all those error messages, but since I’m not getting any error messages, I don’t understand why the plugins are not actually updated.
I’m not running any caching programs/plugins, for what it’s worth.
December 2nd, 2007 at 9:32 pm
Hmm, sounds similar to what LGDA said (above).
I could make a special debug version of the plugin that would log everything it is doing step-by-step. Would you be OK running it for testing purposes?
December 2nd, 2007 at 9:37 pm
OH also btw, I’m NOT ending up with two versions as with some other people. I have to set perm to 777 or I get a ‘not writable’ error message, but when I get no messages at all, I’m also not getting any update at all.
December 2nd, 2007 at 9:38 pm
Sure, I’ll try anything
December 2nd, 2007 at 10:13 pm
Great, I’ll send you an email.
December 4th, 2007 at 12:24 am
Hiho! seems to be a VERY useful little piece of code - thanks a lot!
for some reason it refuses to work on one of my servers - gives me a 406
“An appropriate representation of the requested resource /wp-content/plugins/one-click-plugin-updater/do_update.php could not be found on this server.”
The file is there, permissions are ok. Any idea what could cause this?
December 4th, 2007 at 12:41 am
That’s a weird error. And I don’t think it’s caused by the plugin… Might be something with your browser or server configuration. Try it in a different browser perhaps? Or maybe the plugin didn’t upload properly to the server, you could try uploading it again.
December 4th, 2007 at 12:46 am
hmmm… I have a bunch of other plugins running (thats why I need yours…
) and no problems. Your plug can be installed/activated, but whenever I try to autoupdate a plugin, this 406 error shows up… Standard Firefox 2.x on Mac, standard Linux hosting at Hostnine… nothing special.
Will try some more things tomorrow and report back!
Thanks for your lightning-fast answer!
December 4th, 2007 at 1:54 am
This might also help you - HTTP 406 Error
There’s also a less radical solution.
December 4th, 2007 at 5:48 am
Hi White Shadow, I that I’m not the only one. If you need mo testerz holla at me (dont worry I’m french, my english come from songs I heard, lol). I’m really interested on the special debug version too! I’ll be back…(from movies too)
December 4th, 2007 at 4:51 pm
@MacVids : Here’s something to try -
Create a .htaccess file in your “one-click-plugin-updater” directory and put these lines in it :
@LGDA : Try this debug version. I’ve also made a few changes that might make it work… maybe.
December 4th, 2007 at 10:27 pm
Shadow, you are da hero!
I killed this mod_wannabesecure-thingy, and your plug now works on the shared hosting as smoothly as it did on my own vserver before!
Thanks a bunch, mate!
December 5th, 2007 at 4:08 am
Great, congratulations and such
December 5th, 2007 at 7:22 am
Ok, so, it works better, I updated the all in one seo pack but I had an error report, I uploaded it here for you:
http://www.legrenierdalice.com/_blabla/blogpix/errorrepot.txt
I just had to activate the plug and everything seems to be ok, i cheked my plugin folder with filezilla, it looks ok.
I dont really understand the error report, if you have the time to give me a solution to have it working 100% it would be cool, if you can.
Thank you!
December 5th, 2007 at 12:18 pm
The updated plugin wasn’t activated automatically because you’re running the debug version. Everything else seems more-or-less okay in that report (at least it works, apparently). To disable debug mode just open one-click-plugin-updater.php and change the line that says “var debug = true;” to “var debug = false;”.
December 5th, 2007 at 4:31 pm
Works fine, thank you very much!
December 9th, 2007 at 6:15 pm
It’s super. Now I don’t waste time on updating plugins. Thanks a lot!
December 10th, 2007 at 1:25 pm
I get this error after I fixed the permissions and cannot figure out what temp file this reffers to. Seems like a great plugin if we can get it working. Any suggestions?
Error : couldn’t create a temporary file.
December 10th, 2007 at 3:04 pm
The plugin needs to create a temporary file to store the new version (a zip file) before it can extract it. It uses a built-in PHP function to determine where to store the file (tempnam()).
Do you have enough diskspace left on the partition that holds the temporary files? And what OS does your server have?
December 10th, 2007 at 3:36 pm
Actually, scratch that - just try the version I uploaded now. I suspect it might work better.
December 10th, 2007 at 8:57 pm
The updater doesn’t update for me the plugin page just reloads its self without any error messages.
I already set the permissions to the plugin directory. What line do I need to add to my php.ini?
December 10th, 2007 at 9:52 pm
Have you got the latest version? Some other people have reported the same problem before, but it should be mostly fixed in the current version.
If you have the latest version, you can open the one-click-plugin-updater.php file and change the line that says “var debug = false;” to “var debug = true;” to get a detailed report of what the plugin tries to do.
As for the php.ini lines, I don’t know what you’re talking about
December 10th, 2007 at 10:20 pm
version 1.1.6 .. I set debug true and got a long list of text. The following looks interesting:
gzopen() found, will use PclZip.
Error: PclZip reports failure. ‘PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature’
gzopen() not found or PclZip error. Running unzip instead.
unzip returned value ‘0′. unzip log :
Array
(
[0] => Archive: /tmp/PLGXhAsVH
[1] => peters-custom-anti-spam-image packaged: Mon, 03 Dec 2007 03:40:03 +0000
)
extractPlugin() succeeded.
Plugin extracted, deleting temporary file ‘/tmp/PLGXhAsVH’
Upgraded plugin was not active. Will redirect back to plugin list.
December 10th, 2007 at 11:03 pm
Interesting, but I can’t think of anything at the moment :/
December 14th, 2007 at 7:00 pm
I am still getting the same cannot create tmp file error message.
Any other suggestions? The site is hosted on a linux system, pretty standard settings. There is plenty of room on the partition to create the necessary files.
Here is the error again:
Error : couldn’t create a temporary file ”.
I just updated the plugin, but still have the same problem. The plugin I am using right now is version 1.6.
December 14th, 2007 at 7:22 pm
As I wrote above, you can try to “open the one-click-plugin-updater.php file and change the line that says “var debug = false;” to “var debug = true;” to get a detailed report of what the plugin tries to do.” That might give you more information about the error.
Other than that, I don’t see what could be wrong. Maybe it can’t create the file because of file permissions (seems very unlikely)? Hmm.
December 14th, 2007 at 8:10 pm
sorry that was version 1.1.6
December 14th, 2007 at 10:09 pm
Will save the new version archive (zip) to a temporary file ”.
Warning: couldn’t create a temporary file at ”.
Using alternate temporary file ‘/hsphere/local/home/world/theworldbyroad.com/wordpress/wp-content/plugins/one-click-plugin-updater/PLGPBZzrg’.
About to extract the new version.
December 14th, 2007 at 10:09 pm
I also changed the permissions of the folder for the plugin to 777.
December 14th, 2007 at 10:46 pm
I see that for some reason it couldn’t find the system’s temp folder, so it tried to use the plugins own folder to store the temporary file, which worked because you changed the permissions. So, problem solved
(more or less; you can set “debug” to false again.)
I’ll check if I can do anything about it failing to locate the system-wide temp. directory. I have edited the log you posted to only leave in the important parts - this page is getting very large…
December 15th, 2007 at 1:25 am
It executes now, but the plugin is not updated after it executes. Below the plugin there is still a notification that the plugin is not up to date.
December 15th, 2007 at 3:33 pm
Have you tried setting the target plugin’s directory and/or files to 777? I know it’s not very secure, but if it works then, we can at least be sure it’s a file permission issue.
December 16th, 2007 at 6:41 pm
Hi, I’m the author of OneClick installer (http://anirudhsanjeev.org/oneclick/), the next version of oneclick will incorporate this along with many new features. Would you be interested in merging the code or the projects and/or contributing to development?
email me at anirudh $at$ anirudhsanjeev $dot$ org
December 16th, 2007 at 7:59 pm
Email sent.
December 17th, 2007 at 1:48 am
[...] Wordpress Automatic Upgrade que actualiza el WordPress en unos 5 o 6 clics desde el administrador y One Click Plugin Updater que actualiza plugins de la misma [...]
December 17th, 2007 at 7:12 am
I haven’t tried the one-click installer in a while (since right after the plugin competition) but it never worked with the simplicity, power, and effectiveness of the single click plugin updater. So, I would love to see these two plugins work together, but what I’d like to see is the single-click updater influence the one-click installer. That, or keep them separate.
That’s just me.
December 17th, 2007 at 12:02 pm
Setting the permissions of the plugin to be updated worked.
December 17th, 2007 at 3:14 pm
Danny : the two plugins have very different architectures, so they probably won’t be completely merged. There might be a version of Oneclick installer that includes my plugin, but there will also always be a standalone version of the single click updater available.
Steven : That’s good. I hope I’ll be able to at least partially avoid the file permission hassle in a future version - Anirudh, the author of Oneclick installer, gave me an idea about that…
December 22nd, 2007 at 4:12 pm
[...] This plugin. This plugin is called the “One Click Plugin Updater”. Once installed and activated, and provided you’re using the most recent version of WordPress - all you need to do is visit your plugins page every now and again and scroll to see which plugins need to be updated, click to “update automatically” and that’s IT. How much easier could it get? There are a few plugins, unfortunately, that aren’t loaded into the plugins directory in such a way that they update automatically. Those need to be updated manually (and you’ll know, because the “update automatically” prompt will not go away). Other than those - it is a sweet little plugin and it will make your blogging life just a little bit easier! [...]
January 2nd, 2008 at 11:01 pm
[...] Single Click Plugin Updater - A very handy plugin that extends the plugin notification system, introduced in WordPress version 2.3. This plugin also provides an ‘update now’ link that, when clicked, will automatically download and install the new version on your blog. [...]
January 3rd, 2008 at 10:39 pm
[...] One Click Plugin Updater [...]
January 10th, 2008 at 8:35 am
Love this plugin. It works great, but for some reason, it has been installing the newer versions of plugins and leaving the old versions in the plugin list. Please help.
January 10th, 2008 at 2:17 pm
Hey Thomas,
This is a known issue - it happens when the new version of a plugin has a different directory structure than the old one. There’s no way to safely fix this right now, so I suggest you deactivate the old version and activate the new plugin. Then you could manually delete the old version from your plugin folder.
By the way, this should only happen for some very specific plugins, not all of them.
January 11th, 2008 at 3:55 am
Okay, thanks White Shadow!
Thomas
February 11th, 2008 at 2:03 am
[...] One Click Plugin Updater: تحديث الإضافات المثبته في مدونتك بضغطة زر [...]
February 11th, 2008 at 7:43 pm
[...] along comes the One-Click Updater plugin developed by W-Shaow. As you can see below, once installed you simply click the “update automatically” link [...]
February 13th, 2008 at 2:24 pm
[...] project which attempts to generalise the one click update of WordPress plugins. It is called the One click plugin updater. This tries to add this facility to existing plugins. From the comments on the plugin page it looks [...]
February 16th, 2008 at 9:07 am
WOW! Excellent! This should be included with wp already, thanks.
February 18th, 2008 at 1:46 am
Shouldn’t this plugin updater first delete the plugin to update and then upload the new plugin files?
February 18th, 2008 at 2:10 am
No. It’s safer to simply overwrite the existing files *if* new files are downloaded successfully.
February 20th, 2008 at 9:32 pm
This plugin was working 3 days ago. Not anymore. I’m puzzled.
-
Here’s one error I got:
“Error : couldn’t download the new version from ‘http://downloads.wordpress.org/plugin/all-in-one-seo-pack.zip’!
You need either the CURL library installed or allow_url_fopen set in php.ini for this to work.
-
A second error is that it tells me that it was not possible to download the plugin (to be updated).
-
Here’s what my web server tells me: “We have not made any
changes to the server but Curl is already installed and working on the server:”
-
Puzzling. Do you have any thought on that?
February 20th, 2008 at 10:51 pm
Apparently WordPress.org is going through some kind of restructuring - some download links have changed, some just don’t work at all.
I’m already working to make this plugin conform with those changes, but you will need to update it (the single click updater) manually when I get the new version up. The old version simply won’t be able to do it automatically because the wordpress.org page structure is now different.
February 20th, 2008 at 11:01 pm
ah, thats why… aren’t the WP guys aware that your and a few more plugs are affected by toying around with the server structure? hmmmmpf….
well, take your time and good luck!
February 20th, 2008 at 11:17 pm
Thanks a lot White Shadow.
February 21st, 2008 at 1:21 pm
Just to let you know, the new version is up and seems to be working.
February 21st, 2008 at 4:50 pm
Fantastic. Works fine. Thanks a lot.