• Hello, we are hosting some almost historic WordPress websites to keep them open to the public and maybe revive them one day. (Of course always keeping the software up-to-date.)
    Anyway, we had problems with the pictures and received expensive warnings because of copyright on pictures that an editor used 5 or 10 years ago.

    To prevent further damage, I removed all images on file level, leaving only necessary elements such as site logo, etc. Not an elegant method, but with around 3000 images it seemed too tedious to delete them in the WordPress backend.

    Now the sites no longer work properly. The home page, set to show posts page by page, and individual posts load fine (of course most images fail to load), but when I try to open a following page of page 1 of the homepage to see older posts, the site becomes unresponsive. I assume it’s the removed image directories causing the site to hang.

    What would be the best way to solve this? I could restore the image folders but I can’t have them online for longer.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Could you provide a link to one of your websites?

    If you removed all images from the filesystem, what about all of the image links on your site? Removing files won’t automatically remove links from the database. You need to clean up the database too. Of course without a link I am responding blindly.

    I suspect you will need to restore the image files. Then I recommend using wp cli to delete the images in batch mode.

    Thread Starter w-sky

    (@w-sky)

    Yes indeed, nothing is removed from the WordPress database. Instead of images in posts and pages, we see frames with “broken image” symbols. Media library in backend still has all the picture names and descriptions, but also will show “broken image” symbols for missing images. Here is a link: https://konopravda.com/

    This is not beautiful but would be o.k. for us…

    I also thought of creating a shell script which will sort of copy the complete image folders and contents, but replacing each image with a default image in same format scaled to exact same size.
    Even if having thousands of files with the same image is a waste of storage, storage is not the problem. ??

    BUT this exceeds my script programming skills.

    Thread Starter w-sky

    (@w-sky)

    It seems like no one has an idea how to solve this problem?

    I could do it the proper WordPress way, restore the image folders and then delete the images in the media library, but I shy away from this task because it will be very cumbersome and lengthy with thousands of pictures.

    Also, I would like to keep the database info about the images because at some later point in time, we might be able to reliably check the images. It’s like 99.8% of our pictures are own creations or creative commons and 0.2% are probably copyright traps, but it seems impossible so sort it out. This is why it’s so sad that all images have to be removed.

    If I somehow could select the pictures that shall not be deleted like logos etc., about 20, and then click a button to delete all others, this would help to make it quick.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Removed images from filesystem, now the site seems to break’ is closed to new replies.