wp_options huge
-
Hi, we have a similar problem of this topic :
https://ww.wp.xz.cn/support/topic/database-full-of-transient-data-from-captcha-all-in-one-wp-security-plug-in/When we defragment the wp_option table, or disable/enable your plugin, the table comes back at a reasonable size, but starts increasing rapidly (goes from 1.5MB to 10MB in minutes, over 500MB in a couple of days…)
Any idea what’s going on and how to fix this problem?
Kind regards
-
Hi, the following was quoted by one of the developers.
Solution 1: The plugin has code which will periodically check the tables created by aiowps and it will cleanup any table which has more than 5000 rows, ie, the code will delete the oldest rows and keep the newest 5000. The “5000” rows is set as a default in the code but I have also added filters for this to allow you to be able to set your own value.
The filters can be found in the wp-security-backup.php file in the function called aiowps_scheduled_db_cleanup_handler.
The cleanup process is triggered once daily using the inbuilt WordPress “wp_schedule_event”.
One way to trigger the cleanup process immediately is to deactivate and activate the aiowps plugin which should kick off the scheduled event.Solution 2: To use the filters you should not edit any of this plugin’s files but instead you will need to add some code to your theme’s functions.php file.
For example:add_filter( 'aiowps_max_rows_event_table', 'change_table_rows_remaining', 10, 1 ); add_filter( 'aiowps_max_rows_failed_logins_table', 'change_table_rows_remaining', 10, 1 ); add_filter( 'aiowps_max_rows_login_attempts_table', 'change_table_rows_remaining', 10, 1 ); add_filter( 'aiowps_max_rows_global_meta_table', 'change_table_rows_remaining', 10, 1 ); function change_table_rows_remaining( $rows ) { return '1000'; }The above will set the maximum number of rows to keep for all of the tables to 1000.
The topic ‘wp_options huge’ is closed to new replies.