Copy Environment
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”.
Copy Environment
The copy process can be done between any of the 3 environments (PRD, STG, DEV) within a site. Our copy system uses backups, so a fresh backup will be made automatically at the start of the process.
If you need to copy an older checkpoint, or copy to an environment within another site, use the backup and restore page instead. Read more about this here.
NOTE: To prevent any visual discrepancies, downtime, or missed orders, you can enable a maintenance page on the source environment 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 an environment name
- Click Copy environment on the top right
- This button will be greyed out if there are no other environments within the site. See the section “Copying an Environment Between Two Sites” for more information or learn how to add a new environment.
- Source environment: Ensure this is the correct environment that you want to copy content and data from
- Target environment: Select the desired environment you wish to copy to
- Includes: Select one of the following options-
- Database and file system
- Read more about what the database includes.
- Not recommended when copying to Prod. The target database will be rewritten with this option, which can cause the loss of new orders and users. Read more here.
- File system only
- This option is recommended when copying to Prod. Read more here.
- Database and file system
- 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
- Read more about what the database includes.
- It is not recommended to include the database when copying to Production. Read more.
- 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 the source environment before initiating the Copy Site process.
Maintenance mode can be enabled through a plugin, or by triggering the default WordPress functionality.
NEXT STEP: Learn about the WP Engine backup and restore system