We have recently rebranded ourselves from Envisage Consulting to Black Atlas Creative. Part of that process was changing our site address and WordPress address in the settings. When doing this we ran into a few problems, minor problems mind you, but problems none the less. Hopefully with us running into problems, we can help make your transition a bit easier.
Old Domain Redirect
I would recommend keeping the old domain for a little while for SEO purposes. If you want to remove the domain completely you will have to setup a bunch of redirects to account for the old addresses no longer existing. There are some plugins out there that will help you with that process if that is the route you want to go.
Purchase And Setup New Domain
Purchase the new domain and set it up for your hosting. If this isn't done before you change the site address and WordPress address you won't be able to access your site until this is done. Some people will make the mistake of changing the site address and WordPress address first and then can't access the administration panel to change it back when they realize their mistake.
Changing the Site Address and WordPress Address
This part is easy. In the Settings for WordPress there are two text boxes. Change these to the new address and save. In our case we changed domains but also included SSL (https), which caused a few other issues.
Theme Settings Using Static URLS
We are using Cherry Framework as a parent theme and part of our setup was allowing for a logo and favicon to be selected instead of hardcoding it into the child theme. When these were selected they used the full path instead of a relative path. If you are using a theme that allows for this, check these settings to make sure the path is updated to the new domain as well.
Page and Post Images
When adding images into pages and posts WordPress may also use the full path to the uploaded media. When adding these images in you should set them up using relative paths. If you remove everything before the /wp-content/... portion of the href link, that will do the trick. If any images were using this and the old domain isn't still setup to point to the hosting, you will have some broken links.
Old Drafts And Attachments To Pages and Posts
This is the part that caused us the most grief. When posts, pages, and their attachments are initially created it stores the old domain in the database. Why this caused us grief? Well, when we changed our domain we started using https and a bunch of the served media were still coming in as http. We thought it was a plugin at first but after searching through everything we tracked down the issue in the database. In the wp_posts table there is a column called guid. This is the column that held all of the previous domain paths for drafts and attachments. We did a quick SQL update query using the replace function and voila! We have supplied that SQL query below for anyone that is interested and may not be familiar enough to write this themselves.
Hope this can save a few people a headache or two!