How to Fix a Critical Error When Importing an Events CSV File

A CSV file that has imported events successfully for years can suddenly trigger WordPress’s “There has been a critical error on this website” message after the Events import starts.

When that happens, changing only the date format, time format, or cache settings is unlikely to identify the real cause.

The Events Calendar still supports CSV importing, but its documentation now distinguishes between current CSV examples and legacy formats. Recent versions have also included several importer-specific fixes. The safest troubleshooting order is therefore:

  1. confirm The Events Calendar is current;
  2. test with the current official CSV example;
  3. reduce the file to one simple event;
  4. verify the column mappings;
  5. inspect the actual PHP fatal error if WordPress still crashes.

A WordPress critical-error screen means PHP encountered a server-side failure. The CSV contents may trigger that failure, but the error itself is not enough to conclude that the date or time format is wrong.

Is There a New Events CSV Template?

The Events Calendar currently maintains separate documentation for its latest CSV format and older legacy examples.

Its current documentation explicitly says that the example files apply to the latest plugin versions and links separately to legacy-format information.

So if a spreadsheet template has been reused unchanged for several years, it is worth rebuilding one test import from the current example rather than assuming the old file is still the best reference.

That does not mean every older CSV is automatically invalid.

The importer includes a preview-and-mapping stage. Your spreadsheet headings can be mapped to supported event fields during the import. What matters is that the required data can be mapped correctly and that each value is valid for its destination field.

For current event imports, supported fields include items such as:

Event Name
Event Description
Event Excerpt
Event Start Date
Event Start Time
Event End Date
Event End Time
All Day Event
Timezone
Event Venue Name
Event Organizers
Event Category
Event Website

The official documentation recommends:

Date: YYYY-MM-DD
Time: HH:MM:SS

For example:

Event Start Date: 2026-12-10
Event Start Time: 18:30:00
Event End Date:   2026-12-10
Event End Time:   20:00:00

The Events Calendar recommends YYYY-MM-DD because formats such as 05/06/2026 are ambiguous.

Start With a Minimal One-Event CSV

Before editing a large historical spreadsheet, create a minimal file containing only one event.

For example:

Event Name,Event Start Date,Event Start Time,Event End Date,Event End Time,All Day Event
CSV Import Test,2026-12-10,18:30:00,2026-12-10,20:00:00,FALSE

Save it as a standard comma-separated CSV.

Then go to:

Events → Import

Select:

CSV File

Upload the test file and preview it.

Map the fields explicitly:

Event Name       → Event Name
Event Start Date → Event Start Date
Event Start Time → Event Start Time
Event End Date   → Event End Date
Event End Time   → Event End Time
All Day Event    → All Day Event

If this simple file imports successfully, The Events Calendar’s importer itself is functioning and something in the original CSV is triggering the failure.

If even the one-row file produces a critical error, focus on plugin version, conflicts, PHP/server logs, and the importer itself rather than repeatedly changing spreadsheet formatting.

Make Sure the CSV Uses Commas, Not Semicolons

A CSV file saved by Excel or another spreadsheet application does not always use commas.

The Events Calendar specifically warns that some versions or regional configurations of Excel may export files using semicolons:

Event Name;Event Start Date;Event Start Time

instead of:

Event Name,Event Start Date,Event Start Time

The importer expects a comma-separated file.

Open the CSV in a plain-text editor such as VS Code, Notepad++, or another text editor and inspect the first few lines.

You should see actual comma separators.

For example:

Event Name,Event Start Date,Event Start Time
Example Event,2026-12-10,18:30:00

If the columns are separated with semicolons, export the spreadsheet again as a comma-delimited CSV.

Do Not Remove Valid CSV Quotes Blindly

Text fields often contain commas.

For example:

Annual Dinner, Awards and Reception

A correctly generated CSV may quote that value:

"Annual Dinner, Awards and Reception",2026-12-10,18:30:00

Those quotation marks are normal CSV escaping.

Do not automatically remove every quotation mark from the file. Doing so can turn a single description or event title containing commas into several unintended columns.

The Events Calendar documentation also notes that comma-separated field values need to be properly escaped when generated outside a spreadsheet application.

Instead, compare the number of logical columns in problem rows with a known-good row.

Check the Column Mapping Carefully

The CSV importer does not simply trust the spreadsheet’s headings. It shows a preview where each CSV column is mapped to an Events Calendar field.

This is especially important because The Events Calendar 6.18.0 fixed a CSV importer bug involving saved mappings.

The changelog states that a rejected CSV mapping could previously become the saved default and cause later imports to preselect “Do Not Import” for required columns.

Therefore, when troubleshooting an import:

  1. upload the CSV;
  2. inspect every mapping;
  3. make sure required columns are not mapped to Do Not Import;
  4. manually reselect the correct fields;
  5. test again.

Do not assume a previously saved mapping is still correct.

Update The Events Calendar Before Debugging an Old Importer

At the time of this research, WordPress.org lists The Events Calendar 6.18.3.1 as the current release.

