As I’ve recently done this myself and it wasn’t as straight forward as wordpress say it is here are a few things which may be of use to someone.
I’m assuming that:
- You want to move your wordpress site ‘olddomain.com’ to ‘newdomain.com’
- Both ‘olddomain.com’ and ‘newdomain.com’ are hosted together.
- That the ‘newdomain.com’ can access the database that ‘olddomain.com’ was using.
Backup your site (Database and files)
Copy all your files from your ‘olddomain.com’ directory to your ‘newdomain.com’ directory
Go to your settings->general section of your new wordpress site e.g ‘newdomain.com/wp-admin/options-general.php’
Update both the fields for ‘WordPress Address’ and ‘Site Address’ to be ‘http://newdomain.com’
By now your site will almost be working but some images and other media will not be working.
We need to change values in the database to stop them pointing to ‘olddomain.com’ for images as once you delete your old site files they will obvisouly not be accessible. You can do this manually or use this plugin I found that works well.
Go to your Plugins section and install the plugin: ‘Search & Replace’ the summary is: “A simple search to find strings in your database and replace those strings.”
Now go to tools and select ‘Search & Replace’ and select ‘Search and replace’ and enter your old domain in the ‘search for’ and your new domain in the ‘replace with’:
Click go and you should be done.
Hope that helped someone out there!