[wp-hackers] Grouping uploaded media items and bulk ( programmatic ) upload method perhaps

Johannes Ruthenberg tech at johannes-ruthenberg.de
Tue Nov 23 18:13:19 UTC 2010


Hello!

> 1- Copy and paste the files ( the thousands of files [images] from the
> current server's uploads folder ) into wp-uploads
> 2- Then write a script ( I'm most confortable with ASP) to read the
> meta data of those images from our current CMS>SQL table to port/map
> it into WordPress tables.

I think that should be possible without too much hassle. It won't be a 
perfect solution and probably a solution that breaks in the future, but 
as a script for one transfer that should work.

I think, you should create a test database and compare a database dump 
from before and after an image upload. Also do that with the Media Tags 
plugin. This way you should see what traces the upload of a single 
images leaves in the database. You could then write a script to just 
insert your files in the database, based on the information from the old 
system.


> Currently my images are grouped in folders. Does wp-uploads folder
> store all images in one layer or does it support folder's in there as
> well? In other words, will I be able to have
> wp-uploads/old-server-images/people
> wp-uploads/old-server-images/animals
> wp-uploads/old-server-images/plants ?

WordPress either stores all files in the same folder or groups them by 
year and month. You can decide which way to use on the media options 
page. I'm not sure that it's worth keeping any special structure for 
your imported images, as new ones most likely won't adhere to any other 
folder structure.

Of course, there could be a plugin which allows you to define another 
folder structure for uploads. I'm just not aware of any current plugin 
that does that. Also, the question is if it is relevant in which folder 
the file is stored, as long as the media page allows you to filter by tag.

Regards,
Johannes


More information about the wp-hackers mailing list