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
The Start of a New Website Project Master Roofing Company is a family-owned and operated Oakland roofing contractor with nearly 40 years experience of servicing residential and commercial clients in and around the San Francisco Bay Area. They had a Yelp page, but they didn’t have their own website. The […]
Read MoreWordPress is an award-winning web software, used by millions of webmasters worldwide for building their website or blog. SiteGround is proud to host this particular WordPress installation and provide users with multiple resources to facilitate the management of their WP websites: Expert WordPress Hosting SiteGround provides superior WordPress hosting focused […]
Read MoreNormally putting the URL of a pdf on a line by itself doesn’t display the pdf on a WordPress page, and if you use the add media button and paste the URL for the pdf into the URL field, you get a link that will open the pdf, but the pdf does not display on the page itself,
Read MoreRecently a reader raised a question in a comment to a previous post. He was confused about how to move an existing site to Godaddy Managed WordPress Hosting. Having done this several dozen times now I’ve developed some “best practices” and work-arounds I can share.
Read MoreGoogle has started rolling out filtering for Google searches from mobile devices. If you site doesn’t meet the criteria for mobile-friendly, your site won’t show up in the search results no matter how relevant your page is to the search. As more folks are visiting websites using smartphones and tablets […]
Read More
Reader Interactions