How do I ‘rebuild’ the WordPress Media library after transfer to new host?

Question

I recently inherited a large site from a developer that vanished. The site has more than 6,000 images. In the pages most of the images are missing, however, they are referenced in the media library and I can see them on the server under wp-content/uploads. When I try to access any of these images with the blank thumbnail I get the following error message:

Missing Attachment

Given that this site has been moved to a new host I am pretty sure that these images are not properly referenced but I am not sure how to modify the path to the images to get them to show up properly. I did some research and tried the following:

UPDATE wp_posts set post_content=REPLACE(post_content, 'mysitexyz.net.basepointsite.com/', 'mysitexyz.net/');

What is the correct way to re-associate these images and have them appear correctly in the media library?

0
forrest 8 months 2020-12-04T16:10:26-05:00 0 Answers 9 views 0

Leave an answer

Browse
Browse