Having now moved several WordPress sites from their test environments to new domains, I found the official instructions for moving a WordPress site to be confusing. Here are the steps I follow:
- Export the old database to SQL file.
- Run the SQL file through this online search and replace utility. This will update all the links, including the media files, to the new domain.
- Create a new empty database for the new domain.
- Move the entire WordPress directory to the new host.
- Update the wp-config.php file with the information needed to access the new database.
- Update the permalinks to the default and press save. Then return the permalinks to the way you want them.
That should do it.