Recent releases contain several import-related fixes.

Version 6.18.0

Fixed rejected CSV mappings being incorrectly retained as defaults.

Version 6.17.1

Fixed CSV imports that failed to display records on sites using a symlinked uploads directory.

Version 6.18.1

Fixed a fatal error involving manually executed Scheduled Imports when a required child import record could not be created. This fix is not specifically described as a CSV fix, but it demonstrates that importer-side fatal errors have been actively corrected in recent versions.

If the site is running an older version, create a backup and update on staging before spending hours modifying the CSV.

If Events Calendar Pro, Event Tickets, Event Tickets Plus, or another Events Calendar add-on is installed, keep compatible add-ons updated as well.

A Critical Error Requires the Actual PHP Error

The WordPress message:

There has been a critical error on this website.

does not identify the cause.

It is only the frontend symptom of a PHP fatal error.

The fastest way to stop guessing is to capture the fatal error produced at the exact time the CSV import runs.

On a staging site, WordPress debugging can temporarily be enabled in wp-config.php:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );

Place these settings before:

/* That's all, stop editing! Happy publishing. */

Then reproduce the CSV import once.

Check:

wp-content/debug.log

Also check the hosting control panel’s PHP error log, because some fatal errors are recorded there even when they do not appear in debug.log.

Turn debugging back off after collecting the information, particularly on a production site.

The useful part of the log will normally look similar to:

PHP Fatal error: Uncaught TypeError ...

or:

PHP Fatal error: Allowed memory size ...

or:

PHP Fatal error: Uncaught Error ...

The file path and line number following that message are far more useful than the generic WordPress critical-error screen.

Use the Fatal Error to Choose the Next Fix

Different log errors require completely different solutions.

If the fatal points into The Events Calendar

For example:

wp-content/plugins/the-events-calendar/...

first compare the installed plugin version with the current release.

If already current, test the same CSV on staging with only The Events Calendar and the required Events Calendar add-ons active.

A repeatable fatal error with a minimal one-row CSV is strong evidence for a plugin-level bug.

If the fatal points into another plugin

For example:

wp-content/plugins/some-other-plugin/...

that plugin may be hooking into event creation, post saving, metadata, media importing, or another part of the import process.

Temporarily disable that specific plugin on staging and retry.

If the fatal points into the theme

Switch to a standard WordPress theme on staging and test again.

Importing events creates WordPress content and can trigger hooks used by themes or theme frameworks even though the problem occurs in wp-admin.

If the log shows memory exhaustion

A large CSV or expensive event-save callbacks can exhaust PHP memory.

The relevant log usually contains wording similar to:

Allowed memory size of ... bytes exhausted

Test the same file with only one event.

If one row imports but hundreds fail, investigate memory consumption and batch size rather than changing date formatting.

Do not increase PHP memory blindly without determining why the import consumes it.

Find the Exact Row That Triggers the Crash

If a one-row test works but the full CSV crashes, use a binary-search approach.

Suppose the file has 200 event rows.

Test:

Rows 1–100

If they work, test:

Rows 101–200

If that group fails, split it again:

Rows 101–150
Rows 151–200

Continue until the problematic event is isolated.

This is much faster than manually reading hundreds of lines.

Once the failing row is identified, compare it against a working row for:

  • missing start or end dates;
  • malformed times;
  • invalid timezone values;
  • very large descriptions;
  • broken HTML;
  • unexpected line breaks;
  • unescaped commas;
  • malformed quotes;
  • unusual Unicode characters;
  • invalid URLs;
  • incorrect organizer or venue values;
  • columns shifted because of CSV escaping.

The row that exposes the fatal error may still reveal a plugin bug, but isolating it gives you a reproducible test case.

Test Without Venue and Organizer Data First

The Events Calendar recommends creating or importing venues and organizers before importing events that reference them.

For troubleshooting, simplify the event even further.

Start with:

Event Name,Event Start Date,Event Start Time,Event End Date,Event End Time
Test Event,2026-12-10,18:30:00,2026-12-10,20:00:00

If that works, gradually add:

Timezone
Venue
Organizer
Description
Category
Featured Image
Other custom fields

one group at a time.

This identifies which data type triggers the failure.

Check the Timezone Field

The current event CSV format supports a Timezone field and expects a valid timezone value.

A safe format is an IANA timezone identifier, for example:

America/New_York
Europe/London
Asia/Tokyo

If an old spreadsheet contains an unusual timezone abbreviation or custom value, remove the timezone column temporarily and allow the site’s event settings to supply the normal default.

If the import then succeeds, investigate the timezone values rather than the date fields.

Check All-Day Event Rows

For all-day events:

All Day Event = TRUE

The Events Calendar documentation says the start and end time fields are essentially ignored and can be left blank.

A clean all-day test row could therefore be:

Event Name,Event Start Date,Event End Date,All Day Event
Conference,2026-12-10,2026-12-10,TRUE

Do not invent arbitrary times just to satisfy a spreadsheet template if the event is genuinely all day.

