Toggle navigation

Simple Machines Forum Image Guide

Version 2.1

Websoft9 Simple Machines Forum is a pre-configured, ready to run image for running Simple Machines Forum on Alibaba Cloud.

Simple Machines Forum — SMF in short — is a free, professional grade software package that allows you to set up your own online community within minutes.Its powerful custom made template engine puts you in full control of the layout of your message board and with our unique SSI – or Server Side Includes – function you can let your forum and your website interact with each other.


Software Version: Simple Machines Forum 2.1
Software directory: /data/wwwroot/default/smf

Basic software environment: LAMP
PHP Configuration File: /usr/local/php/etc/php.ini
Virtual host Configuration File directory: /usr/local/apache/conf/vhost
Virtual host Configuration Command: /root/oneinstack/

Database install directory: /usr/local/mysql
Database data directory: /data/mysql
Database Configuration File: /etc/my.cnf

This Image use MySQL for database

#default user/password:root/123456

MySQL User Guide: Click here

After the installation of Image,please verify it

  • Login on Alibaba Cloud console,get you Internet IP Address
  • Open you Chrome or Firefox on your local PC,visit the http://Internet IP Address/
  • If verify successfully,you can enter the boot page of Websoft9 below
  • If no response from browser,please check the Security Group settings to ensure that port 80 is been allowed

Step1. Create a database

1.login in MySQL:

Method 1:Use following URL to open phpMyAdmin page: http://< Public net IP >/phpMyAdmin

Method 2:Use SSH command to login in.

mysql -uroot –p                                #enter mysql console

 #default user/password:root/123456            More MySQL User Guide: Click here


2.create a database:

MySQL [(none)]> create database mydbname;

MySQL [(none)]> show databases;


3.Create a Database User and grants permissions to the User:

MySQL [(none)]> grant all privileges on mydbname.* to username@'localhost' identified by 'userpassword';

MySQL [(none)]> flush privileges;

MySQL [(none)]> exit;


Step2. Add a virtual host

Use SSH Command to Add a virtual host:
[root@iZbp1i4rjdsy216yq7lgucZ ~]# cd /root/oneinstack
[root@iZbp1i4rjdsy216yq7lgucZ oneinstack]# ./

Step3. Install SMF

Open your domain name via browser:
1. Click “Continue”;

2. Enter your database configuration, Click “Continue”;

3. Set your Forum configuration, Click “Continue”;

4. Set your administrator account, Click “Continue”;

5. Congratulations, the installation process is complete! Now you can see your newly installed forum and begin to use it.

6. This is your newly installed forum:

It is essential to back up your forum. If your database gets corrupted you will lose everything. Having a backup means that you have a previous version of your database to fall back on should your forum be hacked, or should you make changes to it which you subsequently wish to revert.

SMF’s Admin section has a built-in database backup function. Do not use it! It does work in some cases, but not in others, so it should not be used, unless you have no other way to acquire the backup of the database.

  1. Backing up your Database with phpMyAdmin,login in phpMyAdmin as root,find you database,On the next page, find “View dump (schema) of database”, and you will see “Export”,Just below that, click “Select all”.At the bottom of the page, ensure that “Save as file” is checked.Finally, click “Go”.
  2. Download all you files and folder of SMF using FTP,smf root folder like /data/wwwroot/default/smf

To restore your backed-up database, you do exactly the same as to back up, except that instead of clicking “Export”, you click “Import”. You then navigate to your backup file by clicking “Choose” under “Location of the text file”.

Please be aware that if you have large databases, it may be not possible to back up using phpMyAdmin, as phpMyAdmin has some file size limits.


Updating is the same with Patching in SMF,it  is moving from an earlier version of SMF to the next version in the same series (e.g. from 2.0 to 2.0.1). If you are moving up more than one version in the same series, (e.g. 1.1.10 to 1.1.13) you must repeat patching for each version update.

