WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Related Posts
[resolved] Rebuild the related post database (5 posts)

  1. Enterpr1se
    Member
    Posted 6 months ago #

    Yesterday I clean up the database, I think wp_wp_rp_tags is a table that doesn't use anymore, so I deleted it.
    I know I make a mistable so I create this table again.

    CREATE TABLE wp_wp_rp_tags (
     post_id mediumint(9),
     post_date datetime NOT NULL,
     label VARCHAR(32) NOT NULL,
     weight float,
     INDEX post_id (post_id),
     INDEX label (label)
    );

    But it seems the related post does not related again, may I ask how to force WordPress Related Posts rebuild the database again?
    Thanks so much

    https://wordpress.org/plugins/wordpress-23-related-posts-plugin/

  2. silvoslaf
    Member
    Plugin Author

    Posted 6 months ago #

    Hey, thanks for reaching out and sorry for the late reply!

    We think we are onto something here, but first we need to know if you have the full access to your database, since this is quite important to get it sorted.

    Let us know, we're looking forward to your reply! Take care & have a nice day!

    Best,
    Silvo

  3. silvoslaf
    Member
    Plugin Author

    Posted 6 months ago #

    Hey, so we think we got you a solution ready, just follow the steps below and you should be good to go.

    First, go to your WordPress's Dashboard, under 'Plugins'-'Editor', select our plugin (WordPress Related Posts) on the top right corner (via the drop-down menu) and paste the code below in the first plugin file, at the very top/beginning of your editor. After that click on the 'Update File' button, below the editor.

    Here's the code:

    function wp_rp_tmp_uninstall() {
        global $wpdb;
    
        $tags_table_name = $wpdb->prefix . "wp_rp_tags";
        $sql = "DROP TABLE " . $tags_table_name;
    
        $wpdb->query($sql);
    
        delete_option('wp_rp_options');
        delete_option('wp_rp_meta');
    }
    wp_rp_tmp_uninstall();

    Now, go back to the home page of your Dashboard, (hard-)refresh the page several times, go back to your plugin editor and remove that code you just entered — revert it to the previous state.

    'Update File' again, go to your plugins list and you should be able to fresh start your plugin. :)

    Let me know how it goes, I'm eager to hear the results! Take care & have a nice day!

    Best,
    Silvo

  4. Enterpr1se
    Member
    Posted 6 months ago #

    Hi Silvo,

    I believe it solved the problem.
    The plugin come back to initial status again.
    The related post is more accurate now.
    Thanks so much.

  5. silvoslaf
    Member
    Plugin Author

    Posted 6 months ago #

    Hey, that's great news, really glad we could be of any help, to be honest!

    You are always welcome to leave a vote or a review about us on our plugin page on the WordPress website, if you find the time. It shouldn't take you more than a minute (two, if you write something nice)! :)

    Here's the link: http://wordpress.org/support/view/plugin-reviews/wordpress-23-related-posts-plugin

    As always — if you have any questions or if you stumble upon any problems, do not hesitate to let us know! We'll gladly help!

    Take care & have a nice day!

    Best,
    Silvo

Reply

You must log in to post.

About this Plugin

About this Topic