bbPress Forums migration

Topics and Replies not showing after import

Issue

We have exported and imported my forum, topics, replies, and users using the WP import / export functionality. Everything appears in the admin but only the forums appear on the site.

Solutions

We have to manually update a topic in the admin, it appears on the site. 

When you go to Forums → All Forums in WordPress admin:

This script is basically:

“When a bbPress topic/reply/forum is opened in the editor, automatically click Update once, show progress text, and close the popup when finished—while preventing duplicate updates.”

This is useful if you’re opening bbPress posts in popup windows or running a bulk moderation workflow.

				
					<?php 
add_action('admin_footer', function() {
    global $pagenow;

    if ($pagenow === 'post.php') {
        ?>
        <script>
        jQuery(function($) {
            const postType = $('input[name="post_type"]').val();
            const postID = $('#post_ID').val();
            const updateKey = `bbpress_update_${postID}`;

            if (['topic', 'reply', 'forum'].includes(postType)) {
                const urlParams = new URLSearchParams(window.location.search);
                const statusBox = $('<div id="auto-update-status" style="margin-left: 10px; color: #2271b1; display: inline-block;"></div>');
                $('#publish').after(statusBox);

                if (!urlParams.has('updated')) {
                    if (!sessionStorage.getItem(updateKey)) {
                        sessionStorage.setItem(updateKey, '1');
                        statusBox.text('Auto-updating...');
                        setTimeout(() => {
                            $('#publish').trigger('click');
                        }, 300);
                    } else {
                        statusBox.text('Already auto-updated.');
                    }
                } else {
                    statusBox.text('Update complete!');
                    setTimeout(() => {
                        window.close();
                    }, 500);
                    // Clean up so future updates can happen again if needed
                    sessionStorage.removeItem(updateKey);
                }
                // Your logic: auto-close if status is correct
                setTimeout(() => {
                    const statusText = $('#auto-update-status').text().trim();
                    if (statusText.includes('Already auto-updated.')) {
                        window.close();
                    }
                }, 1500); // wait for message to render
            }
        });
        </script>
        <?php
    }
});