- Install WP-CLI
- Install and activate this plug-in (as any other WordPress plugin)
- In the command line run
wp eo venue import --help
for details on how to run the script
Always run --dry-run
first to check how the venues will be created:
wp eo venue import /path/to/my/venues.csv --dry-run
The script assumes that the columns of the CSV are, in order:
- name
- description
- city
- state
- country
- latitude
- longtitude
By default it assumes a comma delimiter is used. You can change this with the --delimiter
:
# Importing file that uses the semicolon delimiter
wp eo venue import /path/to/my/venues.csv --delimiter=semicolon --dry-run
# Importing file that uses the tab delimiter
wp eo venue import /path/to/my/venues.csv --delimiter=tab --dry-run
If the first row is a header row, and should not be imported, use the --skip-first-row
flag:
# First row is ignored:
wp eo venue import /path/to/my/venues.csv --skip-first-row