• Resolved christopheran

    (@christopheran)


    Hi all,

    Okay, after 10 years, I want to start with a fresh WP install, leaving all the old remnants of previously used plugins, customizations, old scripts and work-arounds, behind.

    – I set up a new WP install on a test.domain.com site

    – imported users using a plugin

    – imported pages and posts using WP export/import tools

    – then came media… I have way to much to export/download/import. I used rsync to copy everything from the old /uploads/ file to the new one.

    I thought that when I imported the posts that would include the link to the featured image, and when I had the images copied over into the new uploads folder, all would be well.

    But apparently not. none of the posts are linked to their featured images, and nothing appears in the media library, despite the /uploads/ being full of files.

    So… what to do now to get the media library populated with whats in the upload folder and get the featured images connected to their posts?

    I have phpmyadmin available if I need to copy something from the database over.

    Appreciate any assistance,

    Chris

    • This topic was modified 3 years, 5 months ago by christopheran.
Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter christopheran

    (@christopheran)

    Wonder if I just copy over the postmeta table… or maybe download it and clean out any old plugin data before uploading it to the new database?

    Thread Starter christopheran

    (@christopheran)

    hmm, copying over the postmeta table didn’t do it.

    >>But apparently not. none of the posts are linked to their featured images, and nothing appears in the media library, despite the /uploads/ being full of files<<

    @christopheran You’d need to import image IDs to the database for them to appear in the media library. Use this plugin: https://www.ads-software.com/plugins/media-sync/

    >>So… what to do now to get the media library populated with what’s in the upload folder and get the featured images connected to their posts?<<

    Use this: https://www.ads-software.com/plugins/quick-featured-images/ and this: https://www.ads-software.com/plugins/velvet-blues-update-urls/
    Let me know how it goes ??

    Thread Starter christopheran

    (@christopheran)

    I can use Media Sync and it will set the media up to appear in the Media Library.

    However, it doesn’t seem to affect the missing featured images in the posts. I took a look at the Featured Images plugin and it looks like it would be handy if I was going to assign each by hand…. but I’ve got almost 10,000 posts, would rather not assign each individual image by hand ??

    Surely there is something I can copy over from the old database to identify which images go with each post?

    You are correct @christopheran ??

    However, the_post_thumbnail is a function that “runs” on the “theme” side of things (Not the DB). In short, you need to have a theme that supports post thumbnails, and to have it working you need the SAME theme when migrating so as to be functional OR adapt to the new one.

    The quickest and easiest way to resolve this: https://www.ads-software.com/plugins/regenerate-thumbnails/

    Next, to mass change image URLs, you can use this: https://www.ads-software.com/plugins/better-search-replace/. Here is how to use it: https://blog.templatetoaster.com/update-old-urls-in-database/

    Hope it works!

    Thread Starter christopheran

    (@christopheran)

    Okay, what I did was dropped use of the default WP import/export, and just copied over wp_posts and wp_postmeta from the old database to the new one, because otherwise the featured images were lost. I’m certainly no expert at moving sites (obviously), but it seems like the export/import needs much improvement.

    Now that I have the featured images attached, I can use regenerate thumbnails for the reasons you mentioned.

    Thank you,

    Chris

    >>Now that I have the featured images attached, I can use regenerate thumbnails for the reasons you mentioned<<

    @christopheran Yes ofcourse!

    >> I’m certainly no expert at moving sites (obviously), but it seems like the export/import needs much improvement<<

    Agreed 100%. Its way too manual at this point even with search and replace DB options. I wish someone comes up with a better solution.

    Your welcome- Have a great day ahead Chris ??

    Thread Starter christopheran

    (@christopheran)

    Wah! Images are attached now, but I just realized I lost the author info for each post! Yikes…

    Fixed by copying wp_users and wp_usermeta over from old datbase, I guess I should have just used the old database!

    • This reply was modified 3 years, 5 months ago by christopheran.

    @christopheran Great going ??

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Import/Export to new site… links to media lost, how to fix?’ is closed to new replies.