# phpBB 3 Importer (old)

**URL:** <https://meta.discourse.org/t/phpbb-3-importer-old/17397>\
**Category:** Feature\
**Created:** [9 Luglio 2014, 6:57pm UTC](https://meta.discourse.org/t/phpbb-3-importer-old/17397 "2014-07-09T18:57:02Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)\
**Post date:** [9 Luglio 2014, 6:57pm UTC](https://meta.discourse.org/t/phpbb-3-importer-old/17397/1 "2014-07-09T18:57:02Z")

</div>

**NOTE** : _This guide is out-dated. [Follow this guide instead!](https://meta.discourse.org/t/importing-from-phpbb3/30810)_

* * *

I committed [a script to import from a phpBB 3 to Discourse](https://github.com/discourse/discourse/blob/master/script/import_scripts/phpbb3.rb), similar to our [Drupal](https://github.com/discourse/discourse/blob/master/script/import_scripts/drupal.rb), [Kunena](https://github.com/discourse/discourse/blob/master/script/import_scripts/kunena.rb), and [bbPress](https://github.com/discourse/discourse/blob/master/script/import_scripts/bbpress.rb) importers. Contributions and fixes are welcome!

Thanks to [ruby-bbcode](https://github.com/veger/ruby-bbcode) and @haiku’s [ruby-bbcode-to-md](https://github.com/inflatablefriends/ruby-bbcode-to-md), some bbcode can optionally be converted to markdown before importing into Discourse. I made a fork that does some conversion that is specific for Discourse. The script will also handle some other phpbb-specific markup, like smileys and links that use `<!-- m -->`, etc.

## Usage:

Edit the bbpress3.rb file to change the MySQL connection info (`PHPBB_DB`, and `Mysql2::Client.new(...)`) so it connects to a local copy of the phpBB database.

To convert phpBB’s bbcode to markdown before importing, install the ruby-bbcode-to-md gem. In a temp directory:

```plaintext
git clone https://github.com/nlalonde/ruby-bbcode-to-md.git
cd ruby-bbcode-to-md
gem build ruby-bbcode-to-md.gemspec
gem install ruby-bbcode-to-md-0.0.13.gem

```

Run the import, from the discourse project directory:

```plaintext
ruby script/import_scripts/phpbb3.rb bbcode-to-md

```

---

_[View the full topic](https://meta.discourse.org/t/phpbb-3-importer-old/17397)._
