How to move an SMF forum to a new host or domain
Move Simple Machines Forum to a new host, folder or domain without losing posts: copy the files, move the database and update Settings.php.
On this page
Moving a self-hosted SMF forum means copying two things, the files and the database, and telling SMF where they now live. It works the same whether you’re moving to Traxio, away from Traxio, or to a new domain.
Prepare
- Put the old forum into maintenance mode (Admin › Configuration › Server Settings) so no posts are lost during the move.
- Take a full backup of files and database. Backing up SMF
Copy files and database
- Upload the forum’s files to the new account and extract them. Uploading and extracting a zip
- Create a database and user on the new account.
- Import the .sql backup with phpMyAdmin, or over SSH for large databases. Importing a large database
Update Settings.php
Edit Settings.php in the forum folder and update:
$boardurl: the new web address, with https and no trailing slash$db_name,$db_user,$db_passwdand$db_server(usuallylocalhost)$boarddir,$sourcedir,$cachedirand any other paths, to the new server’s folder
The free repair_settings.php tool from Simple Machines can detect and fix these paths, plus the theme and attachment URLs, for you. Upload it, run it in your browser, then delete it.
Switch the domain
When the forum works on the new host, point the domain at it. Connecting your domain to Traxio. To check the new copy first, preview it before changing DNS.
Check and reopen
- Log in, open a few boards and topics, and view an attachment.
- Check theme and avatar images load (if not, run repair_settings.php again).
- Register a test account to check email arrives.
- Turn maintenance mode off.
Moving from a hosted forum platform
Hosted forum services don’t usually give you a standard SMF database to import, so the steps above don’t apply. Communities moving from a hosted platform usually start fresh, copy key topics across by hand and invite members over. Hosted forum platforms compared
Will members need to re-register?
No. Members, passwords and posts are all in the database you moved.
Running SMF? SMF hosting is £0.99 a month, and our free SMF themes work on any host.
If it doesn’t work
These guides cover the most common problems, starting with what you can see. Or browse every fix for a common problem.
- 500 Internal Server Error: how to fix itFind the real cause of a 500 error: read the error log, then check .htaccess, PHP errors, permissions and PHP version in order.
- Database connection failedFix ‘Access denied for user’, ‘Unknown database’ and connection errors in PHP apps by checking prefixes, passwords, privileges and host.
- Can’t send email: how to fix outgoing mailFix email that won’t send from your app or phone: SMTP authentication, port and encryption mismatches, blocked networks and sending limits.
Spotted something out of date or unclear? Tell us and we’ll fix it.