I used the whole “package” (trellis, bedrock and sage), I am ready to push the website from the staging environment to the production environment, and I am wondering what are the steps that I have to follow (before I fuck it up with a step something completely wrong).
I already created the production environment a few months ago on Digital ocean, did the provision and running WordPress without problems.
the last few months I worked only on the staging environment, so now my production environment is out of date.
it is clear to me the step that I have to export/import the uploads folder and the database (reset the db and do a search-replace) on the production website.
And of course run ./bin/deploy.sh production mysite.com from the trellis directory.
am I missing something?
what about the plugins that I have installed on the staging but not on production?
if somebody could clarify to me what are the steps in chronological order that I have to follow (from staging to production), it would be really helpful, as I said, I am worried that I will fuck it up the last step before going live
@ben this sounds great, I think that I will give a go with the next project, thanks for creating this.
at the end, I did the export/import the uploads folder and the database, and it worked.
Now I would like to migrate from staging to development (on my local machine).
are these steps correct?
ssh to DO droplet, change directories to web root: $ ssh web@domain.com $ cd /srv/www/domain.com/current $ wp db export
exit the ssh session (type exit )
Download the dump file from the DO droplet in /srv/www/domain.com/current.
I usually just use an (S)FTP client for this. Also copy the uploads directory from /srv/www/domain.com/shared/ to site/web/app/
ssh to my Vagrant box, reset the database and then import the new database: $ cd trellis && vagrant ssh $ cd /srv/www/yourdomain.com/current/ $ wp db reset $ wp db import domain_com_xxxxx.sql
Search and replace production URL with development URL: $wp search-replace domain.com domain.test
I am not 100% sure about these steps, they make sense in my mind, but I am not super confident with these.
is it a right workflow? (i know that there are better ways to manage this, I will try new ways with the next project)
@MWDelaney I followed one of your old answer in another topic (from development to production), I printed your answer, I keep it on my desk, and I used to follow that like a bible every time that I have to do the migration task.
but I was not sure that the steps make sense also in the opposite way from production to development.