0

I am migrating a lot of posts from an old site to a new site, and these posts have a lot of Advanced Custom Field "relationship" data attached to them. Because of this, I want to keep all of the ids of my posts, taxonomy terms, images, etc the same in the new database so that none of these relationships will be lost. I managed to do that successfully with the taxonomies, but I can't figure out how to get the images to work.

In an attempt to do this, I exported all the posts with type "attachment" from the old database and imported them into the new database. I changed all the GUIDs so they point to the new domain rather than the old. I copied the entire /wp-content/uploads/ folder from the old site to the new site, so the paths are still correct.

When I go to the Media Library I can see all the image posts listed, however they all have the default /wp-includes/images/media/default.png "not found" image. If I click on "view" it brings me to the default single.php page but doesn't display the image - rather, it has a text link to the GUID value and when I click that, it does display the image file directly. If I click Edit, I have the fields to enter Caption, Alt Text, and Description, but the large image at the top with the "Edit Image" button is missing. The GUID on the right side is correct.

It seems like there's another connection in the database that I wasn't aware of, since the GUID is correctly connected and yet WordPress isn't able to find the images anywhere. What did I miss and how can I get it out of the old DB into the new one?

0

Ended up taking a different approach - I exported all the content I had already created so I didn't lose it, used the WB Migrate DB Pro plugin to import the content I wanted to carry over from my old site, and them imported all the new data again. A bit roundabout but effective!

  • Cheapest price is $89. I'm on the same boat when i actually do this my apporach will be. gzip the public_html folder backup the mysql database. Upload and expand the files on the new server, import the database. Then i'll have 2 copies of same site. Final step delete the uneeded posts from wordpress dashboard. That way i'm 100% sure nothing gets lost and it's free to do. – Michael Rogers Jun 18 '17 at 14:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.