WordPress Extension Manager

Update (17. November 2008): I keep this page here for reference but since WordPress 2.7 there’s a Plugin Installer and even a WordPress Upgrader. This made this plugin obsolete and I won’t spend any time on it any more.


I’ve checked out various plugins for WordPress that might help me to administer my installed plugins and themes. I looked at:

I wanted a plugin that could do the following things:

  • install, update and delete plugins and themes
  • it should be able to handle various locations, i.e. at least these plugin repositories and maybe some from somewhere else.
  • basic search functionality for all these plugins and themes

Since I haven’t found something that could do all these things, I wrote the WordPress Extension Manager: a plugin that lets you do all of the above.

You can download the plugin here.

Installation

Unzip the downloaded plugin into your wp-content/plugins directory and activate it on the plugins screen. After that perform the following steps:

  1. change the permissions of the wp-content/plugins directory to 0777. Alternatively you can change the owner of this directory to the same user who is running the webserver.
  2. do the same thing you did in step 1 with these directories:
    • wp-content/themes
    • extension-manager/plugins
    • extension-manager/themes

Once you’ve done that you can go to Options – Extension Manager and start using the plugin.

Usage

You’re a geek? Read how this plugin works.

If you go to Options – Extension Manager you’ll be presented with these options:

  • Install Plugins
  • Install Themes
  • Maintenance

These actions will be described in the following sections.

Install plugins and themes

If you’d like to install a plugin or a theme simply hit the corresponding button and you’ll be presented with a list of all plugins or themes. You can use the Plugins per page dropdown list to show more plugins at once; the Next and Previous buttons help you to navigate one page forward or back.

If you’re searching for a plugin enter some search terms and press enter or click the Filter button. The results are plugins or themes that contain one of the words you entered in their name, version, download link or author link. In the future it will be possible to search the tags and maybe the description too.

Maintenance

This page shows all your installed plugins and themes. You can delete installed plugins or themes and if you’ve downloaded them with this plugin you can remove the corresponding downloads too.

If you want to delete a installed plugin or theme please make sure that you’ve deactivated it. In case you don’t care about some clutter in your database just delete the plugin or theme.

Notes

I’ve tested this plugin with WordPress 2.3.x but it should be possible to use it with earlier versions; just give it a try. I’ve only tested this plugin with PHP 5.2.x and if you’re using an earlier version of PHP some things might not work – please let me know and I’ll try to fix it. Alas, this plugin doesn’t work with PHP 4 and probably never will.

Message from Certkiller Join our online 70-270 training to learn about word press functions in details. Download 642-982 tutorials with free 642-504 WP templates for practice that will allow you to easily create and manage your web blogs.

