Skip to content

Instantly share code, notes, and snippets.

@aschweigert
Created November 3, 2014 17:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aschweigert/334bbd5421c6a606f7f2 to your computer and use it in GitHub Desktop.
Save aschweigert/334bbd5421c6a606f7f2 to your computer and use it in GitHub Desktop.
WPE DNS for new site
Email member and have them create (or change) the A record for the domain they want to use to point to 50.116.39.12
Then, in the WP Engine dashboard:
- click on the property name and then "domains"
- click on "add new domain" and enter the domain you want to add, at this stage you can also redirect other domains to the domain you're adding (e.g. citylimits.largoproject.org or www.citylimits.org) and it will pass these through to the primary domain you've added
In the WP Admin:
- from My Sites > Network Admin > Settings > Domains under "new domain" add the site ID and the domain you want to map to that site ID ("primary" should not be checked)
- click "save" and it will usually tell you that domain already exists (it's lying and that's ok)
Then:
- create a restore point from the WPE dashboard
- Search and replace all db tables pertaining to this site (usually just the wp_[SiteID]_* tables) to replace the staging domain with the real one (e.g. citylimits.largoproject.org to citylimits.org)
- in the WP admin go to My Sites > Network Admin > Sites and then click on the site you're working on and verify that the domain, site_url and home settings are now correct (using the domain you just added), this sometimes doesn't happen prob because of some weird caching thing so you have to update them here in addition to doing the search and replace
- purge the site cache (just to be safe)
Notes:
- once the search and replace operation is done the site will be inaccessible until the DNS propagates (usually good to tell the member this because they won't be able to login, make changes, etc.)
- after the DNS has fully propagated you can enable the CDN for the new primary domain (in the WPE dashboard click on the property name and then "CDN" and make sure the box is checked for the new domain you added)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment