[wp-hackers] Plugin Management and Autoupdate System

Computer Guru computerguru at neosmart.net
Sat Jul 29 18:22:06 GMT 2006

I'm done with a framework that checks for the updates.
Basically I'm going with an RDF RSS file that looks something like this:

<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
        <title>CompleteRSS Download Bulletin</title>
        <description>CompleteRSS is the best WP plugin ever!</description>
        <lastBuildDate>20 Jul 2006 12:34:56 GMT</lastBuildDate>
	        <title>Alpha 2</title>
	        <guid isPermaLink="false">0.3</guid>
	        <pubDate>20 Jul 2006 12:34:56 GMT</pubDate>
	        <description>Upgrade immediately to win a cool
	        <title>Alpha 1</title>
	        <guid isPermaLink="false">0.1</guid>
	        <pubDate>03 Jul 2006 13:14:15 GMT</pubDate>
	        <description>This version is the first

It is saved as a plaintext (.xml or .rdf preferable) file on any server
anywhere. In the plugin itself:
Plugin Name: CompleteRSS 
Plugin URI: http://neosmart.net/dl.php?id=2 
Update URI: http://neosmart.ath.cx/CompleteRSS.xml 
Description: CompleteRSS makes sure your RSS Feeds contain full article text
and are fully valid - because your readers deserve it! 
Version: 0.2 
Author: Computer Guru 
Author URI: http://neosmart.net/blog/

Notice the line of added meta data: "Update URI"

On the server-side I've finished a script that cycle through all installed
plugins, search for "Update URI" metadata, and if found, query the XML/RDF
file, check if a new version is available, and return the result.

Before I take this any further:
Is this OK or not? I don't want to put weeks into it and find out there is
no interest.

I can prolly really soon get a working version of this that has _very_ basic
auto-update and auto-install and auto-remove features included. It'll simply
grab a remote plain-text file, save it as a PHP file on the local server in
the plugins DIR.
On update it will delete the old file and save the new.
On uninstall it will delete the old file.

I don't have anything in my head yet as to the best way of creating an
(un)install routine for anything more complex than this; such as
(un)installing database tables or multiple file plugins.

Source code available on demand, ask and you shall receive. And no, it's not
a plugin, it's a wp-core file.

Computer Guru
NeoSmart Technologies

More information about the wp-hackers mailing list