If patching reports errors or if you need to move to a newer major version of SMF then you should use the Upgrading procedure. If you want to install a Forum from scratch, please see the instructions on Installing SMF.

  1. Go to the downloads page for patches on the SMF website and download the patch you need.
  2. Once you have downloaded the patch to your computer, go to: Administration > Main > Package manager > Download Packages and upload the patch.
  3. Click the link Install Mod.
  4. On the next page you will be notified of any problems. If no errors are reported, selecting the button “Install Now” will start the actual patching procedure. Once finished you will be informed that the package has been installed successfully.

will wipe out any existing SMF data, but it will not change the forum you are converting from.

If you run into problems, you can get start a topic on the Converting to SMF board at SMF’s official support. Converting to SMF from almost any forum software can be done in five fast and simple steps.

Upgrading is moving to a more recent version of SMF by getting a fresh set of all necessary files. It is necessary when moving from an earlier major version to a more recent one (SMF 1.1.x to SMF 2.0.x, for example). If you want a clean start with the same version you have now, take a look at How to upload a fresh set of files.

If you are moving from an older version of SMF (for example 1.1.1) to a newer version in the same series (for example 1.1.2) and you want to avoid uninstalling your mods, you may consider patching. If you want to install a forum from scratch, please see the instructions on installing SMF.

Upgrading an SMF forum can be done in six quick and simple steps:

  1. Download the latest SMF large upgrade package on the “Download” page of our SMF
  2. Upload The SMF upgrade archive to the same location where the current forum is located, and overwrite all of the existing files with new files.
  3. Set File and Directory Permissions(How to modify the allowed limit for upload?)
  4. The final step in upgrading SMF, is to run the upgrading tool. Navigate with your browser to the upgrade.php file (it can be found in the directory where SMF is located) and run the upgrade, for example:

More about upgrading


SMF supports multiple languages, offering language packs available for download, which are located on the Languages Packs page of the SMF Downloads section. Just locate the language that you want to include on your forum and tick the box. You will notice that there are two packages which you can download for each language. One of them includes -utf8 at the end of the package name. This is the UTF-8 version of the language pack. Note that while this version, in many cases, works best for many languages, it should only be used if your forum is using the UTF-8 character set. Go to Admin > Forum Maintenance > Routine and check Convert the database and data to UTF-8 to see whether you are using the UTF-8 character set.

Installing a New Language Pack

Administrators using SMF 2.0.x can install a new language directly from the administration panel in Admin > Configuration > Languages > Add Languages.

Once you have selected and downloaded the language that you want to install, extract the content somewhere on your computer, and then upload the contents via an FTP program, so that the actual language files (for example: index.languagename.php) are located in /Themes/default/languages.

ote: You do not need to create another directory within the languages one. Just upload the Themes directory included in the language package as the parent directory over the existing Themes directory, located in the root directory of your forum. This will not overwrite any existing theme or language files, but will add the extra files that were not previously there, in this case the new language files.

Assuming that you have activated Enable user-selectable language support in Admin > Configuration > Languages > Settings, users should now be able to select this language in their profile, on the Profile features > Account Settings page. Also, administrators should now be able to make this the default language if desired by going to Admin > Configuration > Languages > Settings and selecting it in the Default Forum Language dropdown box.

Creating Your Own Language

If the Language Packs page does not contain the language you are looking for, there might still be a translation in progress for your language. In order to find out if there is anyone already working on the language you want, you can contact the SMF Localization Team via You can also ask to become a member of the official translation team and gain access to the online translation system.

If you want to start translating by manually editing the actual php files, first notice how the language system works. The English language resides in the /Themes/default/languages directory of your forum directory, which is the default language used by SMF. The contents of that directory are basically the text strings you see all over the forum. For simplicity, they have been divided into many files, representing the section or sections where they are used.

To know which file is related to which section, check the filename. It is composed according to the template [Section].[language].php. So Login.english.php contains all texts needed for the login function in your forum: the first part (Login) defines the section and the second part (english) defines the language used in that file. Note that the most important file is index.english.php. This file contains some of the most frequently used language strings which appear in more than one section or in the forum header or footer.

