If you have made changes to an environment and want to deploy or copy those changes to another environment you will need to use the User Portal function called “Copy Environment”.
Copying an environment can only be initiated from the source environment. You have the option of selecting any backup point from the last 30 days to copy to another environment.
NOTE: To prevent any visual discrepancies, downtime or missed orders, enable a maintenance page on Production before initiating the Copy Site process. Maintenance mode can be enabled through a plugin, or by triggering the default WordPress functionality.
- Log in to the User Portal
- Select the environment name you wish to copy from
- Click Copy environment on the top right
- Source environment: Ensure this is the correct environment that you want to copy content and data from
- Source backup point: Select a backup point from the dropdown from the environment that you are copying from
- NOTE: You may first need to make a more current checkpoint if you’ve made recent changes.
- Target environment: Select the desired environment you wish to copy to
- Includes: Select one of the following options-
- Database and file system
- File system only
- This option is recommended when copying to Prod. Read more here.
- Enter email address(es), separated by commas, to be notified at when the copy is complete
- Click Preview copy
- Review the Preview copy environment details for accuracy
- Click Copy Environment to confirm and begin the process
- You will receive an email when the copy process is complete.
- Large sites may take some time.
Copy Environment to Different Site
The Copy Environment feature only offers the ability to copy environments within the same Site, for example PRD to DEV or STG. If you wish to copy an environment from one Site to an environment on another Site, this is still possible using the WP Engine backup system instead.
- Log in to the User Portal
- Select the source environment name
- Click Backup Points
- Select any checkpoint by clicking the radio button next to it
- You may first need to make a more current checkpoint
- Click Restore
- In the popup, select the Restore to dropdown
- Choose the environment name you wish to copy content to
- Check an option to include or exclude the database
- Enter your email address
- Click Restore backup
- You will receive an email when the copy is complete.
Database Included vs Excluded
Each Copy Site process includes the file system by default, but copying the database is optional.
The file system includes: media, images, stylesheets, plugin files, scripts, wp-config.php, etc.
The database includes: all posts, pages, users, custom post types (EX: WooCommerce orders), and certain settings.
It’s possible for the database to also contain theme and plugin settings. This will vary based on the asset so if there are questions, reaching out to the author directly would be best.
Database is included
Copying the database can be destructive. This means that the entire database will be overwritten if the database is included in the copy.
It is never recommended to copy the database to a Production environment.
Database not included
No database information will be copied to the destination site. There is no partial database copy using Copy to or Copy from.
Copy Database to Production
It is never recommended to copy a database to a Production environment, as the database will be rewritten entirely with the Staging/Development contents. This can cause the loss of important data, such as new orders or users.
If posts or pages were added to the Staging/Development environment, the easiest solution is to use the WordPress Default Export/Import Tools to manually migrate that content to Prod. If more specific export parameters are necessary, then WP All Export has more customizable export options.
Alternatively, if you have added content to Production but need to push the Staging/Development database for some other reason, the content will need to be exported from Production before the copy, then imported back to Production after the copy has completed. The WordPress Default Export/Import Tools can be used for this as well as WP All Export for more customizable export options.
If you are using a theme that stores settings in the database, it would be best make the changes on Production and leverage the Preview Site theme feature as well as our Backup system.
Copy Site Tips
User Portal 301/302 redirects, custom cache exclusions, Nginx rules and any other custom WP Engine server configuration options will not be copied using these processes.
These rules exist only if added manually, so in most cases will not cause issues when not copied. The WP Engine Support team is happy to manually copy over any custom rules if necessary, by request.
To prevent any visual discrepancies, downtime or missed orders, enable a maintenance page on Production before initiating the Copy Site process.
Maintenance mode can be enabled through a plugin, or by triggering the default WordPress functionality.