Bit off our usual blog subject this one but according to my SEO specialists I needed to move our WordPress blog to a new URL and server for solid SEO reasons. It sounded as though it should be straight forward and as I am technical competent but not a techie I thought I would do it myself taking guidance from Google searches. A google search turned up a ton of information, most of it overcomplicated techno babble, so I used the simplest guides here and here and set to work. Our blog is typical with a decent theme and a bundle of plugins and hosted at claranet in the UK.
The whole job took about an hour and a half, wasn’t especially complicated for someone with a bit of technical knowledge and importantly, it worked!
This might help others so here’s what I did.
- Set aside two clear hours
- Set up the target directory. This was a sub directory on my main website where I wanted to move this blog to. [ newsite.co.uk/blog ]
- Put a clean install of the latest WordPress into the target. WordPress howto here
- Backed up the old blog not once but twice.
- Using ftp downloaded the whole wp-content folder from the source [oldsite.co.uk] to my PC and then uploaded it to wp-content in the target directory. This replaces the installed folder.
- Using ftp downloaded all the files in the old root directory not in folders and uploaded these to the new site.
- Logged into the oldsite server and went to myphpadmin. Exported the “oldsite” sql database to my PC using myphpadmin
- Logged into the newsite server and went to myphpadmin. Set up a new sql database “newsite”
- Imported the oldsite database and Hit A Problem. Oldsite would not import and gave a “#1044 – Access denied for user...” error. Using the guidance here I edited the oldsite SQL database and removed the whole lineCREATE DATABASE `username1_wrdp9` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
- Tried importing again and up it went with no problems
- Opened the newsite wp-config file and edited this to point to the newsite database, the relevant bits are in the first 20 or so lines – they’re obvious.
- Went to newsite myphpadmin and opened the newly imported database table wp-settings. Edited this at line 1 and line 39 so that oldsite was changed to newsite. There were a few other lines that needed changing for some of my plugins. This step is described here
- Checked the newsite was live – it was!! Checked the links worked – they did!!
- Hit A Problem – although all the images in posts were there and clickable the thumbnails on the main page post summaries and for the related posts plug in were not present.
- A google or two later and I found the velvet-blues plugin which updates helps change old urls and links in the website/blog after a move.
- This seemed to do what I wanted so installed it, ran it and boom! All thumbnails now present.
- Logged into oldsite and altered the .htaccess as described here to redirect the old site and all its links to the new site. I used
2.RewriteRule ^(.*)$ http://www.newsite.co.uk/blog/$1 [R=301,L]
- Tested, tested again. All now working at newsite/blog.
- Checked the watch and found 40 minutes left so sat back with a beer.
A quick note to the very clever techies who might read this and know a lot, lot more than me – I am no techie, I can do what I’m told and read and have some computing common sense. I can make no claim that the above was done absolutely right only that it worked for me and it might very well work for you to. Oh and before you do anything backup and backup again.