# Migrating from SMF to Discourse

**URL:** <https://meta.discourse.org/t/migrating-from-smf-to-discourse/26322>\
**Category:** Product Support\
**Created:** [14.Март.2015 13:15:21 UTC](https://meta.discourse.org/t/migrating-from-smf-to-discourse/26322 "2015-03-14T13:15:21Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![Mte90](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mte90/32/120441_2.png) [@Mte90](https://meta.discourse.org/u/Mte90)\
**Post date:** [26.Декабрь.2017 15:26:29 UTC](https://meta.discourse.org/t/migrating-from-smf-to-discourse/26322/9 "2017-12-26T15:26:29Z")

</div>

> [@elberet](#):
>
> cd /var/discourse && ./launcher enter app  
> apt-get update && apt-get install libmysqlclient-dev  
> su - discourse  
> gem install mysql2  
> cd /var/www/discourse/script/import\_scripts  
> ruby smf2.rb /shared/smf -h $myql\_server -t $php\_timezone

For who us wondering about how to use the script:

- The path is required to parse the `Settings.php` file and get the database connection parameters. In my case I imported the db locally and updated that file and created a folder with only this file
- For timezone you have to write in that syntax: Europe/Rome as example and UTC
- Add many ram to your vm. I forgot it to do it and now is important 45000 user with the default parameters
- Don’t forget to install your discourse in your installation
- Tweak a little bit the MySQL settings for more cache and more connections because with an huge db the connection can stop and you have to start again
- The script reconize the already stuff imported so in case of crash you can execute again
- I made a patched version of mysql2 to avoid invalid month/date [GitHub - Mte90/mysql2: [Patched] A modern, simple and very fast Mysql library for Ruby - binding to libmysql · GitHub](https://github.com/Mte90/mysql2)

---

_[View the full topic](https://meta.discourse.org/t/migrating-from-smf-to-discourse/26322)._
