How to set up a development/staging site to make major changes to the theme then update on the live site?

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.

Topic workflow testing staging theme-development customization Wordpress

Category Web


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.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.