How to back up an SMF forum
Back up a Simple Machines Forum properly: the files and the database, how often, where to keep the copies, and how to restore them.
On this page
An SMF forum is two things: files (the software, themes, attachments and avatars) and a database (every member, post and setting). A backup needs both.
Back up the database
- In DirectAdmin, open phpMyAdmin. Using phpMyAdmin
- Select your forum’s database on the left (its name is in SMF’s
Settings.phpas$db_name). - Choose Export, keep the Quick method and SQL format, and select Go.
- Save the .sql file on your computer.
Back up the files
- In DirectAdmin’s File Manager, go to the folder SMF is installed in.
- Select the folder (or its contents) and compress it to a .zip.
- Download the .zip, then delete it from the server so it doesn’t use your space.
Or create a full account backup in DirectAdmin, which includes everything, and download it.
How often
- Before installing a package, changing themes or updating SMF.
- Regularly: weekly for a small forum, more often for a busy one.
- Keep several dated copies, not just the latest.
Where to keep backups
Off the server: your computer, a cloud drive, or both. A backup kept only in your hosting account doesn’t help if the account has a problem, and it uses your storage.
Traxio also takes daily offsite backups as a courtesy, but with no guarantee, so your own backups are your real safety net. How Traxio’s backups work
Restoring
- Upload and extract the files into the forum’s folder.
- In phpMyAdmin, select the database, choose Import, and upload the .sql file. Importing a database
- Check
Settings.phphas the right database name, user and password.
My database export is too big for phpMyAdmin. What now?
Use a full DirectAdmin backup instead, or see importing a large database.
Do I need to back up attachments?
Yes. Attachments and avatars are files in the attachments folder, not in the database.
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.