My dashboard site is running really slow.. I have approx 100 sites and I suspect the database is bloated. How am I best to clean the database? Can I use one of the mainwp extensions or do I have to use a separate optimisation plugin?
Hey @ShortTech
You can use any DB optimization plugin, or you can use our Maintenance add-on.
However, you will have to add the Dashboard site to itself as a child site in order to use the Maintenance add-on for this purpose.
We also invite you to try out our Early Release program: MainWP Early Release - MainWP WordPress Management
We’ve made performance optimizations, and there’s also a new option for auto-purging Site Changes logs, which may also help with the DB size.
I noticed my wp_mainwp_monitor_heartbeat table has over 7.000.000 entries starting from 2024. Is there way to automatically limit how long history to keep stored in the database? In my opinion this infinite growth is serious issue in any table.
Hey @sailahen
Welcome to the MainWP community.
That table stores data from our built-in Uptime Monitor.
Right now, there is no way to set retention limits, but we are examining this for a future release.
You can run this SQL query on the DB to trim that table and delete all entries older than 1 year:
DELETE FROM wp_mainwp_monitor_heartbeat WHERE time < (NOW() - INTERVAL 1 YEAR);
Yes, I actually dropped the whole table after removing NodePing extension. I took intentional risk as I couldn’t find any documentation about this DB table. But I noticed there were no more new rows added after I removed Advanced Uptime Monitor, so MainWP still works ![]()
Anyway I strongly recommend to fix this infinite growth issue. In my case about 100 sites and NodePing frequency was 5 minutes, so you can estimate how quickly it generates database entries.
