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

Share :
  • Digg
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Technorati
  • Slashdot
  • Sphinn
  • TwitThis
Related posts :

362 Responses to “Single Click Plugin Updater WordPress Plugin”

Pages: « 13 4 5 6 7 8 9 10 11 [12] 13 » Show All

  1. 303
    White Shadow says:

    @bimz - Well, the only thing that springs to mind (after much thinking) is that the the updater plugin file and the plugin-to-be-updated might have different owners. Or, possibly, the server might be configured to prevent PHP from writing to files regardless of permissions.

  2. 304
    Tim G. says:

    Great plugin - except I can’t edit the files in a theme directory that oneclick created (I think it was your plugin). I get the 550 permissions error. How to fix this?

  3. 305
    White Shadow says:

    @Tim G. - I think this could have been caused by a change in your server’s configuration. The plugin uses normal file access functions (the same WP would use), so WordPress should always be able to access files that the plugin can access.

    However, I can imagine some scenarios - quite contrived ones - when certain changes (not necessarily recent ones) in configuration could cause a problem like this.

    Here’s something you could try : check that the theme directory in question (and files within it) have the same owner as WP core files. Depending on your server conf. you might also need to set the permissions to 755, or whatever permissions are currently set for other themes/plugins.

  4. 306
    Tim G. says:

    @White Shadow -

    Hi,

    the user for your theme install is 99, for the rest of my server files, 32xxx.

    Also, I sent you some $ for your plugin.

    Is your plugin going to be included in 2.7 core?

  5. 307
    White Shadow says:

    @Tim G. - So it’s as I thought - the theme files are owned by user 99 (A.K.A “nobody”), the user that the webserver often runs as, and the other files are owned by another user (probably your own user account). You need to get all the files to have the same owner - your account. You can usually do this by typing “chown username filename” in the console, but the specifics will depend on your host.

    As far as I know 2.7 will include the main features of my plugin but probably not all the little tweaks and the Firefox extension. I really haven’t looked into it yet.

  6. 308
    Tim G. says:

    @White Shadow -

    So is there any fix to this? I guess the easiest way is to install the theme manually. Does that console command work for the whole directory? Where to I go on the host control panel to type that?

  7. 309
    White Shadow says:

    @Tim G. - It should work on the whole directory (maybe you’d need to add some additional options). However, it’s not something you can use from your control panel. To enter console commands you would need to connect to your server using a SSH/telnet client like PuTTY. This is called “shell access” and I don’t know if your host allows it. And it requires a bit of Linux skills ;)

    The simplest solution might be to delete the theme and try again, or install it manually as you suggested.

  8. 310
    Tim G. says:

    @White Shadow -

    chown won’t let me change the user - it tells me operation fails…guess I’ll have to email the host to get them to del the directory.

  9. 311
    Eric Wood says:

    How do I get my plugin to automatically update?

  10. 312
    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.

  11. 313
    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)

  12. 314
    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

  13. 315
    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!

  14. [...] 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. [...]

  15. [...] One Click Plugin Updater [...]

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

  17. 319
    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?

  18. 320
    Tanin says:

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

  19. 321
    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.

  20. 322
    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.

  21. 323
    Humberto Cruz says:

    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

  22. 324
    White Shadow says:

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

  23. 325
    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?

  24. 326
    Walt says:

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

  25. 327
    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.

  26. 329
    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

  27. 330
    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 :P

  28. 331
    Peter Answers says:

    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

  29. 332
    White Shadow says:

    @Peter Answers - As far as I can tell from the log, it fails because PclZip doesn’t work (can’t tell why that happens). The plugin tries to fall back to using the “unzip” command, which doesn’t work either (according to your comments).

    I don’t know what’s causing it. If it really is pclzip, see if you can get a pclzip.lib.php file from an older version of the plugin and put it in the plugin’s folder. That might help.

Pages: « 13 4 5 6 7 8 9 10 11 [12] 13 » Show All

Leave a Reply