I made a site a few months ago without using a development or staging environment. I just updated everything on the live site, which was fine at the time because the domain wasn't public. We were switching domains and used that domain as "testing domain." But, now the site is live and I need to make some major changes to the theme. I still want to keep all the content, though.

So, I thought that now was the time I needed to set up a development or staging site so I won't break the live site. However, I'm a bit stumped on how to go about this.

So far, I've created a subdomain with my host and copied the database from the live site to a new database. But, now I think I confused myself on where to go next.

Do I install Wordpress on the subdomain then FTP the files from the live site to the test site? Or is there a plugin that does this?

Also, I'm confused about pushing changes. Once I have a testing site up and running, how do I push any changes I make on the testing site to the live site?

I just want to understand everything before I get too far into this.

  • A staging site will be a duplicate of your current site. You can create a duplicate manually by moving all files and database to another server/subdomain/local or you can use plugins to assist you. Merging the changes again is the same process. However, there's currently no way to easily merge wp databases. So you either keep track of the changes, or you stop making updates to the live site, and then just replace the live site database with the stating database, which is risky. Often recommended is to make code changes on stage env, and only make database changes on live. – gdaniel Jul 6 '17 at 22:29

To do this properly you really need to be using a proper git workflow and something like capistrano or ansible for deploying your changes to stage. The database imports and exports will need to handled separately.

Your Answer

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