开发者

Remote upgrade script similar to wordpress updater

I've got a wordpress theme that I update very often with new functionality. I've been sending users a zip file each time I have an update. It's a bit cumbersome since they have to (1) temporarily activate a new theme (2) delete my theme (3) install the updated theme (4) activate the updated theme (unless they are ftp savvy which most are not).

I'm deciding between two approaches, file upload via the theme's options panel and remote upgrade similar to the way WordPress automatic upgrader works. I'd prefer remote upgrade if its (a) more secure than offering a file upload routine and (b) not rocket science to program.

Under the "file upload" approach, I've already made much progress in that I've added an uploader utility to my theme options that allows the user to take my zip file and it automatically updates their theme with the new files in my zip. Despite the fact that I'm checking that the user is logged in before executing the upload, there are obvious security concerns with this approach though.

I'd welcome any advice or 开发者_StackOverflow中文版tips on the merits of the automated remote upgrade procedure and its relative security and difficulty vs file upload.


I think the best approach would be to enhance Admin menu in WP

Adding Administration Menu to WP

1., you add widget to WP dashboard which will check simple xml on your domain each time admin logs in - you could store major versions here - if new, button with "download new zip" - this is where your auto-update comes in (just check if admin is logged in - i think that should be enough for security)

2., for minor version/changes - in your custom menu you could ship detail about last version, changelog.

If my Answer is worthless, feel free to bash me :)

P.S.: If user is looged in - he/she could maybe insert (or have stored) FTP information for server-to-server FTP download?

Edit: Here is good looking info about how WP update works - close to my idea, actually :)

http://wpengineer.com/how-core-update-in-wordpress-27-works/

Edit 2: Another link, which automates update from time before autoupdate by WP was online - you could download it and learn from it maybe?

http://techie-buzz.com/wordpress-plugins/wordpress-automatic-upgrade-plugin.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