Even though you may have changed your main URL during the move process, your internal links and images will remain unchanged, leaving images broken and internal links pointing toward the old domain or directory. Sure, you could manually edit every single post or page, but there are other ways.
The easy way is to use a plugin called Velvet Blues Update URLs. It’s a very simply plugin. You just enter your old URL, then enter your new URL, and this plugin take cares of the rest. I know, it almost seems too easy, but in this case it really is just that easy. Of course, if you want to make it a little bit more difficult, we sure can.
What if Velvet Blues Update URLs disappears and you’re left to fend for yourself? You can use the Search and Replace plugin to search for your complete old URL and replace it with your new URL. A note on searching for the complete URL, don’t take shortcuts. If you moved from maindomain.com/blog/ to maindomain.com, do not simply search for and replace all instances of /blog. This will all affect all instances of /blog, including links to other sites and blogs that may have /blog in the URL. Instead, search for maindomain.com/blog/ in its entirety and replace it with maindomain.com.
What if you can’t use plugins? What if you have an illogical need to do everything the hard way? Well, we haven’t forgotten about you. There’s a hard way to do just about anything. Simply backup your database and open the .sql file in a plain text editor. As above, search for and replace all instances of the complete old URL with the new URL. The same warning about shortcuts applies here as well. Once you’re done, save the file and restore your database.
As always, if you run into any problems, the volunteers in the WordPress Support Forums will be more than happy to help.
This is the first entry in our hopefully long-running WordPress FAQ series. What did you think, and what questions would you like us to answer next?