• Resolved Jedi Black

    (@cihan1368)


    Hi, i was using WP-PostViews plugin. I changed to WPP today but all views 0 now. Is it possible import another views data from WP-PostViews plugin? Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Hector Cabrera

    (@hcabrera)

    Hi

    WP-PostViews and WordPress Popular Posts store data in different ways: the former keeps track of the total views count in the wp_postmeta table, while the latter uses its own database tables to keep track of total views _and_ time range views (last 7 days, last 30 days, et cetera).

    This means you can only recover the total views count data from WP-PostViews. To do so:

    1. Go to Plugins and disable both WP-PostViews and WordPress Popular Posts (but do not delete any of them!)
    2. Log in into your hosting’s control panel and open PHPMyAdmin (or whatever your hosting offers to manage database tables).
    3. Select your site’s database, then empty WPP’s tables if there’s any data on them (wp_popularpostsdata and wp_popularpostssummary).
    4. Run this query to import the total views data from WP-PostViews:
      INSERT INTO wp_popularpostsdata (postid, day, last_viewed, pageviews)
      SELECT post_id, NOW(), NOW(), meta_value FROM wp_postmeta WHERE meta_key = 'views';
    5. Finally, go back to your admin dashboard and enable WPP again.

    I haven’t tested this but I believe it’ll work. Let me know how it goes, alright?

    P.S.: remember to change the wp_ prefix with the one your site uses.

    Thread Starter Jedi Black

    (@cihan1368)

    Working, you are best ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Import from WP-PostViews’ is closed to new replies.