stuttter / wp-user-activity

The best way to log activity in WordPress
https://wordpress.org/plugins/wp-user-activity/
GNU General Public License v2.0
43 stars 13 forks source link

Limit number of activities #20

Closed szepeviktor closed 8 months ago

szepeviktor commented 7 years ago

It would be nice to daily check the number of activities and purge old ones. Let's say keep the last apply_filters( 10,000 )

JJJ commented 6 years ago

Created a project for this:

https://github.com/stuttter/wp-user-activity/projects/1?

leepeterson commented 6 years ago

Just wanted to comment that either a filter to manage database entries as @szepeviktor requested, or the option to move all this data somewhere else entirely — be it a database, static files, postgres, mongodb... whatever — would be wonderful.

In the process of cleaning out a database which ran this plugin for ~6 months last year, came across this: SELECT * FROM wp_postmeta WHERE (meta_key LIKE '%wp_user_activity_%' OR meta_value LIKE '%wp_user_activity_%') which resulted in 231,209 rows

Not that this has caused any problems per se, but... dang.

JJJ commented 3 years ago

Would like to setup a WordPress Cron job to clean up excess activity items, capped at 10k to start.

seancojr commented 2 years ago

Would like to setup a WordPress Cron job to clean up excess activity items, capped at 10k to start.

I have this plugin under consideration for a client's site. Is this feature still on the development roadmap?

szepeviktor commented 2 years ago

I have this plugin under consideration for a client's site.

You can achieve this using WP-CLI in a Linux cron job.

JJJ commented 2 years ago

I have this plugin under consideration for a client's site. Is this feature still on the development roadmap?

Yes 👍

JJJ commented 8 months ago

Fixed as part of #25, limiting to last 14 days.