27 comments ↓

  • planner says:
    Sounds like a very good plugin, but there are one or two problems:

    extension-manager/plugins and extension-manager/themes do not exist. Are we expected to create them?
    I could not activate the plugin. Gave the following error message:

    Parse error: syntax error, unexpected ‘{‘ in /wp-content/plugins/extension-manager/extension-manager.php on line 49

  • Hi planner,

    thanks for your feedback. To answer your questions:

    1. you’ll have to create the two directories. I’ve updated the installation instructions here.
    2. Are you running PHP4? It’s possible that this plugin might not work with older versions of PHP, because I’ve only tested it with PHP5. I’m looking forward to fix that soon.

    I’ve created an new version (0.6.3) that displays an error message if you’re running PHP4. Sorry about that.

    Cheers,
    Christian

  • Simon says:
    I get the error:

    Fatal error: Class ‘ZipArchive’ not found in /usr/local/[hidden for security]/wp-content/plugins/extension-manager/FileHelper.php on line 171

  • Hi Simon,

    You’re using PHP4? I haven’t had the time to test this plugin thoroughly with PHP4. Please be patient until I’ve fixed that or upgrade to a current version of PHP ;-) .

    It’s also possible that your version of PHP wasn’t compiled with support for Zip files. If that’s the case you won’t see zip or zlib entries in the output of phpinfo. You can have a look at how to fix this here.

    Cheers,
    Christian

  • David says:
    Same error as Planner, I am running php v5.

    Parse error extension-manager.php on line 49

    Any suggestions and or solutions yet?

  • Hi David,
    that particular line contains a try statement that was first introduced in PHP5. Since Planner is running PHP4 this plugin will not work for him. I’m sorry about that.
    But currently I haven’t got the time to fix compatibility issues with older versions of PHP so you’ll need at least PHP 5.2 or newer. It might work with version 5.0 but I haven’t tested that.
    I’ll write you an e-mail soon and post the results here…
    Cheers,
    Christian
  • Dave Luther says:
    How do I create directories in /plugins/extension-manager.php
    My cp does not have a provision for creatind a directory in a php file. If I could, where would it be created?
  • Hi Dave,
    if you extract the plugin all files should be inside a directory named extension-manager. This directory goes into the wp-content/plugins directory of your WordPress installation.

    Inside the directory wp-content/plugins/extension-manager you’ll have to create two directories: plugins and themes. Currently, you’ll have to do this, but this will be fixed in the future.

    Did I miss a typo somewhere on this page or here? Or how comes that you wanted to create a directory inside a file?

    Cheers,
    Christian

  • Fizzgigg says:
    When I activate the plugin and goes to Settings/Extension Manager and click on either Install plugins or Maintenance I get the message “Correct these errors first: Change the setting of ‘allow_url_fopen’ to ‘On’”.
    For starters, where? Any clues?
  • Hi Fizzgigg,
    You can find this option in the php.ini file. Have a look at this entry: it says that the default value is On – maybe somebody has changed that on your server.
    BTW: I’m not sure whether I might fix this with ini_set(); I will have a look at this any time soon.
  • Fizzgigg says:
    And since I’m using a webhotell I guess I don’t have access to that file, and because of that my goose is cooked?
  • Wen says:
    Hello Fizzgigg,

    I’ve came across that statement several times, and when talking with my hostmaster they told me that due to security reasons they didnt allow the “allow_url_fopen”. Maybe it’s the same at your webhotel/hostmaster?

  • Lara says:
    Plugin could not be activated because it triggered a fatal error.

    Parse error: parse error, unexpected ‘{‘ in /home/content/l/a/d/ladydelaluna/html/wp-content/plugins/extension-manager/extension-manager.php on line 68

    Any ideas on this one?

  • Brian says:
    Lara –

    I got the same thing. I think it is a PHP 4.x error. My host has PHP 4 and 5 but uses 4 by default. I fixed that with the following line in my .htaccess in the plugin’s folder:

    AddType x-mapp-php5 .php

    After that, the plugin worked fine.

  • Thanks for the hint Brian!
  • Brian – I only have PHP 4.4.7 on my hosts. Will the plugin not work at all? Know of any workarounds? (I get the same fatal error on line 68 that Christian Schenk is getting)
  • Ah okay have just seen that it doesn’t work with PHP 4 and probably never will. Will get back to the hosters and tell them to get on with upgrading (to a PHP that was first released almost 4 years ago!)

    thanks anyway!

  • Hi John,

    Ah okay have just seen that it doesn’t work with PHP 4 and probably never will.

    From a developer’s point of view it’s a lot easier to use PHP 5 than its predecessor. Since I haven’t got that much time to provide a version that would work with PHP 4 too it’s “PHP 5 only”.

    Will get back to the hosters and tell them to get on with upgrading (to a PHP that was first released almost 4 years ago!)

    The part in parentheses makes me believe that you understand my “PHP 5 only” policy. Thanks.

  • eno says:
    Hey Christian, thanks for creating/distributing the plugin. I got it installed no problem and activated, but when I go to the Settings->Extension Manager page/tab, I receive this rather silly error message:

    “You’re running PHP 5.2.0. Please update to at least PHP 5.2 or be patient until this plugin works with PHP 4.”

    … uh… what’s wrong with this picture? Any ideas?

  • Lionel Chollet says:
    Bug report
    WordPress 2.5.1 – Extension Manager 0.6.6.
    Error whien activating:
    Parse error: syntax error, unexpected ‘{‘ in wordpress/wp-content/plugins/extension-manager/extension-manager.php on line 68
  • Hello Lionel,
    PHP version? 4? Since I haven’t got the time to support PHP 4 you’ll have to upgrade to PHP 5.
  • frlevel says:
    Hi,

    When I select “Install Plugins” or “Install Themes”, I have the following error:

    Correct these errors first:
     
    Can't open file 'http://data.christianschenk.org/wordpress-extensions-manager/data/plugins-update.txt'

    php version : 5.2.4

    Thanks for your help !

  • Neil Stead says:
    Has anyone tested this with WordPress 2.5?
  • It looks ugly but works.
  • Kolja Schleich says:
    Hi,

    I think your plugin has the potential to become the standard for plugins und theme management. But until this is the case it still needs some improvements.

    Most importantly you should (if this is possible) retrieve plugin and theme information directly from the repositories and not via an xml file! I’m using version 0.6.6 and got an xml file from 01/17/2008. This is half a year old!! Many plugins are not listed in the file and it is likely that all or are at least most of the plugins are out of date. This makes your extension manager simply useless.
    The other way would to update the xml file automatically every hour or so, but as far as I can tell it takes quite a wile for generation (I’m currently running your crawl.sh script for approx. 15 minutes and it’s still working). So this would not be very convenient.

    So if you get the plugin information directly from the repository the list would be always up-to-date.

    The second thing to do would be a styling upgrade to look nice in WordPress 2.5. As you’ve already stated: It looks ugly.

    I also get the following error when I hit the manage button (Plugin Version: 0.6.6, PHP 5.2.0)

    Warning: array_filter() [function.array-filter]: An error occurred while invoking the filter callback in /var/www/wordpress/wp-content/plugins/extension-manager/FileHelper.php on line 143

    Thanks for your work. :)

  • Andly says:
    Hi Chris
    tested on php 5.2 and wordpress 2.5, it works fine but looks a little…ugly!! :)

    Thanks anyway for the awesome job

    Andly