Discussion Forums with SMF

Updated by Elle Krout

Contribute on GitHub

View Project | View File | Edit File

Simple Machines Forum (SMF) is a popular forum solution for small- to large-sized communities that offers a variety of features. With its modular design and flexibility, users can create their own plugins to modify the behavior of SMF in any way they wish.

Before you begin, be sure you have followed the steps outlined in the Getting Started Guide. You will also need a working LAMP stack.

This guide is written for a non-root user. Commands that require elevated privileges are prefixed with sudo. If you’re not familiar with the sudo command, you can check our Users and Groups guide.


You will need to create a MySQL user and database for SMF.

  1. Login to the MySQL server as root:

    mysql -u root -p
  2. Create a user and database, with forums being the database name, forumadmin being the username, and taking care to change the password in the example below:

    create databate forums;
    grant all on forums.* to 'forumadmin' identified by 'password';

Installing SMF

The following instructions will download the latest stable release, which is 2.0.9 as of publication.

If you’re using a web server other than Apache, or otherwise have an alternate system user for your web server, be sure to replace www-data in the commands below with the appropriate system user.

  1. Navigate to the document root (typically similar to /var/www/example.com/public_html) and create a directory for the forums:

    sudo chown -R www-data:www-data /var/www
    sudo -u www-data mkdir forums
    cd forums/

    If you would like to install SMF to your website’s homepage, install it in the document root. If you would like the URL to be something other than /forums amend the above instructions as necessary.

  2. Download and extract the package:

    sudo -u www-data wget http://download.simplemachines.org/index.php/latest/install -O smf_latest_install.tar.gz
    sudo -u www-data tar -zxvf smf_latest_install.tar.gz
  3. Follow the instructions on the web interface to finish the installation; then, in your terminal, remove the installation script:

    sudo rm install.php

Your SMF installation is now complete! In order to maintain the integrity of your system, please update your forums as needed.

More Information

You may wish to consult the following resources for additional information on this topic. While these are provided in the hope that they will be useful, please note that we cannot vouch for the accuracy or timeliness of externally hosted materials.

This guide is published under a CC BY-ND 4.0 license.