How to Add Uploaded Media to WP-DownloadManager



If you uploaded all of your Media using the Media Library, doing the bulk import will take more work than mine did above. That’s because WP-DownloadManager references files by their full file name (like “brockangelo.jpg”) but WordPress references them by title and mime type (like “brock_angelo” for the title and “image/jpeg” for the mime type). So for this to work, MySQL would have to conditionally concatenate file names to file types. Not pretty.

On the other hand, if you need to make this happen, you can perform the following query to output the results to the screen, then paste them into excel to do the cleanup. From there, you can pull the information back in through MySQL. This query shows you all of the media that is in your library, with all necessary info you would need to put into excel for a MySQL import back into the WP-DownloadManager database:

SELECT post_title, post_date_gmt, guid, post_mime_type FROM wp_posts WHERE post_type = 'attachment' ORDER BY ID

Leave a comment if you would need instructions on how to finish this up.

Related posts:

  1. Search and Replace a Custom Field in WordPress using PHPMyAdmin
  2. Search and Replace MySQL using PHPMyAdmin
  3. How to Bulk Import into a MySQL Database
  4. Delete Comment Spam using a Cron Job
  5. Allowing Uploads via the Media Uploader

Comments

2 Responses to “How to Add Uploaded Media to WP-DownloadManager”

  1. LikeCamping on May 22nd, 2009 9:05 am

    Thank for Information

  2. KrisBelucci on June 1st, 2009 9:45 pm

    Hi, cool post. I have been wondering about this topic,so thanks for writing.