How to Add Uploaded Media to WP-DownloadManager
WARNING: All of the recommendations in this post work off of a test database. The following commands could damage your live site if not tested first. Always work off a test site, then perform a database backup before doing any of these things.
I was faced with a challenge at work this week: I wanted to track how many downloads our forms were getting on the company intranet (built on WordPress). I had already uploaded over one thousand forms to the site. I needed an upload tool that would be able to look at all of the forms and other media that we have accumulated. Unfortunately, none of the download counter plugins for WordPress will look add existing media, and they all want you to upload your forms (or media) through their “Add download” button.
Well, if I’d uploaded only a couple of forms, this wouldn’t be a problem. But since I was dealing with one thousand, I needed a way to import existing uploads into the new download counter. This would have to be done in MySQL.
I looked at download counters on wordpress.org and found one that I liked: WP-DownloadManager. There seem to be quite a few of them, including WP-DownloadCounter (which I also liked) but I chose this one simply because it had been around longer and had a very high rating.
WP-DownloadManager has a way to import existing forms from the management page, but they have to be done one at a time, and you have to manually type all of your titles over again. This would take way too long. So I came up with a way to migrate all of my uploaded form titles and filenames to the WP-DownloadManager’s database.
Related posts:
- Search and Replace a Custom Field in WordPress using PHPMyAdmin
- Search and Replace MySQL using PHPMyAdmin
- How to Bulk Import into a MySQL Database
- Delete Comment Spam using a Cron Job
- Allowing Uploads via the Media Uploader
Comments
2 Responses to “How to Add Uploaded Media to WP-DownloadManager”
Thank for Information
Hi, cool post. I have been wondering about this topic,so thanks for writing.