Upgrading


Important: This page describes the process to upgrade to a major version (using the upgrade script). Some versions of MyBB do not require the use of the upgrade script (such as security vulnerability patches) but only require certain file changes. Please follow the instructions on the related announcement on the MyBBoard homepage for specific information. In any case, make sure to backup your files and database before upgrading.

Contents

[edit] Why should I upgrade my MyBB forum?

  • It is recommended that you upgrade to the latest version to enjoy the new features available. There are several other reasons for upgrading, two of which are to fix known security holes in MyBB and bugs that have been found and fixed.


[edit] Requirements for Upgrading


[edit] Preparing for an upgrade

  1. First step is to obtain MyBB.
  2. The second step is to shut down your forum. Doing this means no one will interrupt the upgrade process accidentally. You can do this by going to "Admin CP > Board Settings > Change > Board Online / Offline" and changing "Board Closed" to "Yes" (you may also wish to specify why it has been closed, although on certain versions of MyBB, your message may not be displayed properly because of a known bug). Alternatively, you may choose to make a .htaccess restriction on your MyBB folder so that no one can access the Front-End.
  3. And lastly, back up your files and database! With any upgrades, you should back up your files and database just in case something goes wrong, so you can restore the backup if need be. You can back up your database using the MyBB Admin CP, phpMyAdmin, or other MySQL database administration software (Database_Backup); you can back up your files by downloading them from the server via FTP.

[edit] Beginning the Upgrade

If upgrading to 1.4 or higher, skip steps #1 and #3. For more information on why you can do this, see below.

  1. If upgrading to 1.4 or higher, this step is no longer needed. Please proceed to the next step. Open your FTP and navigate to the forums inc/ folder. Download the following files to somewhere safe as you will need to re-upload them later!
    1. ./inc/settings.php
    2. ./inc/config.php
  2. Upload ALL of the files and folders in the "Upload" folder including the install folder, overwriting the existing copies (this contains the upgrade files also) to your forums root directory.
  3. For major version upgrades (e.g. 1.2.x --> 1.4.x) you will need to find updated versions of any additional non-English language packs you are using. It is recommended that you either upload new versions of the language packs, or remove the existing packs from the server.
  4. If upgrading to 1.4 or higher, this step is no longer needed. Please proceed to the next step. With your FTP client, navigate to the inc/ folder and replace the following files with the ones you previously downloaded in the first step of this section
    1. ./inc/settings.php
    2. ./inc/config.php
  5. CHMOD the following. CHMOD files to 666 (or 777, whatever suits your server) and directories to 777:
    1. ./inc/settings.php
    2. ./inc/config.php
    3. ./uploads/
    4. ./uploads/avatars/
    5. ./inc/languages (1.2 and later)
    6. ./admin/backups (1.2 and later)
    7. ./cache (1.4 and later)
    8. ./cache/themes (1.4 and later)
  6. Go to www.yourdomain.com/forumfolder/install/upgrade.php
  7. You will see a drop down list asking what version of MyBB you're upgrading from. Be sure you select the correct version you are currently using or else the upgrade will not work correctly or completely!
  8. Run the upgrade script, making sure you follow all instructions carefully.
  9. After the upgrade is complete, create a file called "lock" in the install folder or delete the "install" folder from your server. For extra protection, CHMOD ./inc/config.php to 755.
  10. Go to your forum homepage and make sure everything is working as it should and no evident errors in both the forum and Admin Panel exist.
  11. You may now wish to re-open your forum. You can do this by going to "Admin CP > Board Settings > Change > Board Online / Offline" and changing "Board Closed" to "No". If you wish to adjust the theme and templates of the forum before opening it, that is also fine!

[edit] Why do I no longer need to download my inc/config.php and inc/settings.php files in 1.4 and later?

In versions 1.4 and later, inc/config.php is no longer included by default - instead, config.default.php is included, which is then renamed to config.php during the install process. This means that when uploading all new files, your configuration file will not be replaced.

The inc/settings.php file included by default is blank; however, the settings file is automatically regenerated during the installation process anyway, based on the settings stored in your database. This is also why you should never directly edit your settings.php file, as it is regenerated every time you change your settings in the Admin CP.

[edit] Congratulations

  • If all went well, then congratulations. You have just performed an upgrade of your MyBB system.
  • If you require any assistance or the upgrade did not go well/at all, please feel free to get support at the MyBB community forums.
This page was last modified 20:10, 27 August 2008.