• Resolved nphunghung

    (@nphunghung)


    Hello!

    I’m using WP Statistics Version 7.4. PHP5.5.16 and safe mode off.
    When I go to Optimization, I see:

    Memory usage in PHP: 4,952,644 Byte
    Number of rows in the wp_statistics_visitor table: 33,913 Row

    Then I go to Purging, enter 90 days, and click Purge now!. It run, but don’t reload page and don’t purge data. I tried select Empty Table: All, click “Clear now”, but it’s the same.

    Is this a bug? How to purge data? Thanks you!

    https://www.ads-software.com/plugins/wp-statistics/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Contributor Greg Ross

    (@gregross)

    What browser are you using? Make sure Javascript is enabled as both functions use ajax calls to execute the code.

    Thread Starter nphunghung

    (@nphunghung)

    I’m using GG Chrome browser, All Javascript is accepted (don’t block). All features are working normally, only purging inactivity. My site still works well with others Javascript and JQuery.

    Plugin Contributor Greg Ross

    (@gregross)

    What happens if you try accessing the following URL (with your site address as the host):

    <your url>/wp-content/plugins/wp-statistics/includes/optimization/purge-data.php

    Thread Starter nphunghung

    (@nphunghung)

    Thanks for your support!

    I have access to your url, but I get a message:

    Please select a value over 30 days.

    Although In “Settings / Maintenance / Prune data older than“, I set 180 days, and In Optimization / Purging, I set 365 days for “Purge records older than:

    Plugin Contributor Greg Ross

    (@gregross)

    That’s the expected message, do you have access to phpMyAdmin for your site?

    If so can you run the following SQL and let me know how many results are returned:

    SELECT * FROM wp_statistics_visitor WHERE WHERE last_counter < '2013-10-14';
    Thread Starter nphunghung

    (@nphunghung)

    I’ve run the command
    SELECT * FROM wp_statistics_visitor WHERE last_counter < '2013-10-14'
    I get the results

    MySQL returned an empty result set (i.e. zero rows). (Query took 0.0003 seconds.)

    But when select wp_statistics_visitor table, I’ve seen 1367 page with 25 rows per page. Max ID = 103745.
    1 recent weeks, my website under DDoS attack, so logs increase. Now I have reduced the attack, I want to delete that records to track again.

    An additional question: Why “WP visitor” count have many people access, but in Google Analytics (real time) no have visitor.

    Thanks you!

    Plugin Contributor Greg Ross

    (@gregross)

    You don’t have any records over 365 days old so purging over 365 won’t do anything.

    You can purge records older than 30 days but if your getting hit by DDoS attact you may need to flush the tables or data from the date range of the attack.

    For example you could run the following to delete the records in the visitors table between two dates:

    DELETE FROM wp_statistics_visitors WHERE last_counter > 'start-date' AND last_counter < 'end-date';

    This is a recent thread on the difference between other services and WP Statistics: https://www.ads-software.com/support/topic/wp-statistics-and-google-analytics

    Thread Starter nphunghung

    (@nphunghung)

    Okey, This means I will have to delete records manually?

    I’ve run

    DELETE FROM wp_statistics_visitors WHERE last_counter > 'start-date' AND last_counter < 'end-date';
    
    and my result:
    
    797 rows deleted. (Query took 0.0246 seconds.)
    It helps me reduce the size of the Database Thanks you very much!
    Plugin Contributor Greg Ross

    (@gregross)

    Yes, DDoS attacks are special circumstances and the default tools in WP Statistics won’t help you clean up unless you want to remove all the data from the database.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘I can't purge records’ is closed to new replies.