Support » Plugin: Simple History » More config options to reduce DB size?

  • Resolved slapbox


    Thanks for your awesome work, this plugin is really great! I saw your post on what’s been done to reduce DB size accumulation, but after having the plugin installed for about 18 hours on a low traffic site and seeing >1.75mb added to our database, it seems like I’ll have no option but to uninstall it.

    Extrapolating to 60 days, I can expect the Simple History entries alone to occupy 140mb. Our starting database size was about 47mb. I’m pretty sure that as we approach 100mb, we’ll begin to exceed the RAM capacity of our VPS.

    Do you have any thoughts on this? May an option to configure how many days to keep history for? It would be best of all if the plugin didn’t rely on the database so heavily, given the amount of data it stores – but I understand that’s a massive architectural change.

    Thanks again for sharing! Hope I can find a way to make this plugin work long term with our setup.

Viewing 5 replies - 1 through 5 (of 5 total)
  • I’m going to use this plugin to keep alert me when and what my clients are doing to edit their sites. I’m using the RSS feature to get the alerts, so really only need maybe the last 7 days of activity.

    Having an option to change the default of 60 days would be simpler than having to go to the settings page and click the clear log button on each site.



    That could potentially be a large help.

    The best solution in my view would be to move to a file-based solution, but I know that’s a total rewrite with its own issues, and so not really realistic.

    Plugin Author eskapism


    The size of the database table for the plugin will depend on how much activity your site has. So small site, not much activity = smaller db. Large size, lots of activity = larger db usage.

    If you want to limit the number of days the log i stored you can change this using a filter. Add this to your functions.php or similar:

    // Clear items that are older than a 7 days (i.e. keep only the most recent 7 days in the log)
    add_filter('simple_history/db_purge_days_interval', function ($days) {
        $days = 7;
        return $days;

    This and more examples in the examples.php file:

    Thanks, that’s really useful.

    I looked at the github examples, but didn’t see how I can disable logging “Found an update for plugin…” and “Updated plugin…” Since I have auto updates turned on for most of my sites, 95% of the history logs are just notification of these updates. Makes it hard to find the signal buried in the noise.

    How can I disable logging all update messages?

    Plugin Author eskapism


    If you don’t want any plugin updates you can skip the loading of the plugin logger. Something like this should work:

    // Skip loading of plugin logger
    add_filter('simple_history/logger/load_logger', function ($load_logger, $oneLoggerFile) {
        if (in_array($oneLoggerFile, array('SimplePluginLogger'))) {
            $load_logger = false;
        return $load_logger;
    }, 10, 2);

    See more examples in the examples file:

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.