Moving images after a messed up Wordpress move
December 19, 2015 8:39 AM   Subscribe

Recently two Wordpress sites of mine were merged into one, by someone else. But some of the images didn't transfer, though the posts did. So at this point, I can go into one of the moved posts with the missing images and the image is just a blank box with the URL pointing to the old website. There are about hundred+ posts like this.

I can FTP in and get the old images and move them into the corresponding folders on the new server. Then I COULD go in and manually change all the urls in every single post. But that sounds like work! Is there a Wordpress plugin that would do the search and replace for this URLs and save my weekend? The URL structure is consistent, would just have to change the domain in the urls.

Help me Metafilter, you're my only hope!
posted by Brandon Blatcher to Computers & Internet (7 answers total) 4 users marked this as a favorite
 
Can't you just export all the posts, then do a find & replace on that XML file, and import them back in?
posted by ClarissaWAM at 9:07 AM on December 19, 2015


Best answer: There is indeed a plugin that will replace all of the old URLS with the new ones (once your files are in the corresponding place on the new site, etc): Velvet Blues Update URLs has saved me in exactly this situation before.
posted by sluggo at 9:24 AM on December 19, 2015 [1 favorite]


What about wiping the new setup and doing the import/merge again making sure the image URLs are correct?
posted by eatcake at 9:35 AM on December 19, 2015


Best answer: I just did this yesterday:

https://wordpress.org/plugins/better-search-replace/
posted by humboldt32 at 9:46 AM on December 19, 2015 [1 favorite]


I did something like this in a WP migration but by setting up a mod_rewrite line in .htaccess. It was less work than doing search-and-replaces, if possibly inadvisable from a longterm maintenance perspective. The mod_rewrite does an on-the-fly string substitution for the old URL substring that was lost in the migration, so I think it's providing a similar functionality to what you describe.
posted by mwhybark at 10:01 AM on December 19, 2015 [1 favorite]


If you have access to the database, you could do a search and replace within it.
That's what I do when I'm duplicating a site or changing the url of a site.
PM me and I'll send you the mySQL query I use.
posted by drinkmaildave at 9:51 PM on December 20, 2015


Better Search Replace is the way to go presuming the urls are structured as simply as you indicate.

But you mentioned some of the "images didn't transfer" - what does that mean? Are they no longer on public websites? Are they stuck in an FTP server? Not sure I get that part given the way you describe only the domain being different.
posted by artlung at 8:58 AM on December 22, 2015


« Older Hygienic, traditional tattoo in Burma/Myanmar   |   Deciding whether to resume contact with an... Newer »
This thread is closed to new comments.