I happened to try Siteground's staging functionality, and I was thinking that it would be very nice if we could have something similar, only with the command-line. Here is how I envision it in my ideal scenario:
First, we could have a command like:
stage example.com -to=staging.example.com
If you ran
without any parameter, it would search if a staging site exists and if it did, it would automatically perform the aforementioned actions to it, practically updating the existing staging site with the latest changes from the live.
Similarly, if you ran
stage example.com -to=example2.com
supposing that both example.com and example2.com already exist as separate webinoly websites, it would practically connect the two sites as live and staging and update the staging with the latest version of the live.
Then, a command like:
deploy staging.example.com -mode=[full | functionality | custom]
Finally, we would obviously also need a restore command in case something went wrong.
I know that it sounds a bit crazy, that it definitely needs more overall thinking and that it's probably out of the scope of this project, but maybe some parts of it could fit in.
I just posted a question for Cristhian over here which might appeal to you.
In fact, we already have most of these things you mentioned, but they are separate. It would be a matter of having a function with all of them together in one command.
I will take a note of it and leave it as a reference for future improvements ideas. The general idea is good!
Indeed. I did a little googling and I see that this seems to be exactly the problem here.
Siteground, which I took as an example because it seems to handle it in a nice way, offers two types of push: Basic, which is a full backup, and Advanced, which allows you to select which tables to synchronize, so it completely leaves the choice to the user. Maybe they thought about it too and decided that this is the safest way to deal with it (safest in a sense that you don't take responsibility for messing with the user's database and leave it entirely up to them).
Your regular donations is what keep this project moving forward. If you like Webinoly, buy me a coffee or a beer to show support.