Hi @outerbridge,
You would have to manually delete the old events from your database table. Here is the MySQL command, and you can use a database management program such as PhpMyAdmin:
DELETE * FROM wp_posts WHERE wp_posts.id IN (SELECT wp_ai1ec_events.post_id FROM wp_ai1ec_events WHERE start < 1483228800000)
where 1483228800000 is the unix epoch timestamp (used by MySQL) for Sunday, January 1, 2017 12:00:00 AM
To get the current unix epoch timestamp at any other time, use:
https://www.epochconverter.com/
Hi Sunny
Many thanks for your reply, that’s really useful. I’ll try it out on our development version of the site.
Just one question, as the query you’ve provided deletes the items from the wp_posts table but doesn’t touch the wp_ai1ec_events or wp_ai1ec_event_instances tables.
Should I run something like:
DELETE * FROM wp_ai1ec_events WHERE end < 1483228800000;
and
DELETE * FROM wp_ai1ec_event_instances WHERE end < 1483228800000;
to clear out these tables too?
Many thanks!
Hi @outerbridge,
My apologies! Yes, you have to clear the wp_ai1ec_events and wp_ai1ec_event_instances after clearing out the wp_posts, as you have shown.