Title: Question about old data
Last modified: May 12, 2026

---

# Question about old data

 *  Resolved [tomdkat](https://wordpress.org/support/users/tomdkat/)
 * (@tomdkat)
 * [2 days, 1 hour ago](https://wordpress.org/support/topic/question-about-old-data/)
 * Hi! So, I used WP Statistics on a fairly busy site a couple of years ago and 
   switched to another statistics tool because WP Statistics wasn’t working for 
   me. I used that other tool up until about a couple of weeks ago, when IT started
   behaving differently and I went back to WP Statistics. 
   When I loaded WP Statistics
   again, I noticed in the Traffic Overview panel that shows today’s traffic, yesterday’s
   traffic and the total visits, etc, that it should over 200k total visits, which
   can’t be right since I had WP Statistics installed for only a day or so and the
   site will get hundreds of visits a day, nowhere near 100k a day. So, I looked
   at the settings and enabled the “delete all data when plugin is deleted” option,
   saved the change and deleted WP Statistics. I re-installed it and the total visits
   went to 0 BUT the “Yesterday” number wasn’t 0, which is weird since I had just
   deleted the plugin. lolSo, when WP Statistics is deleted and it’s setup to delete
   ALL data, something got missed. Is some traffic data is uses for reporting not
   stored in the database or something?Thanks in advance!

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

 *  Plugin Author [Mostafa Soufi](https://wordpress.org/support/users/mostafas1990/)
 * (@mostafas1990)
 * [1 day, 22 hours ago](https://wordpress.org/support/topic/question-about-old-data/#post-18905392)
 * Hi [@tomdkat](https://wordpress.org/support/users/tomdkat/),
 * Thanks for the careful write-up. Short answer first, then the details and a couple
   of things to verify on your end.
 * All WP Statistics traffic data lives in the database, not in files. When the “
   Delete all data when plugin is deleted” option is enabled and you fully delete
   the plugin from the Plugins screen (the red Delete link, not just Deactivate),
   the uninstaller does all of the following:
 * – Deletes the `wp_statistics_*` rows from the options table.
    – Deletes every
   usermeta / postmeta key starting with `wp_statistics`. – Clears the scheduled
   cron hooks. – Drops every plugin table, including `visitor`, `exclusions`, `pages`,`
   historical`, `visitor_relationships`, `summary_totals`, and the add-on tables(`
   events`, `campaigns`, `goals`, `ar_outbox`).
 * Now, about the specific behavior you saw:
 * **”Total” going to 0** after the delete and reinstall is the expected result.
   The tables were dropped and recreated empty, so there is no historical data to
   total up.
 * **”Yesterday” being non-zero** is almost certainly not leftover data. The Yesterday
   bucket is calculated as the previous calendar day, not as “everything before 
   the reinstall”. So if you reinstalled the plugin at some point before midnight
   of yesterday, any real visits the tracker captured between reinstall time and
   23:59 yesterday land in that bucket as soon as the date rolls over. It is real
   new traffic, just bucketed under yesterday.
 * Two things would help confirm this and rule out a stale state:
 * 1. Could you check, via phpMyAdmin or any DB tool, whether these still have any
   rows after your delete + reinstall:
 *  `
    SELECT option_name FROM wp_options WHERE option_name LIKE ‘wp_statistics%’;
 *  SHOW TABLES LIKE ‘%statistics_%’;
    `
 *  If the only tables you see are the freshly recreated ones and they are mostly
   empty (a small number of rows in `visitor` / `pages` / `summary_totals` matching
   the time since the reinstall), that lines up with the explanation above.
 * 2. Are you running a caching plugin (WP Rocket, W3 Total Cache, LiteSpeed, etc.)
   or an object cache (Redis, Memcached)? Cached dashboard widgets can keep showing
   old numbers for a while after a reinstall. Flushing the site cache and reloading
   the dashboard is worth a try.
 * One more thing worth knowing: you do not have to uninstall the plugin to wipe
   the data. WP Statistics has a built-in cleanup tool at **WP Statistics > Optimization
   > Purging**, which lets you purge data and visitors without removing the plugin.
 * If the SQL check above shows leftover rows or tables we did not expect, please
   paste the result back here and I will trace it.
 * Best regards,
 *  Thread Starter [tomdkat](https://wordpress.org/support/users/tomdkat/)
 * (@tomdkat)
 * [1 day, 3 hours ago](https://wordpress.org/support/topic/question-about-old-data/#post-18906477)
 * Hi! Thanks for the great response!!!! So, if I use the “Purging” section to purge
   the data, should I expect all of the counts to reset to 0? I do use a caching
   plugin (WP Fastest Cache) but I believe I emptied the cache after removing the
   plugin, such that when I re-installed it, it would install correctly (not having
   cached data interfering).
   Thanks!
 *  Thread Starter [tomdkat](https://wordpress.org/support/users/tomdkat/)
 * (@tomdkat)
 * [1 day, 2 hours ago](https://wordpress.org/support/topic/question-about-old-data/#post-18906480)
 * Ok, I’m logged into my dashboard now. When I go to ‘Statistics’ > ‘Optimization’
   I don’t see “Purging” but I see:
   Overview & InfoData ExportData CleanupPlugin
   MaintenanceHistorical DataI can see the overview info fine and it shows the amount
   of PHP memory being used, etc. When I click the other items, nothing happens.
   Are those premium features? If so, I’ll try the table deletion again and I’ll
   verify everything got deleted as expected.
 * Thanks!

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

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fquestion-about-old-data%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/wp-statistics/assets/icon.svg?rev=3081064)
 * [WP Statistics – Simple, privacy-friendly Google Analytics alternative](https://wordpress.org/plugins/wp-statistics/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-statistics/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-statistics/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-statistics/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-statistics/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-statistics/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [tomdkat](https://wordpress.org/support/users/tomdkat/)
 * Last activity: [1 day, 2 hours ago](https://wordpress.org/support/topic/question-about-old-data/#post-18906480)
 * Status: resolved