Normal Migration (old-site.com to new-site.com)
1. The first step is to download the uploads folder from the old site.
2. Set up a fresh installation of WordPress and any theme you want. I am using the Genesis theme with a child theme called Genesis Sample.
3. Move the uploads folder into the genesis-sample folder (your theme folder).
4. Next, export the media from the old site.
5. Open the XML media file in a text editor and replace all occurrences of old-site.com/wp-content/uploads with new-site.com/wp-content/themes/genesis-sample/uploads. Then, replace all occurrences of old-site.com with new-site.com
5. On the new site, go to Tools > Import > WordPress. Click Find File and select the edited XML media file. Be sure to check “Download and import file attachments.” If everything was done correctly, WordPress will begin importing the pictures from new-site.com/wp-content/themes/genesis-sample/uploads into the new installation (new-site.com/wp-content/uploads), and the pictures will be added to the Library. If it freezes or just fails without indication, just repeat the same steps of step 5.
6. Go to the old site and export the posts. Open the XML file in a text editor and replace all occurrences of old-site.com with new-site.com. No need to worry about replacing old-site.com/wp-content/uploads with new-site.com/wp-content/themes/genesis-sample/uploads. The Media has already been uploaded, and the posts will point to the correct path.
7. Import the posts into new-site.com. The only difference is that this time, you do not have to check “Download attachments”
8. Repeat steps six and seven for pages. Export pages from old-site.com and import them into new-site.com
Merge Media from Sub Domain (old-site.com/blog) with new-site.com
The site that I was migrating had a sub domain site (old-site.com/blog). Unfortunately, many images on old-site.com pointed to images in that sub domain (old-site.com/blog/wp-content/uploads).
In order to merge the Media from old-site.com with old-site.com/blog,
1. download the uploads folder from old-site.com/blog/wp-content and rename it blog-uploads.
2. Move the blog-uploads folder with all the images from old-site.com/blog to new-site.com/wp-content/themes/genesis-sample/.
3. Next, export the XML media file from old-site.com/blog. Open the XML file. Replace all occurrences of old-site.com/blog/wp-content/uploads with new-site.com/wp-content/themes/genesis-sample/blog-uploads.
4. Now, just import the XML file and remember to tick “Download attachments”. In the next step, we will point
5. Download Search & Replace. Replace all occurrences of new-site.com
/blog/wp-content/uploads with new-site.com
/wp-content/uploads . All the images will break. This is in preparation for the next part of this step. Remember how some images on old-site.com were pointing to old-site.com/blog? This step ensures that the links that are pointing to pictures in new-site.com/blog/wp-content now point to the pictures that we just imported into the main site (new-site.com/wp-content/themes/genesis-sample/blog-uploads). Search and Replace will tell you to first create a SQL file and then import it because of some silly rule. Otherwise, we would be able to write the changes directly to the database. Export the SQL file and then import it with Search and Replace.
I found out that there was actually no new content on old-site.com/blog, so I didn’t have to import any posts or pages.
Merge Sub Domain (sub.old-site.com to new-site.com)
I only had to move the media over for this merge. The rest of the posts and pages were moved over manually since they were built with a page builder. Page builders make it practically impossible to migrate pages and posts.
Repeat steps 1 – 5 of Merging a Sub Domain with new-site.com