• Resolved fermanus

    (@fermanus)


    Hi,

    I want to clean my AIOWPS tables which are getting quite large (especially global_meta). On my local clone I simply did the following.
    1. Deactivate AIOWPS
    2. In PHP myadmin, delete (not simply truncate) the 6 AIOWPS tables
    3. Reactivate AIOWPS with the saved settings. This automatically recreates the empty AIOWPS tables.

    This works fine but before applying the method to my live site, I want to make absolutely sure that this is a correct way of resetting the system and that there will be no interference with the normal plugin functionning.

    Thanks a lot

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor mbrsolution

    (@mbrsolution)

    Hi, you could try the following steps.

    Thread Starter fermanus

    (@fermanus)

    Hi,

    Thanks for your answer but I am afraid I did not express myself well. In fact I do not want to reset the plugin. I only want to “reset” the tables. To this effect I chose to completely delete (instead of only emptying) the tables so that I am sure nothing is left. Is that OK? The reason I am asking is because on my local clone after doing that no change occurs in the recreated AIOWPS tables even after weeks. This is probably because not much happens on my local site (apart from a few logins from myself) and this is not recorded in the AIOWPS tables but it might also be that for whatever reason the database does not get updated anymore. May be the question is stupid and the answer obvious but I want to make sure!
    Thanks

    Plugin Contributor mbrsolution

    (@mbrsolution)

    Hi, to completely remove and delete the plugin follow the steps below.

    – FTP to your host and delete the plugin’s folder. Although this is normally carried out when you deactivate and delete the plugin as the website administrator.

    – FTP the .htaccess file from your site to your computer and edit and remove all the code between and including the following tags: Make sure you upload the .htaccess file back into the same location you downloaded the file from via FTP.

    # BEGIN All In One WP Security
    # END All In One WP Security

    – Log into phpMyAdmin and locate the database for the website you are working on. Look for any table entry with the following name aiowps and delete those tables.

    – There should be 6 tables associated with this plugin: in addition to the options settings. There will also be other entries for transients and plugin version etc.

    Let me know if you need more help.

    Kind regards

    Plugin Contributor wpsolutions

    (@wpsolutions)

    Hi @fermanus,
    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.

    • This reply was modified 7 years, 5 months ago by wpsolutions.
    • This reply was modified 7 years, 5 months ago by wpsolutions.
    Thread Starter fermanus

    (@fermanus)

    Hi Wpsolutions and mbrsolution

    Thank you for your help, especially to wp solutions for mentionning the filters. This is quite useful. One last short question to wpsolutions: when I modify the default value from 5000 to let’s say 1000, is the change permanent or will it be deleted upon plugin update?
    Thanks.

    Plugin Contributor wpsolutions

    (@wpsolutions)

    when I modify the default value from 5000 to let’s say 1000, is the change permanent or will it be deleted upon plugin update?

    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.

    Thread Starter fermanus

    (@fermanus)

    Hi,

    wpsolutions: Thank you very much for the complement of information and the code. I mark as resolved.

    • This reply was modified 7 years, 5 months ago by fermanus.
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Cleaning AIOWPS tables’ is closed to new replies.