---
name: Simple Machines Forum (SMF)
description: Free, professional-grade forum software for building online communities. PHP + MySQL/PostgreSQL. BSD-3-Clause licensed.
website: https://www.simplemachines.org/
source: https://github.com/SimpleMachines/SMF
license: BSD-3-Clause
stars: 718
tags:
  - forum
  - community
  - discussion
  - php
platforms:
  - PHP
---

# Simple Machines Forum (SMF)

SMF is a free, professional-grade forum platform for building online communities. It's been around since 2003 and supports boards, topics, private messages, polls, user groups, moderation tools, themes, and a large mod ecosystem. Current major versions: SMF 2.1.x (stable) and SMF 3.0 (in development).

Official site: https://www.simplemachines.org/  
Source: https://github.com/SimpleMachines/SMF  
Downloads: https://download.simplemachines.org/  
Wiki: https://wiki.simplemachines.org/smf/  
Latest stable: SMF 2.1.4

## Compatible Combos

| Infra | Runtime | Notes |
|-------|---------|-------|
| Any Linux VM / VPS | PHP 7.4+ + MySQL/MariaDB + Nginx/Apache | Recommended |
| Any Linux VM / VPS | PHP 7.4+ + PostgreSQL | Supported |
| Shared hosting | PHP 7.4+ + MySQL | Works on standard LAMP hosts |

## Inputs to Collect

**Phase: Planning**
- Domain/hostname
- Database type: MySQL/MariaDB or PostgreSQL
- Database credentials (host, name, user, password)
- PHP version (7.4+ required; 8.x recommended)
- Forum name and admin email

**Phase: First Boot**
- Admin username and password (set during install wizard)
- Forum language and character set

## Software-Layer Concerns

**Install from official release (recommended):**
```bash
# Download from https://download.simplemachines.org/
wget https://download.simplemachines.org/smf_2-1-4_install.tar.gz
tar -xzf smf_2-1-4_install.tar.gz -C /var/www/html/forum/

# Set permissions
chown -R www-data:www-data /var/www/html/forum/
chmod 777 /var/www/html/forum/attachments/
chmod 777 /var/www/html/forum/avatars/
chmod 777 /var/www/html/forum/cache/
chmod 777 /var/www/html/forum/Smileys/
chmod 777 /var/www/html/forum/Themes/

# Open http://yoursite.com/forum/install.php
```

**Install from source (development):**
```bash
git clone https://github.com/SimpleMachines/SMF /var/www/html/forum
cd /var/www/html/forum
composer install
# Open install.php in browser
```

**PHP requirements:**
- PHP 7.4+ (8.1+ recommended for SMF 2.1.x)
- Extensions: pdo_mysql or pdo_pgsql, gd, curl, json, mbstring, zlib

**Nginx config:**
```nginx
server {
    listen 80;
    server_name forum.example.com;
    root /var/www/html/forum;
    index index.php index.html;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }
    location ~ \.php$ {
        fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }
    # Protect sensitive files
    location ~* /Settings\.php { deny all; }
}
```

**Key config file:** `Settings.php` (auto-generated by install wizard)

**Data paths:**
- Config: `Settings.php`
- Attachments: `attachments/`
- Avatars: `avatars/`
- Cache: `cache/`
- Themes: `Themes/`

**Delete install files after setup:**
```bash
rm /var/www/html/forum/install.php
rm /var/www/html/forum/upgrade.php  # after upgrades
```

## Upgrade Procedure

1. Back up database and `attachments/`, `avatars/`, custom `Themes/`
2. Download new release package from https://download.simplemachines.org/
3. Overwrite files (preserve `Settings.php` and custom themes)
4. Run `upgrade.php` in browser: `http://yoursite.com/forum/upgrade.php`
5. Delete `upgrade.php` after completion
6. Full upgrade guide: https://wiki.simplemachines.org/smf/Upgrading

## Gotchas

- **Delete install/upgrade scripts**: Always remove `install.php` and `upgrade.php` after use — they are a security risk if left in place
- **Permission setup**: Several directories need write permissions (777 or www-data ownership) — the install wizard will flag any missing permissions
- **SMF 3.0**: The 3.0 branch is in active development with significant changes; use 2.1.x for production stability
- **Mod ecosystem**: Large mod library at https://custom.simplemachines.org/ — quality and PHP 8.x compatibility varies
- **Cache directory**: Enable caching (file-based or Memcache) for high-traffic forums — configured in Admin → Server Settings → Caching
- **UTF-8**: SMF 2.1+ uses UTF-8 by default; older installations may need charset conversion when upgrading from SMF 2.0

## Links

- Upstream README: https://github.com/SimpleMachines/SMF/blob/master/README.md
- Install guide: https://wiki.simplemachines.org/smf/Installing
- Upgrade guide: https://wiki.simplemachines.org/smf/Upgrading
- Downloads: https://download.simplemachines.org/
- Mod/theme directory: https://custom.simplemachines.org/
- Wiki: https://wiki.simplemachines.org/smf/
