• Resolved datformatiebv

    (@datformatiebv)


    How does one migrate site reviews (including assigned_posts) to an alternate WP system? (migration form WP A to WP B).

    Since the tables are linked using FOREIGN KEY / FOREIGN KEY constraints is this possible anyways?

    best regards,
    Edwin

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Gemini Labs

    (@geminilabs)

    You can use the WordPress import/export tools to migrate your reviews or the entire site. Site Reviews takes care of the assignments automatically when using those tools.

    Alternatively, you could use the Database Browser plugin with a SQL query to export the reviews to a CSV file, then import them using the provided Site Reviews tool.

    See: https://pastebin.com/YY0hEt93

    And this: https://www.ads-software.com/support/topic/how-can-i-export-reviews-to-a-csv/

    Thread Starter datformatiebv

    (@datformatiebv)

    Hi There, tried to do the following:

    in WP A:
    wp tools export Reviews (=expWPAReviews)
    wp tools export iLodge Villas (custom posts of type:ilodgevilla) (=expWPAV)

    in WP B:
    delete all Reviews,
    delete all Posts (in my case custom posts of type:ilodgevilla)

    import expWPAReviews,
    import expWPAV

    Result in WP B:
    all Reviews loaded,
    all Posts (of type:ilodgevilla) loaded (however with postID unequal to postID in WP A)
    table wp_glsr_assigned_posts = empty so no link between Review and Post(s) exist.

    you wrote:
    “Site Reviews takes care of the assignments automatically when using those tools.”

    What step did we omit or did we execute in wrong sequence?

    Plugin Author Gemini Labs

    (@geminilabs)

    In order for the review assignments to work, the post IDs that the reviews are assigned to have to already exist.

    Try importing the posts first and the reviews last.

    Also, after importing the posts, you will need to verify that the Post IDs are the same on site A and site B.

    • This reply was modified 3 years, 2 months ago by Gemini Labs.
    Thread Starter datformatiebv

    (@datformatiebv)

    Right, your last sentence is where we believe it is going wrong. When importing the posts the Post ID’s are not equal in WP B to the ones in WP A.

    We were unable to find a method of assuring (or forcing) the post ID’s in WPA and WP B to be the same after the import.

    Any direction / hints are welcome.

    Plugin Author Gemini Labs

    (@geminilabs)

    How many villas are you dealing with that have reviews? And how many reviews are there?

    Thread Starter datformatiebv

    (@datformatiebv)

    Hi, we currently have 632 reviews and 310 villas. Moreover: villas contain (but not all) multiple review referrences. (one-to-many)

    In WP A:
    wp_glsr_ratings: 644
    wp_glsr_assigned_users: null
    wp_glsr_assigned_terms: 209
    wp_glsr_assigned_posts: 516

    Plugin Author Gemini Labs

    (@geminilabs)

    The Site Reviews API supports providing the assigned_posts value in the format of post_type:slug, so the following may work:

    Follow the directions here: https://www.ads-software.com/support/topic/how-can-i-export-reviews-to-a-csv/#post-14371208

    And for the SQL Query, use this: https://pastebin.com/TyPDYuNU

    Then import your villa posts first, and then use the Site Reviews “Import Third Party Reviews” tool to import the CSV.

    Note: With this method you will lose the post_author value of the reviews.

    • This reply was modified 3 years, 2 months ago by Gemini Labs.
    Thread Starter datformatiebv

    (@datformatiebv)

    The method described partly works. There are some fields that are not imported correctly however.
    We have abandoned this approach for now and attempted to create the Reviews using the API but also there we run into problems. (we will start an separate thread for that)

    Plugin Author Gemini Labs

    (@geminilabs)

    There are some fields that are not imported correctly however.

    Which fields?

    Thread Starter datformatiebv

    (@datformatiebv)

    Issue seems to be related to incorrectly imported CPT’s in a multi-language WPML WP instance.

    WMPL dev have provided workaround and are further investigating incident reported for permanent resolution.

    Import of site-reviews (using the Import Third Party Reviews method”) worked as designed after application of workaround.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘howto migrate site review’ is closed to new replies.