404 Tech Support

Upgrade tips for updating phpBB to 3.1.0

Yesterday, the popular forum software phpBB provided the final release of its 3.1.0 update. After six release candidates and install on phpbb.com, the software is now available for download with the build name Ascraeus.

There are many impressive features with phpBB 3.1.0. The default style is now responsive, scaling to mobile device better, and modifications are now extensions that don’t involve modifying core files. You can see these features from earlier when I wrote about the software in beta. My beta site was built starting from scratch. There were no legacy threads or old mods and the install went without a hitch. Working on upgrading the forum I run, the real world of upgrading from an existing 3.0.12 forum is a different story. As a result of my experience, here are some upgrade tips on how to make your upgrade successful and as smooth as possible.

Backup your files and database

Given that this upgrade significantly changes the underlying code of phpBB, it makes for a lot of changes. Particularly if you have modified or customized your forum, you will not regret the few minutes it takes to make an offline copy of the forum files and the database. I used FileZilla to download a copy of the files over SFTP from my server and phpMyAdmin to export a copy of the database. If anything goes wrong, I can delete everything off of the server and restore these backups in order to get everything back to its pre-upgrade functioning state.

Setup a test site

The amount of changes made me nervous enough that I wanted a practice run at upgrading my board before performing the update on the production server. I created a subdomain and copied the forum files into the subdomain. I created a second database and imported the backup database into it. Be sure you update your config.php file to point to the new database and not the production one. You’ll also need to hope into the database’s _config table and modify the server address to match your subdomain and possibly modify the HTTPS setting so it doesn’t keep redirecting you.

From the test site, you can practice all you want to get a hang of the upgrade process and see where things might need a little more elbow grease. I encountered enough problems that I had to back out and try the upgrade again on my test site. Given the timing, I was glad that the production side was up and running unaffected by my previous attempt.

Back to defaults

To make the migration easier, I recommend changing things back to their defaults before you do the upgrade. Set the language back to English, the theme back to prosilver, and any other settings that you might have customized back to their defaults. This can make the upgrade process and bringing up the updated forum a lot easier. It will squash a lot of bugs ahead of time and you can then make those changes after everything comes up again from within the Administration Control Panel.

Given the overhaul that 3.1.0 received, your custom themes and mods are going to have problems. You are better off disabling and even deleting the mods before you attempt any upgrades. The closer you can get to a vanilla install, the smoother your upgrade will go.

Copy files as binary

When restoring your backups, you’ll want to configure the transfer setting as binary within your FTP client. Otherwise, it might transfer them as ASCII files and then your images and other files might not be rendered properly. For faster transfers, you might use the file manager within cPanel or your hosting’s equivalent.

 Clear the cache

While you are testing things out on your test site and post upgrade on your production site, be sure to clear the cache. If you’re using file caching (configured through the config.php), delete everything but your .htaccess file under the cache folder. After that, do a reload in your browser. This will ensure all of the latest files are being used to render your forum and you don’t start working on some phantom bug that doesn’t really exist because the cache merged files from before and after the upgrade.

Migrate what matters

You might consider doing a fresh install and only importing the database entries that matter post-upgrade. Grab your posts, files, users, and other important tables but let the others remain at the pristine fresh install point. Depending on how heavily modified your board is, this might be less work but still keep your important content while dropping all of the junk that accumulated with previous versions.