Migrating from BBPress Standalone to BBPress Plugin for WordPress

Today we will journey through the exciting world of database migration and BBPress trial and error. I am writing this post as I commence the process of migrating a rather large BBPress standalone installation to the new BBPress Plugin for WordPress. First, some facts:

  • The BBPress standalone installation has the following current stats:
    • 14 Forums
    • 5673 Topics
    • 84273 Posts
    • 20125 Users
    • bbPress 1.0.2
    • A Custom Theme
  • I am migrating to bbPress 2.0
Great, on with the show.

Installing the Plugin

1. Firstly, back up your database. I had to back mine up in pieces, so that I could import it successfully (what with it being so large). To do this:

  1. In PHPMyAdmin, click the name of your database on the left hand side
  2. Click Export in the top navigation
  3. Select a few tables, some tables are larger than others, and this should be taken into account when creating the broken up backups. For example, I:
    • Backed up bb_posts & wp_users as their own individual .sql backups. Not both of them together, each separate.
    • Backup every other table in one backup.
    • I used .bzip compression, but any compression would likely do.

Now, if anything goes wrong, you’ll be able to import the backups again and restore…and won’t deal with the hassle of too large of files to import.

If your forum is significantly smaller than the one I’m dealing with, you may be able to back everything up at once.

2. Next, you’ll want to download the plugin and install it, or go to Plugins > Add New and search for BBPress, then click the Install Now link.

3. Once the plugin is installed, via the Plugins page, deactivate everything but BBPress.

4. Go to Tools > Import and select bbPress Standalone from the list there.

Read through the instructions on that page. They repeat the above, but reading is fun and good for the soul! Onward, make certain that thebbPress Standalone Path is populated with the actual path to the bb-config.php file. For example, mine was /usr/www/users/mysite/devsite/bbpress/bb-config.php

Yours will not be the same, this depends on how your host is setup and your particular situation. If you’re uncertain, call your hosting company and ask them. Hosting companies always love phone support.

5. Migrate Users. Okay so I had some bigtime trouble with the Migrate Users aspect of the whole scenario. This is likely due to the fact that I had previously had my standalone BBPress installation’s userbase integrated with my WordPress userbase, and they importer states clearly that migrating users in this way is not supported. My advice to you is to skip this step. I’ve included some additional information if you want to try this, but if you’d rather have your BBPress working without going off on a pointless tangent, skip this.

After reading my note above, if you still want to do this, with Migrate Users selected from the list of three radio button options, click StartThis process messed up my wp_users and wp_usermeta table, to the point where I was not able to login. The solution is below as well, but do read everything before proceeding.

I got an error.  The error was:

Importing Users

We’re in the process of migrating your users…

Renamed the wp_users and wp_usermeta tables to bb_wp_users_tmp and bb_wp_usermeta_tmp respectively.
There was a problem duplicating the table bb_users to wp_users. Please check and re-run the script or duplicate the table yourself.

This destroyed my wp_users table. Good thing I had a backup! But luckily, the importer / converter tool made backups for me, too. To get my wp_users and wp_usermeta tables back:

  1. In PHPMyAdmin, click on the name of your database on the left.
  2. Click SQL
  3. Run the following:RENAME TABLE bb_wp_users_tmp TO wp_users; RENAME TABLE bb_wp_usermeta_tmp TO wp_usermeta;
  4. That will change the backups the importer tool made back to the real deal.

6. If you opted to go through with Step 5, go back to Tools > Import, select the BBPress Standalone option, and choose Cancel and Start New.

  1. Now, with the Import Forums, Topics, and Posts radio button selected, click Start.
  2. Wait (for a long time if your installation is like mine…30 minutes or longer) for the importer to do it’s thing.
  3. When it’s finished, a message will appear at the bottom of the page, stating something about you needing to do a recount. Click the recount link in that sentence.
7. Doing the Recounts.
I selected all of the boxes. To be honest, I’m not sure if that’s necessary, but I figured “What the heck, I’m young, right?” I am actually 32 as of the posting of this message, though the Driver’s License issued to me in Oregon has the wrong birthday on it so for another month I’m only 31 in the Beaver State. End tangent.
Select the boxes you want, and click Recount Items.
And with that, you should be all set! Next up? Trying to integrate my old BBPress theme with my custom WordPress theme…but perhaps that’s a post for another time.

Up Next: Freelancer Prerequisites: Basecamp