Test the Current Official Example File

One of the strongest diagnostic tests is to import the current official example CSV unchanged.

The Events Calendar maintains an example event file from its current CSV formatting documentation.

There are two possible outcomes.

The official example imports successfully

The importer works.

Compare your historical template with the current example and progressively move your data into the new structure.

The official example also causes a critical error

Your old spreadsheet is probably not the primary issue.

Focus on:

  • installed Events Calendar version;
  • PHP error logs;
  • plugin conflicts;
  • theme conflicts;
  • server configuration;
  • filesystem/upload configuration;
  • persistent object caching;
  • PHP compatibility.

LiteSpeed Cache Is Unlikely to Explain a PHP Fatal During Import

Clearing or disabling LiteSpeed Cache is a reasonable basic test, but an admin-side CSV import that produces an actual WordPress critical error usually requires deeper server-side investigation.

A frontend page cache generally does not explain a reproducible PHP fatal during CSV processing.

However, LiteSpeed may also provide persistent object caching depending on the site’s configuration.

If the fatal stack trace specifically implicates cached data or object-cache operations, test with persistent object caching disabled on staging.

Do not continue purging frontend cache repeatedly if the PHP log identifies an unrelated fatal error.

Check for a Symlinked Uploads Directory

This is an uncommon but now documented CSV importer issue.

The Events Calendar 6.17.1 fixed CSV imports that failed to show records on sites where the uploads folder was symlinked.

This can matter on:

  • custom deployments;
  • Bedrock-style setups;
  • managed hosting environments;
  • shared media/storage configurations;
  • release-directory deployments using symlinks.

If your WordPress installation uses a nonstandard or symlinked:

wp-content/uploads

directory, make sure The Events Calendar is at least on a version containing that fix.

Do Not Modify Plugin Files as the First Fix

A CSV-triggered fatal error can tempt developers to patch the line named in the PHP stack trace.

Avoid editing:

wp-content/plugins/the-events-calendar/

as the first solution.

Plugin updates overwrite those modifications, and the line where PHP crashes may only be where malformed or unexpected data finally becomes visible—not where the underlying problem originates.

First determine:

  1. whether the issue still exists in the current plugin version;
  2. whether the current official example CSV reproduces it;
  3. whether a one-row file reproduces it;
  4. which PHP exception or fatal error occurs;
  5. whether another plugin or theme participates in the stack trace.

That information makes a permanent fix possible.

A Reliable Troubleshooting Sequence

For an events CSV that previously worked but now produces a critical error, use this order:

  1. Back up the site and database.
  2. Check the installed The Events Calendar version.
  3. Update The Events Calendar and compatible add-ons on staging.
  4. Download the current official event CSV example.
  5. Try importing the official example.
  6. Create a one-event CSV using YYYY-MM-DD and HH:MM:SS.
  7. Confirm the file is genuinely comma-delimited.
  8. Inspect every column mapping.
  9. Make sure required fields are not mapped to Do Not Import.
  10. Enable temporary WordPress error logging.
  11. Reproduce the critical error once.
  12. Read the exact PHP fatal and stack trace.
  13. If the minimal CSV works, split the original file until the problem row is found.
  14. Test without venue, organizer, image, and custom-field data.
  15. Run a controlled plugin/theme conflict test on staging if necessary.

This approach answers the two questions that matter:

Is the CSV invalid for the current importer?

or:

Is valid CSV data exposing a PHP/plugin/server bug?

Without the PHP error log, those two cases can look identical from the WordPress admin screen.

Is Changing the Date Format Enough?

Usually not when WordPress produces a genuine critical error.

Using:

YYYY-MM-DD

for dates and:

HH:MM:SS

for times is the safest current format and matches The Events Calendar’s recommendations.

But if those formats still cause a fatal error, do not keep cycling through date variations.

A well-behaved importer should normally report invalid input as an import error rather than crash WordPress completely.

Capture the fatal error and determine what code actually failed.

Should You Rebuild an Old CSV Template?

If the template predates the current documentation, rebuilding a test copy from the current official example is worthwhile.

Do not immediately replace the only copy of a production spreadsheet.

Keep the historical file, then create a new test CSV containing only the fields currently needed.

Use explicit, unambiguous values:

Event Start Date: 2026-12-10
Event Start Time: 18:30:00
Event End Date:   2026-12-10
Event End Time:   20:00:00
All Day Event:    FALSE
Timezone:         America/New_York

Map those columns manually during import.

If that works, migrate the remaining columns progressively.

If it still crashes WordPress, the template is no longer the leading suspect.

About the author

Tahrim Naziat

WordPress and Server Troubleshooting Specialist

Tahrim Naziat is a senior WordPress and JavaScript developer with more than 14 years of experience specializing in WordPress troubleshooting, WooCommerce, PHP compatibility, plugin conflicts, malware cleanup, performance optimization, Nginx, Redis, and production server issues. He documents practical solutions based on real WordPress debugging, technical investigations, and client projects.

Leave a Comment