Mass photo import from Coppermine to WordPress
Here's a bit of MySQL trickery to copy all the captions and descriptions from a CopperMine picture database into WordPress. This assumes that
You have already imported the collection of photos into WordPress as attachments, using the "Add From Server "plugin
All the attachments have unique filenames, and the filenames are identical to the ones when they were in Coppermine
The destination database is called "railpac" here (change accordingly)
You are the mysql> prompt using your Coppermine database
BE SURE TO BACK UP YOUR DATABASE BEFORE DOING THIS! And be familiar with how to restore things if you are not pleased with the results.
update railpac.wp_posts wpp, railpac.wp_postmeta wp set
wpp.post_content= (select caption from cpg133_pictures p where
substring(wp.meta_value,length(wp.meta_value)-locate('/',reverse(wp.meta_value))+2)
= p.filename) where wpp.id = wp.post_id and
wp.meta_key='_wp_attached_file';