Upgrading MyBB Forum
Okay, so I’m mostly just putting this here because I hate having to look it up whenever I do an upgrade – which is infrequent enough that I inevitably have to look it up.
This is a post explaining in detail how to upgrade your MyBB Forum so if you really couldn’t be bothered with outdated crap like forums, DON’T click the Read More button! Otherwise, proceed at your own risk.
First of all, I got these instructions from HERE. (Which always takes me forever to find because I am an idiot and don’t have the foresight to Bookmark. Could it be a more obvious URL?)
1. First, you may want to shut down your forum. The best method is to use a .htaccess restriction on your forum’s root folder so that no one can access the front-end.
Here’s the .htaccess code that I use. I leave it in the root folder renamed something like “Maintenance.htaccess” so that it’s always easy to find.
# Maintenance
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_COOKIE} !mybbuser=1_aAbBcCdD //Your User authorization here!!
RewriteRule ^ 503.php [L]
I got this code from HERE. As he explains there, you use the cookie authorization code, so you need to use your browsers list of cookies to find that.
I rename my .htaccess to something like “Current.htaccess” then remove the “Maintenance” from the front of that file and it locks down the site to anyone except me.
2. This is a no brainer, you should back up your files and database and store them in a safe place.
3. Deactivate (or disable) all of your plugins.
4. Download the Correct Upgrade Package
There are two different methods of upgrading your forum: Full Upgrades and a Changed Files Upgrade. The best way to know which to use is to read the official blog post about the upgrade. It will tell you what you need to do and give you important information such as to whether you need to use the “Upgrade” script and if you need to deal with theme and language updates as well.
5. Beginning the Upgrade
Once you’ve downloaded the correct upgrade package for you, unzip it and follow these steps carefully.
a. Upload all of the files and folders inside the package (from inside the Upload/ folder if using the full package), including the install/ folder (if it exists), overwriting the existing copies of the files in your file system.
I use Filezilla, so it’s as simple as drag and drop. Drag the files and folders into your root directory, then choose the Overwrite option and check the box “Only for this queue.”
b. If the blog post says that the upgrade script is required, then do the following:
1. Open your forum’s home page in your web browser and add /install/ to the URL. (Erase index.php if it is there.)
2. It might ask you to remove a file called lock in this folder. Use an FTP Client or a File Manager to delete the install/lock file.
3. You should see a drop down list asking what version of MyBB you’re upgrading from. Select the correct version – the one you’re currently using – or else the upgrade will not work correctly.
4. Follow the instructions to run the upgrade.
5. After the upgrade has finished, check that the file called lock was created in the install/ folder. If it is missing, create it yourself or delete the install/ folder from your server.
6. For extra protection, chmod 644 inc/config.php.
6. If the blog post announcement mentions that there are theme changes, then perform the following:
a. Go to Admin CP > Templates & Style > Templates > Find Updated Templates. This will show you a list of all the templates that have changed during the upgrade.
b. You can either revert these templates to their default – meaning all the changes you’ve made to it will be removed – or you can see a Diff Report which will show you exactly what’s changed. If you have a custom theme installed, it is probably best that you look at the Diff Report and apply the changes you need.
7. If the blog post announcement mentions that there are language changes and you’ve either customized your English language pack (the default pack) or installed a custom language pack, then perform the following:
a. Check to see if the language pack you’re using has already been updated in the Translation Releases Forum. Download and install any updates you need.
Your upgrade should now be finished!
8. Remove the .htaccess block by renaming it and your original file. You might want to check your forum out before you do this to ensure that it’s working alright and looks the way it’s supposed to!
And just think, if you screwed something up, then you get to learn how to rebuild a forum from a backup, oh what fun!!! Well, actually it’s pretty easy if you just relax and follow the instructions. Hope it went as well for you as it did for me.