Hi @trudslev,
Absolutely. Both Top 10 and WPP store views count in a similar way so importing data from one plugin to the other is possible.
Assuming you’re using the latest version of both plugins, try this:
- Go to Plugins and disable both Top 10 and WordPress Popular Posts.
- Log in into your hosting’s control panel and open PHPMyAdmin (or whatever your hosting offers to manage database tables).
- Select your site’s database, then empty WPP’s tables if there’s any data on them (
wp_popularpostsdata and wp_popularpostssummary).
- Run these queries to import the total views data from Top 10:
INSERT INTO wp_popularpostsdata (postid, day, last_viewed, pageviews)
SELECT postnumber, NOW(), NOW(), cntaccess FROM wp_top_ten;
INSERT INTO wp_popularpostssummary (postid, pageviews, view_date, view_datetime)
SELECT postnumber, cntaccess, dp_date, dp_date FROM wp_top_ten_daily;
Remember to change the wp_ prefix with the one your site uses.
- Finally, go back to your admin dashboard and reactivate WordPress Popular Posts.
Thank you so much.
It went without a hitch. I did empty the tables first, since I had had WP Recent Posts turned on.
Awesome! Thanks for reporting back, Sune. I’m sure this info will help other users as well.