Move a Domain Between Environments
Migrating a domain between environments may be necessary if you’ve built an entirely new website but don’t want to copy content, or if your new website is on a different WP Engine account. In this guide, we’ll detail the correct order of steps to take when transferring a domain between two environments to ensure the least amount of downtime.
Be aware that the domain transfer process detailed below requires access to both environments. If you do not have access to the account where the domain is currently added, please see the Duplicate Domain Dispute process instead.
NOTE
While working through these steps, you may experience a 404 error until all steps are complete. With that in mind, it is best to perform these steps during a low-traffic time, and to fully complete the steps once started.
Update DNS
As the environment name is different, the WP Engine CNAME (environment.wpengine.com
) and even the IP address may be different. You will need to be sure your DNS has been configured to direct traffic to the new environment’s CNAME or IP address, or the later steps will result in a 404 error.
- DNS pointed to the legacy network (eg.
mysite.wpengine.com
or a static IP address) will need to be updated. Learn how to point DNS here. - DNS pointed to the advanced network using CNAME flattening will need no DNS changes. Learn how to point to the advanced network here.
- Global Edge Security (GES) uses unique CNAME strings for each environment. DNS will need to be updated when moving a domain that uses GES. Learn how to point DNS to GES here.
Remove Domain from Old Environment
A domain cannot be added to two environments at once. This means you must first remove your domain from your original site. Additionally, a domain cannot be deleted when set to primary. An alternate domain should be set as primary before the domain can be removed.
- Log in to the User Portal
- Click on the environment name the domain is currently mapped to
- Select Domains
- Locate an alternate domain (We suggest the WP Engine default domain, EX:
environment.wpengine.com
) - Next to this domain, click the three dot menu icon
...
- Select Set as primary
- Locate the domain name you will be moving
- Next to this domain, click the three dot menu icon
...
- Click Delete
NOTE
The domain may be added here twice, once with www
and once without, be sure to delete both versions of your domain.
Add Domain to New Environment
Now you’ll need to map the domain to the new environment, so our severs know which environment the domain should send traffic to.
- Log in to the User Portal
- Click on the environment name the domain will be moved to
- Select Domains
- Click Add Domain
- Enter the domain name and click Add
Learn more about the process when adding a domain to the User Portal here.
Update WordPress URL
Now that you’ve told both DNS and WP Engine servers where to send traffic, you must tell WordPress® which domain you want it to load over.1
- Log in to the wp-admin dashboard of the new environment
- Click Settings
- Select General
- Update two values to your domain:
- WordPress Address (URL)
- Site Address (URL)
Additional steps for updating your WordPress URL can be found in our guide here.
NOTE
If you’re updating the primary domain within a multisite, you will want to follow our guide here.
(Optional) Perform a Search and Replace
After changing your domain on the new environment you may notice some internal links on your website are still using the environment.wpengine.com
URL. To correct this you will need to perform a search/replace on your website’s database. This will change all hard-coded references of the old domain in your database to your live production domain.
Search and replace plugins:
(Optional) Add SSL
If your website is secured by an SSL (uses https://
), then once the domain has been moved to a new environment you will need to secure it again. Our system may be able to locate the SSL on the old environment temporarily if both environments are located on the same server, however you will receive an error when the SSL attempts to renew down the road.
We recommend adding your SSL to the new environment as soon as possible to avoid issues.
- Let’s Encrypt (free) SSL – Simply order the certificate again for each domain on the new environment. These cannot be migrated, but will issue for to the new environment quickly and easily once requested. Learn how to add Let’s Encrypt certificates here.
- Third party SSL – Upload the SSL files using the normal process to the new environment. Learn how to upload your third party SSL here.
If you run into any issues with your SSL during this process, please reach out to our Support team for assistance.
NEXT STEP: Need to migrate part of a site? Learn how to perform a partial copy using backups