• Resolved fatpotanga

    (@fatpotanga)


    Hi,
    Long story short: I’ve been approached by a client who, as a result of an out of date contact email, unknowingly had his web hosting expire and as a result all his sites, accounts and crucially all his backups wiped – a lesson for all that needs no further comment!

    I was sent an old .sql dump, and a separate disk with all the sites images.
    It’s an Woocommerce site with lots of products. The site’s back up and running, but because it’s essentially a new install and a brand new (empty) Media Library, all the image paths are broken.

    I need to find a way of uploading all the images again, but relinking them to their old paths. Or vice versa.

    The image names are the same, but as the old Media Library was organised by month and year based folders eg: /wp-content/uploads/2013/02/imagename.jpg there are gazillions of different dates and paths and subfolders.
    Obviously, re-uploading the images will create new date paths.
    I could use the usual site migration tools and find/replace each date and subfolder, but there are so many I wondered if I was missing another option?

    Thanks in advance.

    • This topic was modified 8 years, 4 months ago by fatpotanga.
    • This topic was modified 8 years, 4 months ago by fatpotanga.
Viewing 1 replies (of 1 total)
  • Thread Starter fatpotanga

    (@fatpotanga)

    OK, I’ve found a solution, should anyone else find themselves in a similar predicament.

    Re-upload the images so it creates new thumbnails etc then rename the folder/subfolder by FTP to match the old date stamps listed against the images in the Media Library.
    Regenerate Thumbnails. Delete the now defunct image references from the library.
    Rinse and repeat…

    [ps] I tried the replace media plugins, but they didn’t work as the thumbnails the initial upload generated were missing.

Viewing 1 replies (of 1 total)
  • The topic ‘Media Library – new install, relinking old Date Paths’ is closed to new replies.