# VanillaフォーラムをDiscourseに移行する

**URL:** <https://meta.discourse.org/t/migrate-a-vanilla-forum-to-discourse/27273>\
**Category:** Sysadmins\
**Tags:** how-to\
**Created:** [2015 年 4 月 6 日午後 9:27 UTC](https://meta.discourse.org/t/migrate-a-vanilla-forum-to-discourse/27273 "2015-04-06T21:27:39Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Abdul\_Munim\_Zahid](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/abdul_munim_zahid/32/39786_2.png) [@Abdul\_Munim\_Zahid](https://meta.discourse.org/u/Abdul_Munim_Zahid)\
**Post date:** [2015 年 4 月 6 日午後 9:27 UTC](https://meta.discourse.org/t/migrate-a-vanilla-forum-to-discourse/27273/1 "2015-04-06T21:27:39Z")

</div>

I know there are a lot of posts about importing contents from a vanilla forum, but theres a lack of **comprehensive guide**!

Not everyone can afford to hire a developer to migrate their forums and this is my way of giving back to this community 😄

So here it goes:

**You Need:**

1. Terminal (if mac) or alternative for windows
2. A mind strong enough to understand and follow this guide!
3. Patience
4. A cup of coffee

### Step 1: Getting the Importer file!

Use this addon to get the porter file: [Vanilla Porter Addon](http://vanillaforums.org/addon/porter-core)

This will give you a .gz file. Extract it.  
Now rename the newly extracted file to something short and easy and change the extension to .txt.

> For example: “export\_blabla\_fdata\_20150312\_052004.txt” becomes “export.txt”

**(For clarity in this guide, and less typing, rename it to export.txt.)**

### Step 2: Uploading the Importer file!

Now you need to upload this file to your server: (A lot of people ask me how to do this on Fiverr :o )  
On Terminal (MAC) use this command:

```
scp path/to/exporter.txt root@[IP Address of your droplet]:/var/discourse/shared/standalone

```

Here’s an example:

```
scp user/desktop/exporter.txt root@104.236.198.206:/var/discourse/shared/standalone

```

> Hit enter and then input the root password of your droplet!

Voila, your importer file is now on the server!

For Windows users, you can use [WinSCP](http://winscp.net/eng/download.php) or FileZilla if you already have it. Connect with port 22.

### Step 3: Make sure import file has correct permissions

First SSH into your server

```
ssh root@[ip-address of your server/droplet]

```

It will then ask you the root password. Enter it!

Now that you are in the server.  
Navigate to the place where you uploaded the txt file.  
To do so:  
Run this command:

> cd /var/discourse/shared/standalone/uploads

Now lets assign 666 chmod to the exporter file we just uploaded:

> chmod 666 export.txt

Hit enter and you are done! On to the next step

### Step 4: Setting the mood for some migration 😉

Run these commands:

> cd /var/discourse/  
> ./launcher enter app  
> su discourse  
> cd /var/www/discourse

If you are curious. These commands are just first switching you to the discourse folder, then entering the app, then changing the user to discourse etc. Im sleepy so wont elaborate.

### Step 5: Running the importer script!

> RAILS\_ENV=production ruby script/import\_scripts/vanilla.rb /shared/export.txt

Had you been following this guide correctly and obtained a “correct” export file from the vanilla forum.  
Everything should work out and Congrats!

**You just migrated your forum from Vanilla to Discourse!** Congrats!

Now if you have any questions, Or if you are stuck somewhere; Please feel free to post your issue below! I would try to help!  
If you spot a mistake or wish to suggest an improvement to this course do let me know! (How to turn this into wiki post?)

---

_[View the full topic](https://meta.discourse.org/t/migrate-a-vanilla-forum-to-discourse/27273)._
