Welcome to WebmasterWorld Guest from

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)


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 ?



2:43 am on Jul 26, 2011 (gmt 0)

WebmasterWorld Administrator 5+ Year Member Top Contributors Of The Month

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

Featured Threads

Hot Threads This Week

Hot Threads This Month