Hi @petanovotny234,
Yes, you can keep your statistics! WP Statistics stores all data in custom database tables prefixed with wp_statistics_ (e.g., wp_statistics_visitor, wp_statistics_visit, wp_statistics_pages, etc.).
Here’s how to migrate them:
- Export the
wp_statistics_* tables from your current site’s database using phpMyAdmin or WP-CLI:
- In phpMyAdmin: select all tables starting with
wp_statistics_, then choose Export
- Or via WP-CLI:
wp db export --tables=$(wp db tables 'wp_statistics_*' --format=csv)
- Replace your main site with the subdomain (FTP + database) as planned
- Import the exported
wp_statistics_* tables into the new database — this will restore your historical stats
Important: Make sure the table prefix matches. If both sites use the same prefix (usually wp_), it should work seamlessly.
Let us know if you need any help!
Hi,
thanks for the response. In the end I did it more or less as you wrote – by exporting and importing the table from the database.
It worked, thank you.
Good to hear.
Let me know if you need any further assistance.