CSV Imports - Useful Tips
How to get Sample CSV file to prepare to import listings
Add your custom fields and categories ( How to Add a Custom Field to CPT? )
Add your own sample listing (Add one with just the required fields, another filling all fields.)
Download the export CSV containing your sample listing
Open the CSV with Libre or Open Office (Do not use Excel - it adds characters that break the import process).
Merge your data into the export CSV. Be careful to leave the column headers and column order as they are.
Save your new import file with a new name.
Import the file. Take note of the option to update listings. You do not need to update if you just want to create new listings.
More tips for flawless imports:
ID Blank - For making new listings, the ID column must be blank. Make sure there is no value in the ID column. WordPress will assign an ID automatically to new listings.
Test Import First - Split your import sheet. Import just 2 or 5 records to test it. Check each listing to make sure it appears as expected.
Tag Import Batches - Add a custom tag to the CSV like "deleteme", "testdata" or "Batch3". Once imported you can use the backend listing page tags to select the batch and bulk edit tags or delete the listings.
Assign Categories - You will need to assign categories to your imported listings. The Category ID must be added in the category and default category columns. The default category should have only one ID, and that ID should also be present in the category column.
WP All Import shouldn't be necessary. GD's built in importer is easy to use and very reliable. But, if you want to use WP All Import, be sure to install and activate our integration addon, then look for the tab for 'GeoDirectory Addon' in the import edit settings where you can map your data to GD fields.
When importing a CSV file in GeoDirectory, there are certain tips to bear in mind:
- You cannot import abbreviated states; for example TX. You need to have the full names for states in the CSV file. The reason for this is simple -- abbreviated states, when imported, break Google Maps API calls.
- CSV file should not have blank lines.
- CSV file should not have #NAME as address. Even though it is theoretically not an error to have "John" as the address, it is an incorrect address that will break Maps API.
- Date should not be 00-00-00 -- perchance you do not have an expiry date, it is better to leave it blank than set it to zero.
Learn more about Importing and Exporting data here.
Seeing errors in your import?
Try turning on WP Debug to get log reports about every failure. Add this to your wp-config.php file to enable debug and the debug log. Errors will be written to the log with line/row numbers in WORDPRESS_ROOT_FOLDER/debug.log file
define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', false );