Hey there… I need someone who know knows enough about Wordpress and mySQL to suggest a way to fix this…
I migrated my website from GoDaddy to HostMetro, and used a backup tool called “Updraft Plus” to basically clone the whole thing, download then upload to my new host, replacing it all. The only problem is that somehow it changed all the urls within my website to the old domain that was there (of mine) previously.
BACKSTORY: I had intended to rebuild and totally redesign my website on a development server and launch it before Aug 8 (when my GoDaddy hosting package expired). Then when it was finished, I’d deploy it underneath/as a subset of the larger domain that is more anonymous and will become my business name. However between my PayPal issue to weeks ago and my other day job, the redesign was behind schedule. Then GoDaddy pulled the plug a day early (yesterday) so I just quickly loaded it on the server, overwriting the files because there was nothing there except a landing page. ===
THE PROBLEM: Although everything is accessed fine through http://SamuelColtXXX.com/ all the links and images link to the previous domain name.So I think maybe a search/replace happened within the database? Knowing that this would screw up all my SEO and permalinks, I immediately put up a ROBOTS.txt to stop them from crawling these new URLs. I don’t think I did it fast enough because it looks like some are now indexed.
So… how do I switch the links and images back to the pre-migration URLs of http://SamuelColtXXX.com/ ???
Can I just run the âsearchandreplacedb2.phpâ and switch it back? I think what happened is explained here on this page. But I don’t want to f1ck it all up again so I need advice before I do it.
Thanks!
Re: Wordpress migration / Database domain name problem
Personally, I just do a search and replace via SQL but if your not comfortable with doing that, use this http://wordpress.org/plugins/velvet-blues-update-urls/
Re: Wordpress migration / Database domain name problem
Thank you! I’ll try that.
Re: Wordpress migration / Database domain name problem
No problem, the plugin is one of Wordpress recommended when it comes to moving host, so it should do the trick.
Re: Wordpress migration / Database domain name problem
I am not sure I understand what you are asking for.
Looks like your domain name is same as before: http://SamuelColtXXX.com/
You might need to update the name server as well. Use the DNS of your new host to replace the DNS of the old host.
If you wanna do a batch string find/replace, I recommend SQL command line other than the 3rd-party plugins coz many of them have bugs. They are not compatible with all wordpress versions and themes, therefore could cause problem on your DB.
e.g. if you wanna change http://samuelcoltold.com/ to http://samuelcoltnew.com/
under your CMS, open phpmyadmin. open your DB, click SQL tab, input:
update wp_posts set post_content = replace(post_content, ‘http://samuelcoltold.com/’, ‘http://samuelcoltnew.com/’);
** Case sensitive. **
** Please make a full backup before you execute that command. **
Good luck.
Re: Wordpress migration / Database domain name problem
I was able to get it all fixed and all the links work perfectly. Thanks guys, I was super frustrating.
MenSparkle, thanks for the advice. Checking out my DNS records now and make sure everything is in order. The unexpected move from GoDaddy really set it all in a tailspin at the worst possible time as I had financial people reviewing my websites as this was all occurring. My partners music website was down right when a music producer wanted to listen to his tracks! I’m happy it is all back to as it was before the move and now I can focus on upgrading the design and optimizing the server.
Now… how do I get the other umbrella URL website working and build a staging site for the redesign?