• Skip to content
  • Skip to primary sidebar
  • Skip to footer

Foliovision

Making the web work for you

Main navigation

  • Weblog
    • FV Player
    • WordPress
    • Video of the Week
    • Case Studies
    • Business
  • About
    • Testimonials
    • Meet the Team
    • We Support
    • Careers
    • Contact
    • Pricing
  • Products
  • Support
    • FV Player Docs
    • Pro Support
  • Login
  • Basket is empty
Affordable VAST/VPAID for Wordpress has arrived. Serve ads with your videos starting today!

How to convert bbPress 1 forums to bbPress 2

24 May 2016 / Martin / Leave a Comment

Moving from bbPress 1 to 2 is a pain in the neck. It’s really like migrating from one forum software product to another. It’s not an evolution but a revolution. In use, bbPress 2 is not much better than bbPress 1 but since John James Jacoby pushed version two out the door in 2011, it’s long since time to migrate. The issue with bbPress 1 is not with the software itself (still simple and scaleable) but with plugins.

John James Jacoby forced all the bbPress v1 plugins underground (info and plugin repository were moved over to v2). Unlike almost anything else new in the WordPress world, bbPress 2 is neither crippleware (useless free version with pro version) or serviceware, so we are grateful for bbPress.

The 263 reasons we all have to upgrade to bbpress 2
The 263 reasons we all have to upgrade to bbPress 2

We’re not the only ones to have mixed feelings about this migration and come late to it. WordPress.org is still using (as we speak), bbPress 1. WordPress.org has decided to migrate now so we’re publishing our experience with complex bbPress 1 migrations to bbPress 2 to help them. Here’s the grim details.

How to Migrate from bbPress 1 to 2

Since bbPress 2 provides a database conversion tool in Tools -> Forums -> Import, the switch from bbPress 1 doesn’t seem like a big trouble. If you run a customized forums, just like WordPress.org does, then you forum conversion might turn into a big job, just like the forum conversion on WordPress.org did.

Handling bbPress 1 Customisations

Our conversion was even harder as in our forums we allowed:

  1. Guest posting – we really hate when you have to register before posting, why not just register the user using his email address? In bbPress version 1 we customized the bb-post.php file to allow this.
  2. Nicer forum permalinks – using bbPress 1 plugin nicer-permalinks/nicer-permalinks.php
    1. we don’t like the bbPress default URL structure. As see on WordPress.org: /support/topic/{topic-slug}
    2. what we are after is /support/{plugin-name}/{topic-slug}
  3. Forum moderation – since we allow guest posting it much needed. We also get a fair amount of support requests where users post their client websites and don’t want their URLs to be revealed. This used a bbPress 1 plugin bb-moderation-hold/moderation.php

To bring these functions to our new forums we created FV bbPress Tweaks. The plugin is currently pending approval for WordPress.org plugin repository, you can get it from our Github repository.

Conversion steps

The following steps are not perfect, as we did only around 3 forum conversions with it and only 1 forum (ours) had the moderation enabled, but it will give you some good tips of what to do and what not to do.

Our bbPress database version was 2078, some of these issues might be fixed if you had a newer version.

  1. Store IDs of replies that are pending moderation and approve them. This is needed as the bbPress 2 importer doesn’t handle these at all. Use the SQL:

    select post_id from bb_posts where post_status = -1; # store this!
    update bb_posts set post_status = 0 where post_status = -1;

  2. Store IDs of topics and replies that are deleted. Use the SQL:

    select topic_id from bb_topics where topic_status = 1 # store this!
    select post_id from bb_posts where post_status = 1 # also store this!

  3. Because the bbPress 1 forum used a plugin for moderating of the replies the post positions were handled incorrectly and the export was broken all the time. Use this script: Fix bbPress 1 post positions (Note: it actually requires bbPress 1 to run)
  4. Use the actual bbPress import tool: Tools -> Forums -> Import. Since we fixed some of the structural issues in steps 1, 2 & 3, the import should work fine.
  5. Run this script to mark the deleted topics and replies as trash and put back information about moderated replies: bbPress 1 to bbPress 2 cleanup tool
  6. Fix the forums slugs to not have number post-fixes because of duplicity. In our forums we have the same “Troubleshooting” sub-forum for each plugin (forum), but there is no reason to append the number into the forum slug as there is hierarchical structure:
    1. Create backup of DB.
    2. Use the following SQL to figure out which forums slugs have to be correted:

      SELECT * FROM `wp_posts` WHERE post_type='forum' AND (post_name REGEXP '^(.*)-[0-9]')

    3. …and just correct the post_name fields as required
    4. Once finished visits Settings -> Permalinks to refresh the rewrite rules
  7. Mark pending topics from step 1 and pending. We only had a couple of these, so it was done by hand.
  8. Migrate the user topic subscriptions. On the old bbPress forums we used a plugin which utilized the favorite topic function. Use this PHP code to move it over to bbPress 2 subscriptions: Convert bbPress 1 favorite topics into topic subscriptions in bbPress 2

