homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Hardware and OS Related Technologies / Website Technology Issues
Forum Library, Charter, Moderators: phranque

Website Technology Issues Forum

Moved domain , image content hardcoded to old domain
Can i fix this in htacess?

Msg#: 4333356 posted 11:54 pm on Jun 30, 2011 (gmt 0)


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 ?




WebmasterWorld Administrator 5+ Year Member Top Contributors Of The Month

Msg#: 4333356 posted 2:43 am on Jul 26, 2011 (gmt 0)

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".


Msg#: 4333356 posted 3:48 am on Jul 26, 2011 (gmt 0)


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.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Hardware and OS Related Technologies / Website Technology Issues
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved