Reputation:
What's the best way to mirror, when you have a development environment and a live environment with WordPress (including two different URL's).
Is it simply by making a backup of one environment (FTP->Data, SQL->Database) and setting it up on the other environment?
Upvotes: 1
Views: 1551
Reputation: 14312
The easiest way to make a copy of a Wordpress site is to use a plugin like Duplicator. It handles everything from copying the files to updating the WP database with the new domain etc.
And that should be it! You might need to save your permalinks or make some other tweaks depending on your own setup, but its usually that simple.
Upvotes: 1
Reputation: 5589
For the general case it is not that simple.
What you mention can be done for example if you download everything to your local environment and in your local environment you change the hosts file for 127.0.0.1 to be the real FQDN of the site for example www.mysite.com. And you also setup your local virtual server to host that domain.
Otherwise you have to follow a series of steps which involve changing data in the database that references the FQDN, mainly in POSTs and PAGES, but could also be in OPTIONS. Check the Wordpress CODEX for detailed instructions.
Upvotes: 0