Recently I had to migrate a SMF Forum hosted on one domain to another. In this process the servers also changed as both the domains are hosted on different servers. Assume, abc.com/forum is the original site hosting the SMF forum and was migrated to xyz.com/forum
Where to start ? SMF Community has done a good job in documenting the migration process which you have to read it carefully.
Here is what I did,
- Download the entire site abc.com/forum using your FTP to your local drive. This does not back up your Database which you have to do it separately
- Backing up SMF Forum Database – SMF Documentation above suggests one to use phpMyAdmin for this purpose. Since my host didn’t provide phpMyAdmin, I backed the database from within the forum itself – Log in As Admin, go to Maintenance–>Forum Maintenance and you will see “Backtup Database”. Mark Save the table structure and Save the table data and hit on “Download” you should get a .SQL file.
- Setting up on new domain & server – On xyz.com, create a folder forum and upload all the files that you have previously downloaded.
- Restoring Database on New Server – You need to create a database of the same name as it was earlier. Your host will not likely let you create it. In that case repair_settings.php will come to your rescue. Download it and upload on to both your new and old server and you will know what changes to make [mostly path change settings] Import the SQL file into the Database. DELETE repair_settings.php file as soon as you are done with the migration because of SECURITY reasons as it contains your database login and password.
- By this time your forum should be working. However, the forum will be still configured to get images from abc.om.. so log in to the forum on xyz.com and under “Configuration” choose Current Theme and modify the Paths.
Once you are done with the migration, you need to do some SEO so that your old forum search engine rankings are passed on to the new one. Create or edit .htaccess file on abc.com and add
RedirectPermanent /forum http://www.xyz.com/forum
You cannot access your old forum by browser because of the .htaccess file as it will redirect to the new forum.