And as the last step put up FV bbPress Tweaks.

We hope this helps. Feel free to ask any questions here or to use our FV bbPress Tweaks software. We’re open to adding improvements to bbPress Tweaks to make life easier for bbPress administrators. Long live bbPress 2!

Martin Vicenik

Martin Viceník

Martin graduated as an engineer in Computer Science from Slovak Technical University in Bratislava. He grew up in Liptovský Mikuláš in northern Slovakia next to the beautiful Tatra mountains. He is the developer behind our FV Player.

Categories: WordPress

Related Posts

  1. Forums for WordPress sites: bbPress

    Forums for WordPress sites: bbPress

  2. How to make WordPress 4.0 play nice with original bbPress

  3. Forums and WordPress

    Forums and WordPress

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

You can click here to Subscribe without commenting

Primary Sidebar

My Account

  • My Licenses
  • My Profile
  • Invoices
  • Affiliate Area
  • Log Out

Categories

  • Business
  • Camera Reviews
  • Case Studies
  • Design
  • Flowplayer
  • Internet Marketing
  • IT
  • Life
  • SEO
  • Slovak
  • Video of the Week
  • WordPress

Footer

Our Plugins

  • FV WordPress Flowplayer
  • FV Thoughtful Comments
  • FV Simpler SEO
  • FV Antispam
  • FV Gravatar Cache
  • FV Testimonials

Free Tools

  • Pandoc Online
  • Article spinner
  • WordPress Password Finder
  • Delete LinkedIn Account
  • Responsive Design Calculator
Foliovision logo
All materials © 2023 Foliovision s.r.o. | Panská 12 - 81101 Bratislava - Slovakia | info@foliovision.com
  • This Site Uses Cookies
  • Privacy Policy
  • Terms of Service
  • Site Map
  • Contact
  • Tel. ‭+421 2/5292 0086‬

We are using cookies to give you the best experience on our website.

You can find out more about which cookies we are using or switch them off in settings.

Powered by  GDPR Cookie Compliance
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

Necessary Cookies

Strictly Necessary Cookie allow you to log in and download your software or post to forums.

We use the WordPress login cookie and the session cookie.

If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.

Support Cookies

Foliovision.com uses self-hosted Rocket.chat and self-hosted Freescout support desk to provide support for FV Player users. These cookies allow our visitors to chat with us and/or submit support tickets.

We are delighted to recommend self-hosted Rocket.chat and especially Freescout to other privacy-conscious independent publishers who would prefer to self-host support.

Please enable Strictly Necessary Cookies first so that we can save your preferences!

3rd Party Cookies

This website uses Google Analytics and Statcounter to collect anonymous information such as the number of visitors to the site, and the most popular pages.

Keeping this cookie enabled helps us to improve our website.

We reluctantly use Google Analytics as it helps us to test FV Player against popular Google Analytics features. Feel free to turn off these cookies if they make you feel uncomfortable.

Statcounter is an independent Irish stats service which we have been using since the beginning of recorded time, sixteen years ago.

Please enable Strictly Necessary Cookies first so that we can save your preferences!