Maintenance & Database Cleanup
Periodically removing unnecessary data and optimizing database tables is critical for the system's long-term performance. These operations are managed from the MHM Rentiva > Settings > Database Cleanup tab.
๐งน Database Cleanup Toolsโ
The panel provides 6 core maintenance tools you can run with a single click:
- Analyze Integrity: Scans the database for inconsistencies and missing tables.
- Clean Orphan Meta: Removes orphaned meta data belonging to deleted vehicles or bookings.
- Clear System Cache: Resets transient system data.
- Optimize Autoload: Optimizes the
autoloadoptions WordPress loads on every request, improving speed. - Optimize Tables: Reclaims overhead in MySQL tables and refreshes indexes.
- Clean Old Logs: Permanently deletes operation records and logs older than 30 days.
๐ผ๏ธ IMAGE: DATABASE CLEANUP PANELโ
(Settings > Database Cleanup tab and cleanup report table)
๐พ System Snapshot (Backup)โ
Before performing any critical operation, you can take a full backup of all your rental data (Vehicles, Definitions, Bookings).
- Secure Storage: Backups are stored in a protected directory with no public web access.
- Restore (Rollback): If an error occurs, you can revert to a previous state with a single click from the "Incremental Cleanup Backups" list.
Cleanup operations cannot be undone. Always create a copy of your system using the "Start Snapshot" button before proceeding.
๐ Database Cleanup Reportโ
After an operation, the system provides a detailed report showing how much data (by count and size) was cleaned in each category.
Custom Table Trackingโ
You can monitor the row count and disk size of plugin-specific tables such as payment_log, transfer_routes, and message_logs in real time from this screen.
Uninstall & Table Cleanupโ
When the plugin is completely removed (deleted), all custom tables it created are also cleaned up. As of v4.22.1, the tables cleaned by the uninstaller are:
- Core tables:
mhm_vehicles,mhm_bookings,mhm_customers,mhm_addons, etc. - Notification queue:
mhm_notification_queue - Payment records:
mhm_payment_log - Sessions:
mhm_sessions - Transfer locations:
rentiva_transfer_locations(+ legacymhm_rentiva_transfer_locations) - Transfer routes:
rentiva_transfer_routes(+ legacymhm_rentiva_transfer_routes)
The uninstall operation cannot be undone. All vehicle, booking, customer, and transfer data is permanently deleted.
Cache Managementโ
The system cache is managed from the Cache accordion under the Maintenance tab. This section is rendered by MaintenanceSettings::render_group_cache() and provides a single control point (the duplicate render issue was resolved in v4.22.1).
Section Summaryโ
- Perform periodic cleanup to prevent database bloat.
- The Snapshot system provides a safety net before every operation.
- Logs can be configured to be automatically cleaned up after 30 days.
Changelogโ
| Date | Version | Note |
|---|---|---|
| 23.04.2026 | 4.27.2 | English translation added. |
| 27.03.2026 | 4.22.1 | 5 missing tables added to uninstaller. Cache section documented as the single render point. |
| 19.03.2026 | 4.21.2 | Database cleanup and backup details added. |