• Here is the situation. I had a site online. I created a new version of it offline, but its using mostly the same images – I just re-did the design with a new theme.

    I did all the steps in moving it – deleting my old online database, making a new one, exporting the local database into the new online one, changing the wp-config, etc. I just didn’t copy over any files because I have wordpress and the new theme in the online server.

    The site works…all the new pages created offline are now online, but all the images are X’s or blank image placeholders in the media library…but it does not show all my older images that are still online on my server in their original folders. I was trying to just do the site design and keep the original images with their original dates in the metadata.

    I assume I’d have to edit the folder locations in the database but how would I do this? Is there a plugin for this? For example, when I put the image into my new design site it might show a folder location like uploads/2019/12 but the same image that was used on my old version site is online in a folder like uploads/2015/6. So what would be a good way of editing this, and where would I even find the image in the database?

Viewing 4 replies - 1 through 4 (of 4 total)
  • When you deleted the old online database, you deleted all the information about the old images. And if you loaded your offline database directly, you will have references to filenames using the path like “localhost” for the new images.

    You can use a plugin like Import Legacy Media or Add From Server to get the old images back into the database, but I think they will have different IDs, so the class names on them in the content could cause the wrong file to be used to calculate the responsive image sizes.

    You should use a plugin for migration, which will change the domain for you and make sure everything is correct.

    Thread Starter AV8NLVR

    (@av8nlvr)

    I forgot to mention, after I exported my new offline database I opened it in Notepad+ and did a search and replace – replaced all localhost references to my actual domain name. And then I imported it into the new online db.

    I found a plugin called Media Sync which looked like it would work. It scanned the uploads directory for all images and I clicked import. Now, when I look in my Media Library it takes forever to load because its going thru all the missing ones but it does get to the older ones, some of them are there. It is weird. When I look in my file manager, I see the actual image file there. When I look in wordpress media manager, under that month’s folder where I know it is located, it does not show up unless I type the image title in the search bar, then its there. If I’m on a page and pull up the dialog to add an image to the page, it won’t come up unless I type only part of the name in the search box.

    Thread Starter AV8NLVR

    (@av8nlvr)

    I just checked again. Take one folder as an example. I have 124 images in there from before, that were re-synced with Media Sync, and they show up in Media Manager when I select the List layout. But when I select grid layout, only 40 of those images show up. But the missing images will show up in grid layout if I type its name in the search box. I can’t figure out what is different with those 84 images than the other 40.

    Since you have moved on from having two distinct sets by using that plugin, it’s time to ask your question over at that plugin’s support forum. I have no idea what that plugin did.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Help With Image Links on Site Moved From Local to Server’ is closed to new replies.