How to Export my Listings via CSV
Business Directory supports a CSV exporter within the plugin under Directory → Import & Export. This is the easiest way to get data out of the plugin (and is useful for bulk editing of listing data).
CSV Exports are now supported in Business Directory 3.4 and higher.
To export ads via CSV, you must have data in your directory, either through direct entry OR via CSV Import.
NOTE: Please note that the export process is a resource intensive task. If your export does not succeed try disabling other plugins first and/or increasing the values of the ‘memory_limit’ and ‘max_execution_time’ directives in your server’s php.ini configuration file.
HELPFUL HINTS with CSV Imports and Common Errors to Avoid
- Your CSV file should be based on the sample CSV file that is created under Directory → Import & Export. Generate that if you haven’t already.
- Your CSV file must have every column from the sample file, named exactly the same. Don’t delete any of them
- Your CSV file should have data in every column that is required. Optional columns/fields can be left blank, but should not be deleted
- Text fields can’t have single quotes in them without putting double quotes around the whole field (e.g. “Bob’s Market”)
- Dates must be in the expected format of the CSV import settings
- Imports work best after you’ve completed all field configuration, so make sure you do that first (especially naming)
CSV Import Options
Here are the options you can configure for importing data.
Which listings to export?: How to filter the exported listings: All, Active, or Active + Pending Renewal.
Export images?: Checkbox indicating whether you want to output the images with listings or not. If you’re doing bulk data edit, don’t check this option as it speeds up the export.
Additional metadata to export:: Checkboxes for optional columns to include in the export. If you are doing bulk data edit and plan to re-import the data, be sure to check the option “Include unique IDs for each listing (sequence_id column).”
CSV File Settings
Column Separator (required): What separator should be searched for between columns? Default is comma (,). Do not duplicate this separator in the other separator values!
Image Separator (required): What separator should be searched for to separate multiple images in the image column? Default is semi-colon (;). Do not duplicate this separator with the column separator!
Category Separator (required): What separator should be searched for to separate multiple categories in the category column? Default is semi-colon (;). Do not duplicate this separator with the column separator!
How to Export my Listings via SQL
Some cases may require you to pull the data in a different format, and we have this (older) FAQ about it:
We definitely recommend the CSV Export *first*.