View Categories

Importing from bbPress or wpForo

The Import tab brings bbPress or wpForo forums, topics, and replies into GravityOps Forum. Each topic and reply becomes a Gravity Forms entry on the topic or reply form assigned to its forum, exactly as if it had been posted on your site, so it shows in the forum, in Gravity Forms, and in your exports.

You can import from:

  • bbPress on this site. The importer reads bbPress content straight from the database, so it works even after you deactivate bbPress.
  • A WordPress export file (WXR). Export the old site with Tools > Export (choose “All content”, or the Forums, Topics, and Replies types) and upload the .xml file on the Import tab.
  • wpForo on this site. The importer reads wpForo’s own tables, so it also works after you deactivate wpForo. wpForo can have several boards; you import one board at a time and pick it from the Board list under the wpForo choice.

Before you start #

  1. Assign a topic form and a reply form. On the Forms tab, map a topic form (title, content, and optionally tags) and a reply form (content). A global assignment covers every forum, including the ones the import creates. A forum without an assigned topic or reply form has its content skipped, and the preview tells you which forums are affected.
  2. Create a board. New forums are created on a board you choose.
  3. Check your access sets. New forums get the access set you choose (by default “Standard User” when it exists).
  4. Back up your site. The import adds entries and forums. It has no undo.

Running an import #

  1. Open GravityOps > GravityOps Forum > Import.
  2. Choose the source. For an export file, choose the file and click Upload. For wpForo, choose the board.
  3. Click Preview import. Nothing is written. The preview shows:
    • how many forums, topics, and replies will be imported, and how many were imported before;
    • content that is not imported because of its status (see below);
    • authors with no matching user on this site (on Premium, every author, with a choice of user: see “Choosing authors” below);
    • one row per source forum, with a choice of Create a new forum, Map to an existing forum, or Skip. Forums imported before are mapped to the same forum again and marked “Imported before”.
  4. Set the options:
    • Board and Access set for new forums.
    • Status of new forums: match the source (published becomes Active; private and hidden stay private and hidden; a disabled wpForo forum becomes hidden), or create every forum as a draft and publish it later.
    • Sub-forums: keep sub-forums nested under their parent (Premium). On the free plan, and when this is off, every forum is created at the top level.
    • Default author for posts whose author has no matching user, and whether to add an entry note naming the original author.
    • Topic limit for a trial run. The replies of the imported topics are imported too. An uploaded export file is kept after a trial run, so you can run the full import without uploading it again.
    • Tags, Sticky topics, Closed topics (locked), and IP addresses (off by default).
    • Dry run: on by default. A dry run counts everything and writes nothing.
  5. Click Start. The import runs in batches and shows its progress. You can pause and resume it, and if you leave the page, the Import tab offers to continue it when you come back.
  6. When a dry run looks right, untick Dry run and click Start again.

Choosing authors (Premium) #

Each post is matched to a user on this site automatically: by user ID (bbPress and wpForo on this site), then by username, then by email. Posts with no match get the default author.

On Premium, the preview lists every author in the source with their post count, user ID, username, email or guest name, and the user they were matched to automatically. For each author, choose:

  • Keep the automatic match (the default);
  • Use the default author, for example to stop a guest’s email matching a user;
  • a user you find by typing in Search users (name, username, email, or user ID). The first match is selected; pick another from the list if needed.

Your choices are kept when you click Refresh preview and are applied when the import runs, including when you continue it later. Posts given a user you chose do not get the “original author” note. The final report counts them as “Posts whose author you chose”.

On the free plan, authors are always matched automatically.

What is imported #

bbPress GravityOps Forum
Forum (published, private, hidden) Forum on the chosen board, or the forum you mapped it to
Category Forum. Choose Skip if you do not want it
Topic (published or closed) Entry on the forum’s topic form: title, content, and tags
Closed topic Locked by a moderator
Sticky and super sticky topic Sticky in its forum
Reply (published) Entry on the forum’s reply form
Threaded reply Reply shown in date order, not nested
Post date Entry date (kept exactly)
Author The user with the same ID (bbPress on this site only), username, or email; otherwise the default author

Topics are imported oldest first, so the forum shows them in the same order as bbPress.

Content is not imported when it is pending, spam, in the trash, or private (topics and replies), or a draft. The preview and the final report count it by status. A reply whose topic is not imported is skipped.

