The Simple History plugin default history period is 60 days. The log includes not only user initiated changes to the website, but all the automated updates to plugins, etc. This can make the log file pretty large.
This Simple History plugin PHP code snippet for the functions.php file lets you choose how long the history log period is.
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 is stored, you can change this using a filter.
This and more examples in the examples are in the php file:
https://github.com/bonny/WordPress-Simple-History/blob/30728f1561a36ee50820aa266e2d07a3a61c1354/examples/examples.php
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;
});
Limit search for phrases by using " " around the phrase
You will get an email the morning after we post a new Code Snippet
“I never tried to prove nothing, just wanted to give a good show. My life has always been my music, it’s always come first, but the music ain’t worth nothing if you can’t lay it on the public. The main thing is to live for that audience, ’cause what you’re […]
Read MoreWordPress, how do I love thee? Let me count the ways (in 140 characters or less).
Read MoreThe WordPress Theme Review Team Website
Read MoreOnly one thing is impossible for God: To find any sense in any copyright law on the planet. Mark Twain
Read MoreAbbott: Strange as it may seem, they give ball players nowadays very peculiar names. Costello: Funny names? Abbott: Nicknames, nicknames. Now, on the St. Louis team we have Who’s on first, What’s on second, I Don’t Know is on third– Costello: That’s what I want to find out. I want […]
Read More
Reader Interactions