CM Download (CMDM) - Extras - Import/Export
Navigate to Admin Dashboard → CM Downloads → Import/Export.
Plugin comes with CSV import/export functionality. It allows user to export downloads as CSV file and to import data from this format. A good method will be to first export download you already have to get a csv file which you can use to update and upload again the new files you need
CSV file format
Following columns in a such order will be imported from your CSV file.
- Id - Post ID - not included on import.
- Title - Download title.
- Type - Package type, one of following: file, url, shortcode.
- Source - Source file URL or local absolute path to the file. Single value or JSON-encoded array with multiple values. On import these files will be downloaded to the cmdm directory.
- Description - Download description. May contains HTML tags.
- Status - Post status, one of following: publish, draft.
- Categories - Categories list separated by commas. May contains categories names, slugs or ids. During the import the missing categories will be created. Optional on import.
- Mime - Download mime type, for example: application/zip. If missing, will be recognized. Optional on import.
- Slug - Download slug. Optional on import.
- Page url - Permalink to the page that download has been previously exported. Optional on import.
- User id - ID of the user on the Wordpress the download has been exported from. Optional on import.
- Author display name - Display name of the user on the Wordpress the download has been exported from. Optional on import.
- Views - Number of views. Optional on import.
- Tags - Tags list separated by commas. May contains tag names, slugs or ids. During the import the missing tags will be created. Optional on import.
- Screenshots - Screenshot URL or JSON-encoded array with multiple URLs. Optional on import.
- Created date - Download created date. Optional on import.
- Modified date - Download modified date. Optional on import.
Notices: Columns from ID to Description are required, but the ID may be empty
Please use the UTF-8 formatting.
Below: example CSV file.
Import from server file system
Prepare the CSV files only using a dedicated CSV editor or a spreadsheet editor as MS Excel or OpenOffice Calc in order to make sure you won't make any mistakes with the CSV format (especially when using HTML). Also use the UTF-8 encoding for the CSV files.
To import downloads from server filesystem choose directory and set Status after import (published/draft). Click Import files to finish.