This Page is for DNUI WP and PRO version, working in WordPress 4.5
DNUI, What is it?
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 want 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.
DNUI PRO vs WP (Free version)
DNUI PRO is a extends version of the open source version, this one contains some helpful features, like:
- Delete all automatic button, this will go page by page and delete all images not used
- Compatibility with WooCommerce (the main WooCommerce plugin, not other extends plugins)
- Ignore images by clicking in the image name
- Ignore size by clicking in the size name and include this size name to the ignore size list if this size does not exist
- Restore all backup button
- Delete all backup button
How it work
When you upload one image to your WordPress site, this one will be attached to one post or page, normally if you make the upload out of any post/page, this will be attached to the last post made.
So 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 installed 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.
The PRO version have compatibility with WooCommerce and i can add more if you want or if you made other your own compatibilty with other plugin you can send me a merge request.
Understanding the plugin
You have 5 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
- 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
And you have this short actions:
- Delete all button, this will call every delete button
- Delete automatic button, this will go page by page calling the delete all button for you. (only at the PRO version)
- Ignore sizes by clicking at the size name (only at the PRO version) (but you can do it with the WP at the Options tab)
- Ignore any image by clicking at the name (helpful if you found out image that are used, but the plugin is telling you that are not used) (only at the PRO version) (there is no similar action at WP version, you have to use the ignore size option to simulate this)
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 powerful backup logic, you can use another plugin before of use this plugin.
- Delete and Restore button, to delete or restore the image deleted at the image tab (reference made by the image id)
- Delete all and Restore all, this is helpful if you delete to many image at the image tab (only at the PRO version) (You can delete all backup manually, using and FTP or SFTP and deleti all file from the dnui_backup folder in the upload WordPress folder)
One of the more important part of this plugin, all configuration will made here (all change will be save automatically).
You can see what is doing DNUI plugin
- 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.