Super sticky topics are stored in a site option, not in the posts, so a WordPress export file does not include them. Imported from an export file, a super sticky topic is sticky only if it was also sticky in its own forum.

wpForo #

wpForo GravityOps Forum
Category (a top-level forum) Forum. Choose Skip if you do not want it
Forum and sub-forum Forum; sub-forums stay nested on Premium when you keep sub-forums
Disabled forum Hidden forum
Topic Entry on the forum’s topic form. The topic’s first post is its content
Sticky topic Sticky in its forum
Closed topic Locked by a moderator
Topic tags Tags
Reply (every other post) Entry on the forum’s reply form
Threaded reply Reply shown in date order, not nested
Post date (stored by wpForo in UTC) Entry date (kept exactly)
Author The user with the same ID on this site; otherwise the default author
Guest post Guest post with the guest’s name in the entry note
Post by a deleted user (“Anonymous” followed by the old user ID) Guest post, named the same way

Unapproved and private topics and posts are not imported; the preview and report count them. A reply in a topic that is not imported is skipped.

Each board is imported separately and remembered separately, so a topic on one board is never mistaken for the topic with the same number on another board.

Attachments. Files attached with wpForo’s built-in uploader appear in the post as a link. The import keeps that link exactly as it is, so it keeps pointing at the file in wpForo’s upload folder (wp-content/uploads/wpforo/). The files are not copied or moved: keep that folder when you remove wpForo. Attachments from wpForo’s paid Advanced Attachments add-on are stored as [attach] shortcodes, which only that add-on can display.

What the import does not do #

  • It does not send notifications, run Gravity Forms feeds, or start Gravity Flow workflows for imported entries.
  • It does not import subscriptions or favorites.
  • It does not copy attachments, or change links in the content to point at the new forum. Links to attachments keep working while the original files stay where they are.

Running it again #

Every imported topic and reply remembers where it came from, and every imported forum is remembered too. Running the same import again skips anything already imported and reuses the same forums, so you can import in parts or bring across posts written since the last run. If an import was interrupted in the middle of an item, the next run finishes that item instead of creating it twice.

Sites that imported with the earlier BrightLeaf import snippet are recognized, so those posts are not imported twice either.

Importing with abilities #

The importer is available as WordPress abilities, for the REST API and AI assistants. They need the same permission as the Import tab.

Ability What it does
gofrm/list-import-sources Lists the sources and the bbPress and wpForo content found on this site, with one entry per wpForo board. Each entry’s args is the source to pass to the other abilities
gofrm/preview-import Previews an import without writing anything, including every source author (authors.list) with its automatic match
gofrm/start-import Starts an import job (a dry run unless dry_run is false). On Premium, author_map chooses users for source authors
gofrm/continue-import Runs the next batch; call it until done is true
gofrm/get-import-status Shows a job’s progress
gofrm/cancel-import Cancels a job; content already imported is kept

For wpForo, pass { "type": "wpforo", "board": 2 } as the source (board 0 is wpForo’s default board).

author_map (Premium) is a list of { "author": "<key>", "user_id": <id> }. The key comes from authors.list in the preview, such as id:12, login:jane, email:jane@example.com, or name:Guest Gary. A user_id of 0 sends that author’s posts to the default author. Authors you leave out keep the automatic match. On the free plan, author_map is refused.

To import an export file through abilities, upload it on the Import tab and pass its upload_id, or add the .xml file to the Media Library and pass its attachment_id.

For developers #

  • gofrm_import_sources (filter): the source adapters, as type => class name. A class implements Gravity_Ops_Forum_Import_Source.
  • gofrm_import_entry (filter): the Gravity Forms entry built for an imported topic or reply, before it is added.
  • gofrm_import_before_entry and gofrm_import_after_entry (actions): run around each imported entry, for example to switch off a site-specific gform_post_add_entry listener.
  • gofrm_import_author (filter): the user an imported post is attributed to.
  • gofrm_import_suppress_workflow (filter, default true): whether Gravity Flow is kept from starting workflows for imported entries.
  • gofrm_import_batch_size (filter): how many items one batch processes (default 50).
  • gofrm_import_completed (action): fires with the final report when a job finishes.

Stuck? Ask in GravityOps Help #

Search past answers or post your question, tagged "forum".