Migrating from phpBB

Last updated on
10 August 2016

Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites

For the owners of a phpBB forum, there are two solutions:

  • either migrate the data of your board to a Drupal forum,
  • To Migrate phpBB3 to Drupal 7 Advanced Forum, one approach that does work is documented here:

    This particular case was upgrading Drupal 6 phpbb3 > drupal 7 advanced forum.

    Prelimary Steps:

    • Prepare the phpbb3 db by removing any non prefixed (phpbb_) tables and only retaining the phpbb3 data as long as the phpBB3 forum still works is the main thing.
    • Next export the prefixed phpbb_ table data (output.sql) and run: sed -e 's/phpbb_//g' output.sql > fixed.sql effectively stripping the table prefix.
    • Wipe and import fixed.sql to the phpBB3 db and adjust your config.php file to suite. Now your phpBB data is ready to migrate.
    • Open up a console and issue: tail -f /var/log/apache2/error.logor whatever helps you catch the 404's when you attempt the first migration.
    • Then attempt to import the avatars. This will most likely fail.

    Once I hit the problem of not being able to import the avatars the whole process came to a halt and here's how it was resolved:

  1. First I touched every file that didn't exist in /phpBB3/images/avatar/upload/ and set the permissions to.
  2. Then I renamed /phpBB3/.htaccess to /phpBB3/htaccess.bak
  3. Plus rename /phpBB3/images/avatar/upload/.htaccess to /phpBB3/images/avatar/upload/htaccess.bak
  4. Create a dump of the Drupal 7 db now so you can revert back easily if things don't go according to plan.
  5. Attempt #1: run the migrate on avatars/images again, this time it copied the blank files I touched but complained about integrity constraints because there were duplicate items existing.
  6. So go into the phpbb3 db (via phpmyadmin) for example, and delete the files in question (step 5) from tables: migrate_map_phpbbavatarand users
  7. Head back to the migrate screen and roll back any changes as well as re-import the clean Drupal 7 db backed up in step 4. Then run another import of avatars.
  8. For each file that kicks up the error about duplicate entries, do a phpmyadmin search from within the original phpBB3 db and remove any reference to those files from the above mentioned tables in Step 6.
  9. After another attempt at migration I got success and was able to proceed with the rest of the import functions.

    The one thing that saved a lot of time in testing was constantly backing up the new Drupal 7 db as I made each successful step so I didn't have to redo all the work previously achieved. I had similar problems when importing the PhpbbAttachment and repeating these steps resolved it.

    Hopefully this helps others as it was a bit of a tricky process.

  • or integrate the phpBB board within the Drupal web site.
  • Help improve this page

    Page status: No known problems

    You can: