Creating A Cms With Auto Update Feature

Hello,

I am currently working on a CMS project that I’d like to integrate the auto-update feature, just like WordPress. I am pretty familiar with the procedure:

  • Check on remote server if newer version exists

  • If so, temporarily lock the app, download the zip file with code & db changes to a tmp directory

  • Make a backup of the current files that will be changed

  • Replace the old files with the new ones and apply db changes

  • If something went wrong revent back to previous working state

  • If everything is OK, delete the backup files & new zip from tmp and inform user that update is successfull.

Do you think its OK to replace Models/Controllers/Components on a live application? Is it save to give write permissions to PHP to change the app files? Isn’t it kind of dangerous if it gets to the wrong hands? Also after the update is complete do I need to clear certain folders, such as cache or assets folder? (I’m sorry I’m new to Yii and I’m still learning).

I’d love to hear your ideas on this.

Hi outrage,

of course the update task will be an admin task and before releasing an update I would test it.

Thanks for your reply!