Upgrading

From Online Manual

Jump to: navigation, search

Upgrading is moving from any earlier version of SMF to a more recent version or moving from an earlier version with mods installed. If you are moving from the previous version of SMF to a more recent version and you don't have any mod installed then you may consider Updating or Patching. If you want to install a Forum from scratch, please see the instructions on Installing SMF. If you want to convert to SMF from another Forum software, please see the instructions for Converting to SMF.

Upgrading an SMF forum is easy! It can be done in six quick and simple steps:

Contents

Download the Upgrade Archive

The latest SMF upgrade package can be found on the "Download" page of our website.

First, you should download the appropriate package, the Large upgrade is the one required for upgrading. Most of the time, .zip files are the preferred download type by forum administrators. Most operating systems have the tools available to extract .zip archives already installed.

Backup your forum

Before starting the upgrade process, a backup of the live forum should be taken. This protects the forum from accidental damage and any issues from upgrading. Although all steps are taken, and extensive testing carried out, sometimes issues develop. Therefore, having a backup is crucial. The upgrading tool can backup all database tables before it runs, but the files are not backed up and however the best practice is to have a full backup available.

For more details on backing up your forum, please see the page backup.

Backup your files

Using an ftp client access your forum directory and download all the files and directories present in there.

Back up the Database

Back up a database using SMF

From SMF, navigate to Forum Maintenance (Administration Center > Maintenance > Forum Maintenance). On the database section, save the data and the structure. Then, compress the file. Select "Download" and wait for the database to complete the download completely. Note: It is recommended if you use this method to verify that the backup is complete by opening the file and checking the last line. If the file is not complete and has an error please try one of the other methods to backup your database.

Back up a database using PHPMyAdmin

PHPMyAdmin gives the option to export a database, from the initial page, select the "Export" option and follow the instructions. Select your SMF database. These are different based on host.

Back up a database using a control panel

If your hosting service provides a control panel interface, this can be used to back up a database. Selecting the "Backups" or "Backups Wizard" options should take you to a page, prompting you to back up your database. With different hosts, these options may have different titles.

Extract and Upload the Upgrade Archive

Once the upgrade archive has been downloaded, all the files in it will need to be copied to the correct places on your site, before the upgrader can be executed. Wherever the files are located on the server -- that's where your forum will be located.

There are two methods for this step. You can choose between Extracting before Uploading' and Uploading before Extracting. The choice will depend on the tools you have, and what you feel comfortable with.

You will need to use either FTP (in binary mode How do I use FTP ) or the tools in in your hosting account's control panel (for more information on the control panel supplied by your hosting service, please see the documentation provided by your hosting service)

The extracted files from the large upgrade pack must be uploaded to the same directory where the forum is already located, such as /forum/, so that all the files will overwrite the corresponding previous version on the server.

Extracting Before Uploading

This is the way most people do it. It's easy, but can take longer. First, extract the archive -- usually by right-clicking the archive and selecting the "Extract All" option. A new folder should be created, with all the files and directories in the correct places, when the upgrade archive is extracted. Second, set your FTP client for binary transfer, select all the files and folders and copy them to the directory where you want to locate your forum.

Uploading Before Extracting

Some control panels, such as cPanel, give the ability to extract an archive right on the server. This can be a quicker than waiting for all the extracted files to copy via FTP. First, upload the file via your account's control panel. Second, select the extract option to extract the archive to the desired location -- the directory where you want your forum to be located.

Set File/Folder Permissions

After the upgrade archive has been uploaded and extracted, you need to set the files' permissions. This is commonly done by use of the Unix utility CHMOD. The correct CHMOD value for SMF folders is either 777, 775 or 755, and 666 or 644 usually for files, depending on your hosting service. There are two methods for this step, the method used depends on the hosting service that you use.

Setting File Permissions With the Upgrader

The SMF upgrader can set file permissions simply and easily. Navigating to the directory where SMF is located should redirect you to the upgrade.php file and prompt the upgrader. For example: www.yourdomain.com/forum/upgrade.php. If the upgrader detects files that need their permissions adjusted it will prompt for FTP details so it can CHMOD the files it requires for the upgrade. This may not work on some servers.

Setting File Permissions With FTP

Using a control panel or FTP client, file permissions can be changed quickly and easily. Usually, FTP programs will allow permissions to be changed by right-clicking files/directories and selecting "Properties", "Attributes" or "Permissions". The desired numerical value can be entered, or if provided, check boxes can be changed.

The following files and directories must be writable. Depending on how your server is set up, this could mean that they must have CHMOD values of 644, 664 or 666 for files, and 755, 775 or 777 for folders:

  • /attachments
  • /avatars
  • /Packages
  • /Packages/installed.list
  • /Smileys
  • /Themes
  • /Themes/default/languages/Install.english.php
  • agreement.txt
  • Settings.php
  • Settings_bak.php
  • upgrade.php

If the permission on your files or folders does not make them writable, the SMF installer will report the problem. In that case, use your FTP client or host panel to reset the permissions for the files or folders the installer reports.

Run the Upgrading Tool

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. In example: www.yourdomain.com/forum/upgrade.php.

Upgrade Settings

Backup database with the prefix "backup_"
Selecting this option will get the upgrade tool to copy all data in the database before upgrading within the original database.
Maintenance Mode
Selecting this option will place the forum into maintenance mode while upgrading rather than showing errors, this is highly recommended.
Output extra debugging information.
The upgrade tool can give detailed information while performing an upgrade by selecting this option, it will aid the support team to solve any errors if they occur while upgrading.

Finishing the Update Process

Once all parts of the update have completed, check the box to remove the upgrade files from the server. If this does not work, they will need to be deleted via FTP. All upgrade files should be removed from the server once the upgrade process is complete. These files are upgrade.php and the .sql files whose name starts with 'upgrade'. They are a major security risk if they are left on a server unattended. Once SMF has been upgraded, they are no longer needed.


Useful FAQ