Cloning production site down to local?
I've been using WordPress for awhile now but one problem I'm constantly facing is creating a local clone of a production site so I can test changes/updates.
My current process goes something like this...
- Run XAMPP Server
- Download the site files (Filzilla)
- Download the database (phpMyAdmin)
- Create a local database (phpMyAdmin)
- Copy site files into XAMPP
- Import database
- Update WP hostname, settings, etc
My question is simple. Is it possible to automate this entire process? If not, what can be automated to make this less time consuming?
I've kinda looked into Docker but it seems confusing and I don't know that it helps with most of these steps. I know there are plugins that can create backups of the site but again that only automates a couple steps. I'm pretty sure WP CLI can clone a site but I'm not sure if it can clone a remote site down to local. A solution using WP CLI would be great.
There has to be a better process than I'm doing now :(