Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
308 views
in Technique[技术] by (71.8m points)

backup - How to mirror WordPress development environment and live site?

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.

  1. Install the plugin on the website you want to copy (i.e. your development environment)
  2. Build the package - this creates a single archive file with the site database and files. Depending on your hosting settings you might get timeout errors when building the package. In that case I exclude the uploads folder and then copy it across manually
  3. Copy the archive & installer to the destination environment
  4. Create an empty database for your new site
  5. Run the installer.php that you uploaded to the destination. It will guide you through entering the new database and domain details

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...