This guide assumes that you have already configured your new system with a webserver (apache / Nginx for example).
How to migrate Flarum from one server to another.
Copying your files
1) Login to your new server
2) On the new server, type the following command to pull across your old FTP files (from your old server):
scp -r root@yourserverip:/path/to/your/files /path/to/new/directory
for example:
scp -r {username}@{IP_of_old_server}:/var/www/creatorswave.com /var/www/creatorswave.com)
3) Enter the password of your old server to authenticate.
4) This should show you each file being copied over.
5) Once complete, ensure that your webserver service (such as Apache or NGinx is online on your new server, and configured correctly. (See: [Login to see the link])
Restoring the Database
1) SSH into your old server (that you are migrating FROM)
2) In order to prevent unnecessary changes whilst migrating your server, I would recommend that you take your webserver offline.
You can do this by using (example for Apache) sudo service apache2 stop
3) Take a backup of your site’s SQL – in this case, the name of my database is called flarum
mysqldump -u root -p flarum > /home/katos/backup/flarum_20201228.sql
4) Confirm that your backup was taken successfully
ls -la /home/katos/backup

5) Now that the database backup has been taken, copy this to your new server using scp:
a. scp /home/katos/backup/flarum_20201228.sql cw_katos@192.168.1.10:/home/katos/backups
b. *Where cw_katos is your remote username, and 192.168.1.10 is your server IP address, and :/home/katos/backups is the location you wish to copy this file to on your remote server.
6) Verify that this file has been copied to your new server:

7) Now that the file is copied, we need to load this into MySQL
. You can do this by importing the backup file as follows:
a. Login to your MySQL command line:
mysql -u root -p “yourpassword”
b. First, clear the database if this already exists:
drop database flarum;
c. Next, (re)create the database:
create database flarum;
d. Now exit the console. (type exit
and hit enter)
e. Run the following command to import your backup:
mysql -u root -p flarum < /home/katos/backup/flarum_20201228.sql
f. This will begin the restoration of your database.
g. Once complete, verify the restore by running the following:
USE flarum;
SHOW tables;
8) Once verified, your database is now back loaded.
9) You can now configure your DNS settings to point to your new server IP address.