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)

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 3:36 pm
Actually, scratch that - just try the version I uploaded now. I suspect it might work better.
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 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 9th, 2007 at 6:15 pm
It’s super. Now I don’t waste time on updating plugins. Thanks a lot!
December 5th, 2007 at 4:31 pm
Works fine, thank you very much!
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 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 4:08 am
Great, congratulations and such
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 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 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 1:54 am
This might also help you - HTTP 406 Error
There’s also a less radical solution.
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 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: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 2nd, 2007 at 10:13 pm
Great, I’ll send you an email.
December 2nd, 2007 at 9:38 pm
Sure, I’ll try anything
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: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: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 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 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 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 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 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 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
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
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 26th, 2007 at 5:42 pm
[...] One Click Plugin Updater - extensie pentru Wordpress 2.3 care îţi actualizează automat plugin-urile instalate. [...]