Title: Log limit
Last modified: August 12, 2018

---

# Log limit

 *  Resolved [Okoth1](https://wordpress.org/support/users/okoth1/)
 * (@okoth1)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/log-limit/)
 * Heyyyyy Hector,
 * Today I looked at my favorite plugin’s wp_popularpostssummary table and decided
   that I don’t need 80.000 rows. I put the log limit from Disabled to 370 days 
   hoping that would delete anything older than that, but to my surprise it didn’t.
   I’m doing this in Xampp and that might be the reason, but how do I get rid of
   my precious data. Or do I just do it manually inside the database?

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Thread Starter [Okoth1](https://wordpress.org/support/users/okoth1/)
 * (@okoth1)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/log-limit/#post-10583281)
 * Also on the online version it didn’t delete the table rows older than 370 days.
    -  This reply was modified 7 years, 10 months ago by [Okoth1](https://wordpress.org/support/users/okoth1/).
 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/log-limit/#post-10583595)
 * Hi [@okoth1](https://wordpress.org/support/users/okoth1/),
 * From [the documentation](https://github.com/cabrerahector/wordpress-popular-posts/wiki/7.-Performance#data-logging):
 * > After enabling this feature **the old data will be deleted every day around
   > midnight**.
 *  Thread Starter [Okoth1](https://wordpress.org/support/users/okoth1/)
 * (@okoth1)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/log-limit/#post-10584111)
 * Thanks Hector, next time I will search the docu first.
 *  Thread Starter [Okoth1](https://wordpress.org/support/users/okoth1/)
 * (@okoth1)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/log-limit/#post-10584127)
 * Hector, I just checked on XAMPP but the data rows are still in wp_popularpostssummary
   while it’s 5 hours after midnight.
 * I’ll give it a couple of days and then check again.
 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/log-limit/#post-10584168)
 * Keep in mind that:
    - [WordPress’ cron jobs aren’t real cron jobs and thus depend on traffic to work accurately](https://tommcfarlin.com/wordpress-cron-jobs/).
      WordPress Popular Posts uses this system to perform this task.
    - Although it’s not explicitely stated anywhere, make sure your database user
      has permission to perform the delete action. Otherwise, even if the task runs
      on time WordPress Popular Posts won’t be able to delete old entries from your
      database.
 * I also use XAMPP for development and ran a test earlier today to check if the
   task was actually working or not. I set WPP to delete data older than the last
   7 days and it worked as expected.
 * For this, I used John Blackbourn’s [WP Crontrol](https://wordpress.org/plugins/wp-crontrol/)
   to edit the task from the dashboard and have it scheduled to run earlier to avoid
   having to wait until midnight 😉
 *  Thread Starter [Okoth1](https://wordpress.org/support/users/okoth1/)
 * (@okoth1)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/log-limit/#post-10584203)
 * Is wpp_cache_event the hook name in WP Control? I clicked on run now but still
   no luck.
 *  Thread Starter [Okoth1](https://wordpress.org/support/users/okoth1/)
 * (@okoth1)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/log-limit/#post-10584210)
 * If I set the Log Limit to 180 days and click on Empty Cache, will everything 
   within the 180 days stay in the wp_popularpostssummary table? I just tried on
   XAMPP setting the Log Limit to 7 days and clicked on Empty Cache. The whole table
   was emptied. But I didn’t visit any page on XAMPP in the past 7 days…
 *  Thread Starter [Okoth1](https://wordpress.org/support/users/okoth1/)
 * (@okoth1)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/log-limit/#post-10584233)
 * Got it Hector. Running the cron job and setting it to the right amount of days
   in Log Limit worked without the need to press Empty Cache.
 * Thanks
 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/log-limit/#post-10584314)
 * The Empty Cache button -as you already noticed- deletes all data from the _\_popularpostssummary_
   table. There’s a warning about it in the Tools section (and you even get a confirmation
   popup before it deletes the data), so you really should consider spending some
   time reading what things do before trying them out 😛
 * Anyways, I’m glad you got it working 🙂 If you have any other questions don’t
   hesitate to ask, ok?
 *  Thread Starter [Okoth1](https://wordpress.org/support/users/okoth1/)
 * (@okoth1)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/log-limit/#post-10584327)
 * O, I did read it but I couldn’t figure out what tables you were talking about.
 * > WordPress Popular Posts maintains data in two separate tables: one for storing
   > the most popular entries on a daily basis (from now on, “cache”), and another
   > one to keep the All-time data (from now on, “historical data” or just “data”).
   > If for some reason you need to clear the cache table, or even both historical
   > and cache tables, please use the buttons below to do so.
   >  Use this button to manually clear entries from WPP cache only
   >  Use this button to manually clear entries from all WPP data tables
 * Maybe it’s better to call it by their table names or add them. There is this 
   table called wp_popularpostsdatacache_backup. That’s the only table with cache
   in it, so when you write Empty Cache I thought it would clear that table… 😯
 * Anyways, still happy with the plugin and that I reduced the table to about 100Mb.

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Log limit’ is closed to new replies.

 * ![](https://ps.w.org/wordpress-popular-posts/assets/icon-256x256.png?rev=1232659)
 * [WP Popular Posts](https://wordpress.org/plugins/wordpress-popular-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-popular-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-popular-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-popular-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-popular-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-popular-posts/reviews/)

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)
 * [logging](https://wordpress.org/support/topic-tag/logging/)
 * [tables](https://wordpress.org/support/topic-tag/tables/)

 * 10 replies
 * 2 participants
 * Last reply from: [Okoth1](https://wordpress.org/support/users/okoth1/)
 * Last activity: [7 years, 10 months ago](https://wordpress.org/support/topic/log-limit/#post-10584327)
 * Status: resolved