OK, here my Migration Tut... ๐ (EDIT: Please also read the PS Statements below)
Please don`t hurt me, Iยดm more a poweruser and less a programmer, especially looking on Vanilla or Flarum.. ๐
First, as @luceos wrote, there might be a better porting way, look for NITRO PORTER by @linc
If this isn`t working for you, try these steps:
First you have to Install your fresh FLARUM on your Server, then:
- download Converter software
- Save it for example parallel to your Vanilla Folder on your server (side by side)
- Follow the Installation guide (fill out the .env file!)
You have to go into the Converter Folder on CLI and use "composer Install" to install it.
- Call your Link to the Converter folder and go into the "Public" Folder , for example
https://www.yourdomain/Converter/Public
BE AWARE! the process starts automatically!! But this is not a problem, because you can always RESTART the process, after you hit an error.
you will get Errors! For example:
duplicate Mails, or duplicate Names!
Some Errors will be corrected by the Converter, for Example Names with two words will be consolidated, or Users with no Mail will be ignored!
I fixed this issues directly in my Source Database (wich I`ve previously backuped!!)
If you get an error with "Foreign Key" in it, then you have to change this in
vanilla2flarum/public/importer/discussions-posts.php
FIND:
$query = RunPreparedQuery($dbFlarum, $discussionData, "INSERT INTO {$dbFlarumPrefix}discussions.....
INSERT
$query = RunPreparedQuery($dbFlarum, $discussionData, "SET FOREIGN_KEY_CHECKS=0; INSERT INTO {$dbFlarumPrefix}discussions.....
After that, start the process again... and that should be it!! ๐๏ธ
If you know PHP better than me, you could certainly do these DB fixes of mine in the php Converter code... ๐๏ธ
After converting, there maybe will be errors in formatting, wich you can then resolve directly in your database...
If you have Questions, I will try to help you, but have in Mind, I`m no expert.. ๐
PS: Forgot this:
1. PASSWORDS:
Passwords ARE NOT COPYED!! Not shure why, but i think somtimes there are not stored in BCRYPT Format if they where previously imported from another Forum to Vanilla.
If you want to copy the passwords, you have to:
Open vanilla2flarum/public/importer/users.php
FIND:
':password' => '',
REPLACE WITH:
':password' => $user['Password'],
2. GROUPS:
The Converter will copy the GROUPS to Flarum, but you have to manually correct these:
These where the Values, that where copied from Vanilla to Flarum:
id name_singular name_plural
200 ADMINISTRATOR ADMINISTRATORs
196 GUESTS GUESTSs
Etc.
These are the correct Values:
1, 'Admin', 'Admins',
2, 'Guest', 'Guests',
3, 'Member', 'Members'
4, 'Mod', 'Mods'
3. group_user
You have to insert your Admin ID with the Admin Group ID in this Table!
If not, YOUR ADMIN WILL NOT WORK!!
4. Admin Password:
If Admin password is not working, generate your password here and put it in the USERS Table DB