News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

How to find unlinked / obsolete media / images?

Started by misscherylb, May 14, 2013, 14:52:56 PM

Previous topic - Next topic

misscherylb

Hello, is there any way of identifying obsolete / unlinked media and deleting it? So any media that is just stored, but not actually used anywhere in the website. I'd like to clean up our server and get rid of dead weight...



Also, what exactly does the "Synchronize Media" tool do? It says something about uploading media to certain paths - but they'd already be there anyway or not? So what happens when you click on that button, any danger of messing something up?

jjk

'Synchronize Media' picks all media it finds within your specified image paths and writes the filenames and location of the media files into the database, which makes them available for selection in the VM backend. It doesn't overwrite already existing files in your database. So if you upload i.e. 5 new images to your image folders, clicking the button will result in a notice saying something like "5 images synchronized".

The only idea that currently comes into my mind to locate unused images, is to write an SQL query, which lists those 'virtuemart_media_id' not listed in the 'virtuemart_product_medias' database table.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

misscherylb

hey, thanks for the explanation of the synchronize button! got it :-)

And thanks for the SQL tip! Sorry I have to ask this, but which tables would I use it on and what exactly would the command look like? Sorry, not very experienced with this... help is much appreciated!

jjk

Quote from: misscherylb on May 15, 2013, 11:57:20 AM
And thanks for the SQL tip! Sorry I have to ask this, but which tables would I use it on and what exactly would the command look like? Sorry, not very experienced with this... help is much appreciated!

I'm no SQL expert either, so I can't answer that. But you could i.e. export your database so that you have a copy to experiment with and then use this http://www.w3schools.com/sql/default.asp for your trial and error attempts with i.e. phpmyadmin or HeidiSQL.  The relevant tables are 'virtuemart_product_medias' and 'virtuemart_medias'.
;)
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

misscherylb

thanks a lot for your help! will give it a shot!

misscherylb

hi again, I'm afraid the above suggestion went beyond my modest IT skills... couldn't figure it out, sorry...

but I found this Xenu Link Sleuth
http://home.snafu.de/tilman/xenulink.html

Worked excellent for one of our websites.

Now on the other I'm having trouble because most of it is password-protected and only accessible after logging in, it seems there is no way of getting Xenu to work (already contacted developer and tried a few things, no luck...)

Does any one know of any other solution? A different program perhaps that might do the trick?