Support

Home Forums Event Espresso Premium Cleanly deleting events and attendees

Cleanly deleting events and attendees

Posted: October 16, 2014 at 4:38 pm


sheathe

October 16, 2014 at 4:38 pm

Hi,

Our site has been running for a few years now, and there are several thousand attendee records and hundreds of events.

In order to speed up the AJAX admin interface, I would like to delete old events and attendee information (we have complete database backups in case we ever have to go back and retrieve anything.)

If I delete an event, will it cascade delete all the attendees and any other related data? Or will it leave any residual information in the database. e.g. Is this the best way to improve the performance of Event Espresso admin?

My second question is, if I’d like to write a PHP script to periodically delete events (and related data) older than a certain date, could you point me to the function that actually performs the cascading delete?

Thank you for your help,
Scott


sheathe

October 16, 2014 at 4:39 pm

I should have mentioned I’m using event-espresso.3.1.24.1.P


Dean

October 17, 2014 at 1:26 am

Hi,

Version 3.1.24.1.P is over two years old now, so if that is not a typo, I would strongly recommend backing up your site and upgrading to the latest version.

In the latest version of EE3, deleting an even in the admin will soft delete it – the event and attendees remain (this is a precaution against accidental deletes).
(Edit: I checked as far back as EE 3.1.27.P and it’s the same there as well)

If the event is then selected from the deleted list and then permanently deleted, then the event and the attendees for that event are removed from the database entirely.

The functions that control these deletes are found in:

/wp-content/plugins/event-espresso/includes/event-management/event_list.php –event_espresso_edit_list function

and

/wp-content/plugins/event-espresso/includes/functions/admin.php — event_espresso_delete_event function

I would be cautious when using these and perform a database backup prior to usage.

There will be some residual data left, in respect to the attendee questions. I’ll raise a developer ticket to look into that in future updates.

The support post ‘Cleanly deleting events and attendees’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso