Wordpress migration problems
November 26, 2016 5:46 AM   Subscribe

Images on my free Wordpress blog are not showing up after moving from a Wordpress installation on a different/paid host, although they are in the media section

I moved my Blog from a paid web host to the free Wordpress.com site, as I was paying a lot for very little value (previous question on askmefi here).

However, the links on my blog for images within the posts are still pointing to the previous URL (blogname.com/post1.png) instead of the migrated URL. Wordpress.com does not also allow third-party plugins, so I am left with manually editing and republishing all the links to the images.

Is there any way to avoid this?
posted by theobserver to Computers & Internet (10 answers total) 2 users marked this as a favorite
 
We should clarify, are you talking about links to images within the HTML in the page/post content, or links with database associations (featured images, for instance). I'm not sure if there's help, but there's a couple of ways for the old URL to stay stuck.
posted by humboldt32 at 7:16 AM on November 26, 2016


I'm on mobile, so I can't search, but this sounds like the sort of thing a one shot plugin would fix, and it seems like a common enough problem for it to already exist. I haven't fooled with WP in a long time, but it seems like a few lines of PHP could do a find and replace across the post database.
posted by codacorolla at 7:56 AM on November 26, 2016


Response by poster: @humboldt32: These are links within the HTML content to images that are in the media section of the blog.

@codacorolla: As I mentioned, Wordpress.com (the free online version) does not have support for adding plugins beyond what comes standard. Any pointers if it can be done?
posted by theobserver at 9:50 AM on November 26, 2016


Ah, sorry, flipped the order of events around in my head. Yeah, free WP.com installs won't let you use a plugin. One option might be getting a cheapo month of hosting, doing the switch with a plugin (if it exists) then importing from that dummy account.
posted by codacorolla at 12:01 PM on November 26, 2016


I believe you could also set up a local host (offline sandboxed simulated web space) to do this without paying for hosting, but that's out of my depth.
posted by codacorolla at 12:05 PM on November 26, 2016


I think you're stuck doing by hand.

You could go back to the self-hosted site and run Better Search & Relace and then replace the hardcoded URL to relative paths by removing the "http://www.youdomainame.com/", and the re-export and re-migrate.
posted by humboldt32 at 12:56 PM on November 26, 2016


I can't look right now, but find out if you can download a CSV of your site/entries from the free Wordpress install. (I would be shocked if you cannot.) If you can, you can do a find and replace within the CSV for the old URL, and re-upload/re-import.
posted by DarlingBri at 1:16 PM on November 26, 2016


if you still have blogname.com, you could switch to the $3/month 'personal' wordpress.com hosting package that would allow you to use that custom name.
posted by noloveforned at 1:59 PM on November 26, 2016


Yes, given it's wordpress.com, you are left with manually editing and republishing all the links to the images.

The idea DarlingBri has is solid idea, but requires some technical caution. It also has some potential downsides. In short, you would use the EXPORT feature (note that page is long with a lot of ins and outs, though if your site is relatively simple perhaps it's less daunting). Once you export you will have an XML file you can edit to make all these path alterations. Once you do that, then you can reimport using the IMPORT feature.

Now, between the export and import step - do you put the existing posts all in the trash? If you reimport will that process clobber all the URL slugs associated with your posts? Will it make new url slugs to assure there's no conflict? I don't know. The export is painless though, and you could make a new wordpress.com blog and import the edited XML to test it out.

Lots of steps here. If it were self-hosted humboldt32's idea is the simplest way to get you running again. Being on wordpress.com comes with limitations.

Good luck.
posted by artlung at 10:40 AM on November 29, 2016


The document path might be different on the new host i.e root folder path of the domain. Due to that images are not showing properly even though they are present in respective folder. You may need to check the internal path via database or script and change it to your new host root path. This may fix your issue.
posted by MilesWeb at 3:22 AM on March 14, 2017


« Older How do I break up?   |   Elderly person has no appetite Newer »
This thread is closed to new comments.