Mobile app version of vmapp.org
Login or Join
Jessie594

: How to restore deleted images from a WordPress backup without overwriting new content? Our WordPress site has thousands of images and most of them are not used for any content anyomore. The

@Jessie594

Posted in: #Backups #Images #Wordpress

Our WordPress site has thousands of images and most of them are not used for any content anyomore.

The images take about 90% of our total storage so I wanted to get rid of them.
I used a plugin called cleaner that was claimed to delete unused images from WordPress. The plugin deleted the unused images but also deleted some of the images that were used in gallery. Somehow those images were registered as not used so the plugin deleted them.

Now I cannot see any of the images in the gallery. The whole gallery is empty and I cannot add the images back to the system because WordPress won't recognize them since they've been removed from the database.

Thankfully I had made backups of the files and also the database. So I copied the image back to the original places without overwriting the existing images.

The WordPress wasn't showing the images on the media manager and also the gallery was still empty. So I went and restored just the wp_postmeta table from the backup database. The gallery still won't show any images and I cannot find any deleted images on the media manager.

I was suggested the wp_postmeta stored the media files' information.
I could restore the whole database but the website has been updated with new content and going back is not a choice.

Is it possible to revert back the images if I have the old database and old images intact? So that the gallery would show images and the new content stayed intact?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Jessie594

1 Comments

Sorted by latest first Latest Oldest Best

 

@Bethany197

In this case, I would setup a dev environment using the old backup, restore the new content from the live site and then push the development site to production.

p.s you should never work in a live/production environment, just clone your WordPress to test new plugins.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme