1

I’ve been developing my first Craft plugin and I think it would be really cool to be able to offer auto-updating for it, is there a way to hook into the update page you would use to update Craft? or is this something that could happen in the future?

I understand you could probably achieve this manually, I’ve seen a couple of plugins do this but then on later updates some remove this functionality, is this not a good idea to try and do? is it worth looking into how Craft does this in the core files and try to tap into that or would that be a big no no…

The way I was thinking of achieving this manually myself is:

  • Deploy a base version on my own server
  • Create a service that talks(Guzzle?) to the server to check the users version against the server version
  • Look into the methods that Craft uses to copy and back up files and use those methods to update the plugin if needed

Any pointers or info would be appreciated,

Thanks!

2
  • That sounds a bit scary personally. As a user, I would probably prefer that plugin developers not attempt this without having a uniform system in place. I currently use .git submodules whenever possible, which essentially does the same anyway. – Douglas McDonald Oct 21 '14 at 14:54
  • Yeah I see what you mean, as Brad mentioned I think waiting for the plugin store is the best way to go! :) – Alec Ritson Oct 21 '14 at 14:59
4

You could go through all of that effort, or you could just wait until the plugin store gets finished and any plugin that is listed in the store will get automatic updating for free nicely integrated into Craft's auto-updating functionality. :)

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.