Wordpress: How to copy your productive environment to create a test-environment?
What are the steps, which are needed to create a copy of a productive 开发者_运维知识库wordpress environment for testing purposes, respectively to create a staging environment?
This was discussed extensively on WordPress.Stackexchange.com @Mike Schinkel is developing a migration plugin that handles the database and url issues. The download link is in the above referenced answer.
- Create a folder for the test-environment
- Password-protect this folder (e.g. with htaccess/htpasswd), so that no one (user, search-engine) accesses this test-environment by accident
- Copy content of the folder in which wordpress is installed into the test-folder
- Copy the database
- Change the following in the wp-config.php:
- Database-Connection settings
- change
define('WP_SITEURL', 'myUrlToTestInstallation');
- Login into the Wordpress-Backend of the test-environment and go to
- Options -> General and change "Blog-Address (URL)"
- Options -> Media and change "Upload path"
You're finished. Now you should have a staging environment set up.
精彩评论