This Page is for DNUI version 2.0 working in WordPress 4.4
What is DNUI
Delete Not Used Image is one wordpress plugin that will help you to find all image that they aren’t in use in any wordpress post or page, this will explain better after.
Why you one to delete unused image? Well when you upload one image to wordpress, this one will make 4 sizes of the original one (maybe more or less than 4), so you will have 5 image for one upload, you probably will use one or two size for show the image, so the others 3 sizes will stay in your server doing nothing, well not nothing, they will be occupy space in your server and database, so if you don’t have a lots of space in your server and database, you will arrive to have one big problem with the server and database space.
WordPress doesn’t have the option to delete this sizes, the only native options is delete the original image with all sizes, if and only if you don’t use any of the original and sizes of one image. So this plugin will find all the image that aren’t use in your WordPress site.
When you upload one image to your WordPress site, this one will be attached to post/page that you make the upload or if you use the uploader without any post/page, this will be attached to the last post made. When you put this image in the post/page, you will have some img url in the text, something like this
<a href=”http://www.nicearma.com/wp-content/uploads/2014/07/facebook-conexiones-21.png”><img class=”aligncenter size-medium wp-image-2968″ src=”http://www.nicearma.com/wp-content/uploads/2014/07/facebook-conexiones-21-600×554.png” alt=”facebook conexiones 2″ width=”600″ height=”554″ /></a>
If you see i have the original image facebook-conexiones-21.png and facebook-conexiones-21-600×554.png the medium size 600×554
So the plugin DNUI will get all the images from the database and try to find the match between then and all post/page made, if any match is found the plugin will think that the image or sizes are not used, so you can have the option to delete it.
And what happen if you use WordPress for another think that make post or page, well this plugin can fail, because you install some plugins that change how WordPress work, but don’t worry, you have one option that will help you to make the plugin work anyway.
Understand the plugin
You have 4 menu parts
I put important information, you have to read this!!!
This will show you all the images of your WordPress Site, with labels USED or NOT- USED
You will have the rights to delete:
- Delete the original, if this one and the other size unused or the size aren’t in the ignore size option
- Delete any size if this one is unused and the size is not selected in the ignore size option
You can configure the plugin to make backups of all image deleted by this plugin, but is a very simple logic and is not for extend use, if you want a very powerfull backup logic, you can use another plugin before of use this plugin.
One of the more important part of this plugin, all configuration will made here (all change will be save automatically).
- Make a save (Backup) of your database and your file (especially the uploads folder), because the code have to update the database and delete files, this is irreversible, so if something goes wrong is better have a backup.
- Performs tests on any site other than your own production site, but having the same characteristics, since i have not tested the compatibility with others plugins, so you will see if it is working fine.
- Make the same test in your production site.
- For do test, activate the option backup of the plugin, this will helps if something goes wrong to restore the image and row of the database changed.
- Download this plugin only wordpress.org.
The easy way:
- Install the plugin direct from your site and the plugin admin area
The hard way:
- Donwload the .zip file from wordpress.org
- Upload the zip file from your wordpress plugin area.
- Or upload the the folder from the unzipped dnui.zip to the folder of wp-content\plugins
- Make sure if you use the backup option that PHP can write in the backup file of the plugin.
Why the name
Well the last explication will be the name Delete Not Used image, you maybe you will ask why not Delete Unused Image, well the problem was, that the first version of this one was a remake of one plugin took of the web DUI, so make a remake and put the same name was not a very good idea. And i pick this name because i’m from some Spanish country, i live in France so i speak all the time french and if i use the same logic of this last 2 language the name will be similar. But at this moment i see a lots of plugin like this one but with somes better names like cleanup image wordpress, clean image, clean image upload, but are the same that mine.