Multisite: “Database needs to be repaired” after creating new subsite
-
Hi there,
We’re running a WordPress Multisite installation and using the following plugins:
• The Events Calendar Pro
• Event Tickets
• WPML
Whenever we create a new subsite within the network, and Event Tickets is active (alongside The Events Calendar Pro), we receive the following message in the admin area immediately after site creation:
“The database needs to be repaired.”
The subsite still works, but the warning is concerning. After visiting /wp-admin/maint/repair.php and running the repair process, the message disappears, and the site functions normally again.
However, the issue reappears every time a new subsite is created with Event Tickets active during the process.
System setup:
• WordPress Multisite (subdirectory mode)
• PHP version: 8.2
• The Events Calendar Pro: Current Version
• Event Tickets: Current Version
• WPML: 4.7.3
Server architectureLinux 6.8.0-1025-azure x86_64Web servernginx/1.18.0PHP version8.3.19 (Supports 64bit values)PHP SAPIfpm-fcgiPHP max input variables1000PHP time limit300PHP memory limit1024MMax input time60Upload max filesize512MPHP post max size512McURL version7.81.0 OpenSSL/3.0.2
What we’ve tested so far:
• The issue only occurs when Event Tickets is active at the time the subsite is created
• Creating a subsite with Event Tickets deactivated → no issues
• Activating Event Tickets after the subsite has been created → no issues
• wp db check shows no critical errors after the fact
• The database warning disappears after a single repair and does not return for that subsite
Our suspicion:
It seems that Event Tickets may attempt to initialize its database tables during subsite creation, possibly outside the correct switch_to_blog() context, or before the site is fully ready. This may cause the database to end up in an inconsistent or partially initialized state, triggering WordPress to suggest a repair.
Questions:
1. Is this a known issue when using The Events Calendar Pro + Event Tickets in a multisite setup?
2. Is there a recommended or supported approach for activating Event Tickets across a multisite network?
3. Does Event Tickets rely on wp_initialize_site or a similar hook to create its custom tables per subsite?
Any guidance or best practices would be highly appreciated.
- You must be logged in to reply to this topic.