How do I mitigate the forward slash problem for URLs of images after a WP migration?


I migrated my WP deployment from the old server to the new server. The site still has the same URL (i.e. but I’ve moved my WP deploy from the site URL to a subdirectory of said URL (i.e. the WP deploy used to be found at, but now it’s at

The good news is that I’ve got all the textual content migrated. The bad news is that the images aren’t loading correctly. I took a closer look at the URLs for images embedded in posts and they all look something like this:

<img style="padding: 7px;" src="/wp-content/uploads/image.jpg" alt="Image" width="172" height="154" align="right" border="0">

Note the forward slash in the src attribute. What’s happening is that the browser is looking to load the image at But the site is deployed at now. I can find the image if I cut and paste the URL into my browser and pre-prend the correct WP site URL (i.e.

What kind of WP kung-fu do I need to correct this?

I have read:

I have looked at these:

And they don’t exactly help.

Avery Chan 2 years 2020-12-31T18:36:58-05:00 0 Answers 0 views 0

Leave an answer