How to Setup WPEngine hosting for Event Espresso
Disable Caching for Event Espresso pages
If WP Engine is your host you will need to ask WP Engine support to disable caching for the pages that handle Event Espresso events and registration checkout. The URLs that need to be excluded from the cache may include:
/events/
/registration-checkout/
/event-registration/
/transactions/
/thank-you/
/registration-cancelled/
Important: Your site’s event and registration checkout URLs may be different, and you can refer to the pages listed in Event Espresso > General Settings > Critical page settings to verify which pages need to be excluded from the cache.
In addition to the above, any page or post that’s set to display a ticket selector using the [ESPRESSO_TICKET_SELECTOR] shortcode must also have caching disabled.
View a sample message that you can share with the support team at WP Engine.
Enable the Heartbeat API
WP Engine will also, by default, disable the built-in WordPress Heartbeat API. This will break the Event Espresso 4 advanced ticket editor functions and will also break the automatic payment status update feature on the EE4 payment page. In Event Espresso 3, you will see issues with the Payment gateway settings boxes not allowing you to open and close them. The above issues are caused by the missing WordPress Heartbeat scripts. To fix this, you can also put in a request with WP Engine support to enable the Heartbeat API scripts.
Since there may be a delay before WP Engine can re-enable the Heartbeat API scripts, there’s a temporary workaround you can use that’s published in this gist:
add_filter( 'wpe_heartbeat_allowed_pages', 'my_wpe_add_allowed_pages' ); function my_wpe_add_allowed_pages( $heartbeat_allowed_pages ) { $heartbeat_allowed_pages = array( 'index.php', 'admin.php', 'edit.php', 'post.php', 'post-new.php', ); return $heartbeat_allowed_pages; }
Set CSV Mime/Content Type
WP Engine use a MIME type of text/plain
for CSV files, which means your browser will open/display them rather than download the file.
To fix that add to the nginx area within your control panel:
location ~* \.csv$ { add_header Content-Type "application/ms-excel"; add_header Content-Disposition "attachment"; }
Other customers have reported This should be added to the ngixn area:
location ~* \.csv$ {
add_header Content-Type "application/ms-excel";
add_header Content-Disposition "attachment";
}