Deleting images from wordpress media library.

AlexanderKagunda
AlexanderKagunda Member Posts: 1
edited January 2023 in Digital Asset Management

Can I delete my images from the wordpress media library after uploading them to cloudinary so that I can free up space in my server?

Tagged:

Answers

  • Vdeub
    Vdeub Member, Cloudinary Staff Posts: 48

    Hi @AlexanderKagunda,

    If you delete an image in WordPress, it will also delete the image in Cloudinary as mentioned here. In your case, you should indeed use the Cloudinary Only storage option to store your assets only in Cloudinary as explained here. This will free up space on your server and let Cloudinary be the source of truth for your media assets.

    Hope that helps.

    Best,

    Loic

  • webmonster
    webmonster Member Posts: 1

    Hi,

    Once the images have been deleted from Wordpress, how can I re-synchronize them in case I change my mind and prefer not to use Cloudinary?

    (assuming that we delete the photos via FTP, not via Wordpress)

  • Vdeub
    Vdeub Member, Cloudinary Staff Posts: 48

    Hi @webmonster,

    Deleting the asset via FTP will result in a 404 for the local URL so the only option you have would be to pull back the assets from Cloudinary using the DAM Extension.

    However, it will create another entry in the database so you will also need to clean up the database for the empty files.

    Hope that helps.

    Best,

    Loic