Welcome to WebmasterWorld Guest from 23.20.221.93

Forum Moderators: phranque

Message Too Old, No Replies

Moved domain , image content hardcoded to old domain

Can i fix this in htacess?

     
11:54 pm on Jun 30, 2011 (gmt 0)

New User

5+ Year Member

joined:Apr 20, 2011
posts: 31
votes: 0


Hi,

I changed WP from olddomain.com to newdomain.com ( Did this with a parked domain in hosting cpanel and changed urls in WP backend ).

Everything works fine except a lot of contents images have hardcoded image urls , these naturally dont show up when visiting newdomain.com

Is is possible to rectify this situation without having to go through 1000s of posts etc to change the URL of the images using htaccess ?

Thanks
David
2:43 am on July 26, 2011 (gmt 0)

Moderator from GB 

WebmasterWorld Administrator 5+ Year Member Top Contributors Of The Month

joined:Apr 30, 2008
posts:2599
votes: 179


Why don't you export the WP MySQL database, open the export with text editor and do (a careful) global search/replace of the domain name to a new domain name and then upload (and replace) the data? In this case you have to export the database with "DROP IF EXISTS".
3:48 am on July 26, 2011 (gmt 0)

New User

5+ Year Member

joined:Apr 20, 2011
posts: 31
votes: 0


Hi,

Thank you for the reply, I posted this some time ago and since found a plugin for WP called "search and replace". I did back up the DB before it but the plugin offered the possibility to narrow the search to content only and it worked a treat.