Importing from a CSV File
FreeSince 7.5Included in the free Events Manager plugin.
If your events live in a spreadsheet, Events Manager can import them from a CSV file. One file holds one kind of thing: events, locations or organizers, with one row for each. A repeating event is a single row too.
You see how the first rows will be saved before anything is imported, every row that cannot be imported is listed with the reason, and each import can be rolled back on its own.
The importer is part of the free Events Manager plugin and is meant for one-time imports. For imports that repeat on a schedule, or come from Google Calendar, Meetup and other sources, see the I/O add-on in Importing and Exporting. To move a whole site from The Events Calendar, tickets and attendees included, use the migration tool.
A sample file to start from
Download sample-events.csv. It imports as it is, with every column matched automatically, so you can try the importer with it on a test site, or open it in your spreadsheet program and replace its rows with your own events.
It holds nine events, one for each kind the importer takes:
| Row | Event | What it shows |
|---|---|---|
| 2 | Spring Open House | A single event, with two tags and a cost |
| 3 | Watercolor Weekend | An event over two days, with two organizers and a website |
| 4 | Founders' Day | An all day event |
| 5 | Online Artist Talk | No location, its own time zone, and a website that becomes its online location |
| 6 | Pottery for Beginners | Every Tuesday until a date |
| 7 | Morning Yoga in the Garden | Every Monday and Wednesday |
| 8 | Film Club | Every other Friday |
| 9 | Makers' Market | The second Saturday of each month |
| 10 | Summer Concerts | A list of dates |
See what is inside the file
Title,Description,Start Date,End Date,Start Time,End Time,All Day,Time Zone,Location,Organizer,Category,Tags,Cost,Website,Repeats,Repeat interval,Repeat on weekdays,Repeat on week of the month,Repeat until,Repeat on these dates
Spring Open House,"Tour the studios, meet the teachers and try a free taster class.",2027-03-06,,10:00 AM,2:00 PM,,,Main Hall,Willow Creek Arts,Community,"family, free",Free,,,,,,,
Watercolor Weekend,Two days of painting outdoors with a visiting artist.,2027-04-10,2027-04-11,10:00 AM,4:00 PM,,,Studio 2,"Dana Brooks, Willow Creek Arts",Classes,painting,$60,https://example.org/watercolor-weekend,,,,,,
Founders' Day,"Games, food and live music all day in the garden.",2027-05-01,,,,yes,,Garden Pavilion,Willow Creek Arts,Community,family,Free,,,,,,,
Online Artist Talk,A live talk with this season's visiting artist. Join from anywhere.,2027-03-25,,7:00 PM,8:00 PM,,America/New_York,,Dana Brooks,Talks,online,Free,https://example.org/artist-talk,,,,,,
Pottery for Beginners,"Six evenings at the wheel. Clay, tools and firing are included.",2027-03-09,,6:00 PM,8:00 PM,,,Studio 2,Dana Brooks,Classes,pottery,$25,,weekly,,Tue,,2027-04-13,
Morning Yoga in the Garden,"An easy start to the day, for all levels.",2027-04-05,,7:00 AM,8:00 AM,,,Garden Pavilion,Dana Brooks,Wellness,yoga,$8,,weekly,,"Mon, Wed",,2027-05-26,
Film Club,A film and a conversation every other Friday.,2027-03-05,,7:00 PM,9:30 PM,,,Main Hall,Willow Creek Arts,Community,film,$5,,weekly,2,Fri,,2027-06-25,
Makers' Market,Local makers and food stalls on the second Saturday of each month.,2027-03-13,,10:00 AM,2:00 PM,,,Main Hall,Willow Creek Arts,Community,market,Free,,monthly,,Sat,second,2027-08-31,
Summer Concerts,Live music under the lights on four evenings.,2027-06-04,,7:30 PM,10:00 PM,,,Garden Pavilion,Willow Creek Arts,Music,"concert, outdoors",$18,,,,,,,2027-06-18|2027-07-02|2027-07-16
The events take place at three locations. Import locations.csv first and they are linked to it with their addresses. Without it, the importer creates the three locations with their names only, and says so in the report.
Prepare your file
Any spreadsheet program can save a sheet as CSV (in Excel, File > Save As > CSV UTF-8; in Google Sheets, File > Download > Comma-separated values). The importer needs two things from the file:
- The first row holds the column names. They can be called whatever suits you, since you match each column to a field on the next screen. Names the importer recognizes are matched for you.
- Each row below it is one event, one location or one organizer. Blank rows are ignored.
Columns separated by commas, semicolons or tabs all work, and so do files saved by Excel in a Windows character set.
More files to copy from:
- locations.csv: the three locations of the sample events, with their addresses
- organizers.csv: their two organizers, with contact details
- recurring-events.csv: one row for each kind of repeat rule, including the two Events Manager has no rule for yet
- events.csv: the file used in the walkthrough below, which has one row with a mistake in it
Which file first?
Events link to their location and organizers by name. If a name in your events file is already on the site, the event is linked to it. If it is not, it is created with its name only.
So if you want your locations to have addresses, import a locations file first, then the events. Organizers work the same way: import an organizers file first if you want their email, phone and website filled in, or let the events file create them by name.
Import a file
-
Go to Events then Settings then General and open Admin Tools (Advanced) at the bottom of the tab. Under Import and Migrate, click Import a CSV file.
The importer is opened from Admin Tools. It has no menu item of its own.
-
Under Upload a file, set This file holds to Events, Locations or Organizers, choose the file, and click Upload and match columns. Nothing is imported yet.
Choose what the file holds before uploading it.
-
Under 1. Match columns, each column in your file is listed with the value from its first row. For each one, choose the field it should be imported as, or leave it at Do not import. Columns with names the importer recognizes are matched already, so often there is little or nothing to change.
Every column was matched except Where, which needs to be set to Location name by hand.
Fields marked with an asterisk are needed: a name for every kind of file, and a start date for events. A field can be given to one column only. If you chose the wrong kind of file when uploading, change This file holds and the columns are matched again. Choose another file discards the upload.
-
Under 2. Options, check the import options.
The options offered depend on what the file holds.
-
Click Update preview after changing columns or options. 3. Preview shows how the first five rows will be saved: the dates and times as they were understood, the repeat rule, and the location, organizers and categories each event will be linked to.
Row 5 has a start date that is not a date. Row 6 asks for a repeat rule Events Manager does not have.
A row marked Will be skipped says why. A row that will be imported differently from how it was written says that too.
-
Click Start import. Large files are imported in small batches, so a long file does not time out. Keep the tab open while it runs. Pause and Resume stop and continue the run.
When the import finishes, the result report shows how many rows were imported and lists every row that was Skipped, with the reason, and every row that was Imported, with a note, such as a location that was created with its name only.
Row numbers are the ones your spreadsheet shows, with the column names in row 1.
Your events are now in Events Manager like any others, and the repeating ones show their rule.
The imported events, with the rule of each repeating one.
On your site, each event shows its location with the address from your locations file, and its organizer and cost under the description.
Organizer and cost are listed under the description.
Options
Events files have all of these. A locations file has the first, fourth and fifth, and an organizers file only the last.
| Option | What it does |
|---|---|
| Save imported events and locations as | Published, Drafts or Pending review. |
| Dates written as numbers | Whether 03/04/2027 means March 4 or April 3. Left on Work it out from the file, the importer decides from the file's own dates (see Dates and times). |
| Repeat rules Events Manager does not have | Import as a list of dates or Skip the row (see Repeating events). |
| Skip rows already on this site: events with the same name and start, locations with the same name | Leave it on to import a corrected file again without creating duplicates. |
| Download featured images given as web addresses | When off, only images already in your media library are used. An image that cannot be downloaded is left out and the row is still imported, with a note in the report. |
Columns
These are the fields each kind of file can fill, and the column names that are matched automatically. Capital letters, spaces and punctuation in a column name do not matter, so Start Date, start_date and START-DATE are the same.
Events
| Field | What goes in the column | Matched automatically |
|---|---|---|
| Event name (needed) | The event's title. | Title, Name, Event Name |
| Description | The event description. | Description, Content |
| Excerpt | A short summary. | Excerpt, Summary |
| Start date (needed) | See Dates and times. | Start Date, Start, Date |
| Start time | For example 6:00 PM or 18:00. | Start Time, Time |
| End date | Leave empty for an event that ends the day it starts. | End Date, End |
| End time | Leave empty and the event ends when it starts. | End Time |
| All day | yes for an all day event. | All Day |
| Time zone | A name such as America/New_York, or an offset such as UTC+2. Leave empty to use your site's time zone. | Time Zone, Timezone |
| Location name | The name of one location. | Location, Location Name, Venue, Venue Name |
| Organizer names | One or more names, separated by commas. | Organizer, Organizers |
| Categories | One or more, separated by commas. | Category, Categories |
| Tags | One or more, separated by commas. | Tags |
| Featured image | The web address of an image, or the ID of one in your media library. | Featured Image, Image |
| Cost | Shown with the event as text, for example $25 or Free. | Cost, Price |
| Currency symbol, Currency code, Currency position | Used when Cost is a plain number: 25 with symbol $ becomes $25. | Currency Symbol, Currency |
| Website | A link for the event. | Website, URL |
| Featured | yes to mark the event as featured. | Featured |
| Hidden from listings | yes or no. Kept as an attribute. | Hide From Listings |
| Repeat columns | See Repeating events. | See below |
A row with a date and no start or end time is imported as an all day event.
Cost, Website, Featured and Hidden from listings are kept as event attributes, and Cost and Website are listed under the event's description together with its organizers. An event with a website and no location uses the website as its online location.
Tickets and bookings are not imported.
Locations
| Field | What goes in the column | Matched automatically |
|---|---|---|
| Location name (needed) | The name events will refer to. | Name, Location, Location Name, Venue Name |
| Description | Description | |
| Address, Address line 2 | Line 2 is added to the address. | Address, Address 2 |
| City | City, Town | |
| State or province | State, Province | |
| Zip or postal code | Zip, Postcode, Postal Code | |
| Region | Region | |
| Country | The country's name or its two-letter code. | Country |
| Latitude, Longitude | Both, as decimal numbers. | Latitude, Longitude |
| Phone, Website | Kept as location attributes and listed under the description. | Phone, Website |
| Featured image | A web address or a media library ID. | Featured Image, Image |
Organizers
| Field | What goes in the column | Matched automatically |
|---|---|---|
| Organizer name (needed) | The name events will refer to. | Name, Organizer, Organizer Name |
| Description | Description | |
| Website | Website, URL | |
| Phone | Phone | |
| Featured image | A web address or a media library ID. | Featured Image, Image |
An organizer whose name is already on the site is skipped, not changed.
Dates and times
Dates can be written in any of the usual ways:
2027-03-04andMarch 4, 2027are always read the same way.03/04/2027could be March 4 or April 3. The importer looks through the whole file for a date that only reads one way, such as25/03/2027, and reads every date in that order. If nothing settles it, dates with slashes are read month first and dates with dashes or dots day first. To be sure, set Dates written as numbers yourself.
Times can be written as 6:00 PM, 6pm, 18:00 or 18.00. A date cell can also carry the time, as in 2027-03-04 18:00.
A date or time that cannot be understood skips that row, and the report quotes what was in the cell.
Lists and names
Categories and tags are separated by commas. Any that do not exist yet are created.
Organizers are separated by commas too. If an organizer's name itself contains a comma, separate the names with | or ; instead, as in Smith, Jones and Co|Dana Brooks.
Locations are matched by name, ignoring capital letters. A row can name one location.
Repeating events
A repeating event is one row. Its first date and its times come from the usual columns, and the rule goes in these:
| Column | What goes in it |
|---|---|
| Repeats | daily, weekly, monthly or yearly. Leave empty for a single event. |
| Repeat interval | 2 for every second day, week, month or year. Leave empty for every one. |
| Repeat on weekdays | Weekly: one or more days, such as Mon, Wed. Monthly: one day, used with the week of the month. |
| Repeat on week of the month | Monthly: first, second, third, fourth or last. |
| Repeat until | The last date the event can fall on. |
| Repeat on these dates | A list of further dates, such as 2027-03-11|2027-03-18. Use it alone for an event on a handful of dates, or with a rule to add dates to it. |
Some examples:
| To repeat | Repeats | Repeat interval | Repeat on weekdays | Repeat on week of the month | Repeat until |
|---|---|---|---|---|---|
| Every Tuesday | weekly | Tue | 2027-04-27 | ||
| Every other Monday and Wednesday | weekly | 2 | Mon, Wed | 2027-05-31 | |
| The second Saturday of each month | monthly | Sat | second | 2027-08-31 | |
| The last Friday of each month | monthly | Fri | last | 2027-08-31 | |
| Once a year | yearly | 2030-06-21 |
A weekly row with no weekdays repeats on the weekday of its start date. A repeating row needs a Repeat until date.
The upload form lists the same columns under Columns for repeating events, as a reminder.
The upload form lists the repeat columns as a reminder.
Rules Events Manager does not have yet
Two more columns are understood, for rules Events Manager cannot hold as a rule yet:
| Column | What goes in it |
|---|---|
| Repeat on day of the month | Monthly: 1 to 31, or last. A monthly row with no weekday and no week of the month is read this way too, using the day of its start date. |
| Repeat a number of times | Ends the repeat after that many dates, in place of a Repeat until date. |
Rows that use them are never imported on the wrong dates. Depending on the Repeat rules Events Manager does not have option, such a row is either:
- imported as a recurring event with a list of dates, the exact dates the rule lands on, or
- skipped.
Either way the row is named in the result report. An event imported as a list of dates is a recurring event like any other.
Rolling back an import
Every import is listed under Imports on the importer page, with the file's name, how many rows were imported and skipped, and a Roll back button.
Each import can be rolled back on its own.
Rolling back removes what that one import created: its events, and any locations, organizers, categories, tags and downloaded images it added. Anything that was already on your site, including items the import linked to, is left alone. Earlier and later imports are not affected, so you can roll back the events and keep the locations.
A common way to work: import, check the result, roll back, fix the spreadsheet, and import again.
Files made for The Events Calendar
Column names from the CSV importer of The Events Calendar are recognized, so a file prepared for it can be uploaded as it is: events, venues (as locations) and organizers. Its Event Cost, Event Website and Feature Event columns are imported as described under Events. Columns with no equivalent, such as Event Show Map Link, are left out and named in the import log.
To move a whole site across, with tickets and attendees, use the migration tool in the same Admin Tools (Advanced) section.
From the command line
With WP-CLI, the same import runs from the command line. Columns are matched automatically, and --map matches any that are not.
# import a file of events
wp em migrate run csv --file=events.csv --user=admin
# import locations, matching two columns by hand
wp em migrate run csv --file=venues.csv --type=locations --map="Site=name,Postal town=town" --user=admin
# list the options, such as --status=draft or --unsupported_recurrence=skip
wp em migrate options csv
# list the imports, then roll back the latest one, or an earlier one by its id
wp em migrate status csv
wp em migrate rollback csv --user=admin
wp em migrate rollback csv --import=i1a2b3c4d5 --user=admin
Skipped rows are printed as warnings with their row number and reason.
Troubleshooting
Why was a row skipped?
The result report gives the reason for every skipped row.
| The report says | What to do |
|---|---|
| The name is empty. | Every row needs a name. Check the name column is matched to the right field. |
| The start date "..." is not understood. | Write the date as 2027-03-04, or set Dates written as numbers. |
| The end is before the start. | Check the end date and end time. An evening event that ends after midnight needs an end date. |
| The time zone "..." is not recognized. | Use a name such as America/New_York or an offset such as UTC+2. |
| A repeating event needs a repeat-until date or a number of times. | Fill in Repeat until. |
| An event with this name and start is already on this site. | The event was imported before. Turn off Skip rows already on this site only if you want a second copy. |
| Events Manager has no rule for ... | The row uses a rule from Rules Events Manager does not have yet and the option is set to skip. |
The upload is refused
The importer accepts files ending in .csv, .txt or .tsv. A spreadsheet file such as .xlsx has to be saved or exported as CSV first. The file also needs a first row of column names and at least one row below it.
The import says my account cannot publish events or locations
Imported rows are saved as the user running the import, so that user needs the Events Manager capabilities to publish events, and to publish locations if the file names any. Run the import as an administrator.