How to Make a New Language

Simply open the files mentioned above one by one in any code editor, such as Notepad++, Context, or PhpEdit, and translate the strings in them. For example:

$txt[637] = 'with ' . $context['forum_name'] . '.';
$txt['invalid_activation_retry'] = 'Activation code';

In the first one you only need to translate “with” and leave the rest as it is; in the second one you need to translate “Activation code”. After you have finished, save your file like this: Login.(name of the language).php (i.e. Login.arabic.php).

Note: it is very important to look at the comments in the language files as they contain very important information about the rules for translating the strings properly.

The Manage and Install page is the default page loaded in the Themes and Layout section of the Administration Center. Here you can select whether the SMF default theme can be chosen, which Theme guests will use, as well as other options. The following are all the options shown on this page:

This section provides three ways to install a new theme.

  • From a file — a theme archive file, such as can be found on the Simple Machines Theme Site
    1. Find a theme archive file in the Simple Machines Theme Site and download the file to your desktop. Be certain that this theme is compatible with your version of SMF. The version is also listed on the page where you downloaded the theme. Themes for 1.1.* will not work on 2.0.* and 2.0.* themes will not work on 1.1.*.
    2. Click the “Browse” button to the right of the “from a file” label.
    3. From the pop-up, navigate to the theme file (still compressed as a .zip or .tar.gz file) on your computer.
    4. Click Install and confirm if you want to install the theme in the popup
    5. Installation will take a few seconds. If all goes well, the installer will tell you that the theme “… was installed successfully.”
    6. From your profile, select the theme, to test it.
    7. If you have any difficulties with the theme, switch back to the SMF default theme by using theme=1 in your query string (example:

  • From a directory on the server — If the files are not packed into an archive
    1. Make sure the files are already arranged in directories, just as SMF expects to find them. Keeping them in subdirectories of your forum’s Themes/ directory will make them easiest to keep track of
    2. Be certain that these theme files are compatible with your version of SMF, and that they include a file called theme_info.xml (for more on theme_info.xml, please read Packaging a Theme). The version is also listed on the page where you downloaded the theme. Themes for 1.1.* will not work on 2.0.* and 2.0.* themes will not work on 1.1.*.
    3. Select the “Install” button.

  • Create a copy of Default named — To create a new copy you can customize yourself
    1. In the input box, enter a name for your new theme.
    2. Select the “Install” button.

Modify the  /usr/local/php/etc/php.ini file to increase the allowed size for uploads:

; Maximum size of POST data that PHP will accept.
post_max_size = 16M
; Maximum allowed size for uploaded files.
upload_max_filesize = 16M

then,restart the apache

# service httpd restart


When install new extension from back-end it will not successful,may be the permissions of file and folder is not appropriate,you should change it

Web site root permissions to follow:
file 644, folder 755 ,Permissions Users and groups www
If there is a file permissions problem, execute the following three commands:

chown -R www.www /data/wwwroot/default/smf
find /data/wwwroot/default/smf -type d -exec chmod 755 {} \;
find /data/wwwroot/default/smf -type f -exec chmod 644 {} \;

The PHP configuration file allows you to configure the modules enabled, the email settings or the size of the upload files. It is located at /usr/local/php/etc/php.ini.

There are some PHP settings that need to be sufficient for SMF to install.

The values for PHP.ini below are suggested values only.

  • memory_limit – Minimum: 64M Recommended: 128M or better
  • upload_max_filesize – Minimum: 20M
  • post_max_size – Minimum: 20M
  • max_execution_time: At Least 120 Recommended: 300

After modifying the PHP configuration file, restart both Apache and PHP-FPM for the changes to take effect:

# service httpd restart


If you receive the message “Maximum execution time of 30 seconds exceeded”.You may also like to extend the max_execution_time for PHP and you can modify it by two methods below

Method one: edit your  /usr/local/php/etc/php.ini

; Maximum execution time of each script, in seconds
; Note: This directive is hardcoded to 0 for the CLI SAPI
max_execution_time = 90
; Maximum amount of time each script may spend parsing request data. It's a good
; idea to limit this time on productions servers in order to eliminate unexpectedly
; long running scripts.

Method two: edit your .htaccess:

<IfModule mod_php5.c>
php_value max_execution_time 90

Websoft9 Joomla Image have installed the phpMyadmin

phpMyAdmin install directory: /data/wwwroot/default/phpMyAdmin


Following is the step for access phpMyadmin

  1. Open Chrome or Firefox on your local PC
  2. visit the http://Internet IP Address/phpMyAdmin,you can enter the login page
  3. select you language,Username:root,Password:123456
  4. Click the button “Go”


Following is the step for access phpMyadmin

  1. User Remote Desktop Connection of Window to connect to you ECS
  2. Install a Chrome or Firefox browser on you ECS
  3. Open Chrome or Firefox on your ECS
  4. visit the http://Internet IP Address/phpMyAdmin,you can enter the login page
  5. select you language,Username:root,Password:123456
  6. Click the button “Go”

For security, it is recommended that you change the default administrator password as soon as possible. Follow the steps below:

  1. Log in to the application as an administrator.
  2. Select the “Profile -> Account Settings” menu item.
  3. Enter your new password in the “Choose password” and “Verify password” fields, and your old password in the “Current password” field.
  4. Click “Change profile” to save your changes.

If you have not remeber you password,how to reset it?follow these instructions:

  1. Use phpMyAdmin (or similar) to locate (within the “_members” table) the member whose password is to be reset.
  2. In the database field entitled “passwd”, enter a new password using plain text.
  3. Clear out (erase) any existing content in the database field entitled “password_salt”.

The next time the member logs in (using the new password), SMF will automatically re-encrypt the user’s credentials.

Spam – my forum is flooded with spam, what can I do?

Default Spam Prevention

SMF, by default, offers three tools to help you keeping spammers out of your forum:

  1. Account Activation – Administrators can decide to either ask their new members to visit an activation link sent to a newly registered member by email or to put all the newly registered members in the approval queue, and then personally activate only the non-spammer accounts.
  2. The Captcha – Administrators can set a verification code (also known as a ‘captcha’) that users have to decipher in order to be able to proceed with the registration.
  3. Verification Questions – Administrators can introduce a number of custom questions and answers. Users that are registering have to answer correctly to allow registration.

The first measure is available through the Administration Center: Admin > Registration > Settings.

Here you can enable several different methods of registration employed for new members, as you can see in the first drop down.

The second and the third can be configured in the Administration Center: Admin > Security and Moderation > Anti-Spam.

The level of complexity for a verification code can be set from none (no verification code displayed) to extreme (the letters are extremely distorted and it should be very difficult to decipher for the automated spammers). Be aware that the CAPTCHA has been broken for many years and causes real users more of a headache than the spammers.

There is the box used to configure verification questions. Usually this is the most efficient anti-spam method provided by SMF due to its forum specific nature. There are a few things to note about this method to increase its efficiency:

  • Automated registration bots are usually quite good at mathematics, so avoid using questions like: what’s the result of 2+2?
  • International audiences may not understand local slang or terminology, so ensure that questions do not alienate potential members and the member base.
  • The system is not case sensitive, so questions requiring upper case answers will still be accepted if lower case is typed.

Be sure to put in the number of verification questions a user must answer under the configure verification methods category above the verification questions.

From the Administration Center it is possible to set as many questions you wish, and also the number of questions that each user will be asked to answer during the registration. If you configure ten questions and then set to show two in the registration page, SMF will show two random questions from the ten configured each time a new member tries to register. Having a good bank of questions will stop automated bots from building a set of “known answers”.

Mods to Prevent Spam

One of the most important SMF features is its ability to be modified, and at the mod site there is an entire category dedicated to Spam Prevention mods.

Some examples of very clever anti-spam mods that have been created by our community are (in alphabetical order):