Upgrading Forum Version:Every so often phpBB will come out with another version of their forum software. When you log in to the Admin Panel, you might get a message that looks like...
It is often wise to upgrade in order to keep up with any security fixes that might be in the update. However, you must be very careful when updating not to wipe out any existing custom modifications that was make to your forum core code or templates. By upgrading you will be replacing the existing forum PHP and template files with the new versions. However, if there were modifications made to thos existing files, your upgrade would have overwritten them. It is customary of a developer performing an upgrade to make a file-by-file comparison of all files to determine if there was any existing modifications that had been made in your existing forum. If so, those modification are noted so that after an upgrade has been made those same modification can be put back in place. 1. First thing to do before you even think about doing an upgrade is to perform a full backup of the forums directory as well as the MySQL database as described in the Backup lesson. 2. You also want to disable the forum during the installation. 3. Download the latest version from http://www.phpbb.com/downloads.php.
There are essentially four upgrade paths: 1) full package upgrade, 2) Changed files only, 3) patch file, 4) the Code Change upgrade path. It is important to understand that when you upgrade a forum with new version files, there is a chance that the upgrade will overwrite or break any modification and customizations had been performed on the forums. For example, you or your developer may have made custom changes to the PHP files and templates. If you overwrite them with the new versions of these file, then the customization that was put in place will be lost. Hence an upgrade requires that code be "merged". This can be done essentially two ways, the developer may decide to overwrite his modifications with the new versions of the files and then put back in his modifications afterwards. Or he/she may compare what has changed in the two versions of the file and manually copy and paste in the changed code into the existing file. I mainly use the Code Change upgrade path or the Changed Files upgrade path. So these are the two that will be covered in this lesson. Code Change Upgrade PathThe code change upgrade path is nice is you are upgrading from to a minor version from just the previous minor version -- for example from 2.0.21 to 2.0.22. It is also nice if you have made a lot of modification to the existing forum. 4. After downloading the Code Change package, you will typically find two files. The first file is a script called update_to_latest.php in the install folder. This script will perform the database schema alterations for you. You need to upload the install folder to your forums directory. 5. Run the update_to_latest.php script by navigating to it via your browser.
6. When completed, delete the install directory from your webhost. This is for security reasons. Read any extra information that might be displayed. There may be extra instruction for you to go into the Admin Panel General Configuration settings to fill in some extra information. 7. The above script only performed modifications on your database. Now you need to manually make the code changes to your PHP files. The second file phpbb-2.021_to_2.0.22.txt for example, shows you what code changes you need to make to your existing PHP files.
8. That's it. Enable on the forum and you are done. Changed Files Only Upgrade PathIf you are jumping multiple versions, then you may not be able to use the above Code Change Method. Most of the time, I prefer to use the Changed Files Only route to perform the upgrade manually since I believe it is safer to make the code changes yourself. To do this, you want to download the Changed Files Only package, see what code has changed, and manually merge these new code and functionality into your existing code. And this is the method that is covered in this lesson. 4. After downloading and unziping the Changed Files Only package, you can look at the change logs to see what changes have been made from one version to another in order to determine if a upgrade is warranted. You will find the CHANGELOG.html file in docs folder of the zip package. It looks like ...
5. Inside the zip in the docs folder is the INSTALL.html in the
This describes in more detail the three upgrade paths. You should read this to determine which upgrade path is best for you and how each will affect the existing modification you have made on your forum. We are going with the Changed File Only method. After downloading the Changed Files Only package, you will find different zipped files inside.
Select the zip file that corresponds to what version you are upgrading from and to. After extracting that zip, you will notice that it does not contain the full set of files. It only contains the files that have changed from one specific version to another version.
Look through each of the files including the subfolders and use a file comparison tool to see how each of these files are different from the current file that are up on your webhost. Based on what customization and functionality have been made to the existing file up on your webhost, you have to merge in the necessary code from this new install files into the ones in your webhost. Inside the 2.0.21_to_2.0.22 folder, you will also see an install folder which contains a update_to_latest.php script to perform the database schema alteration. Similarly to the Code Change Upgrade Path method, copy the install folder to your webhost, run the necessary script, and delete the install folder. ModsMods are custom code that you can install on your forum. Some interesting mods that you can install are... Inline Ads in Forums What's Next?In the lessons to come, we will learn how to customize the look-and-feel of the forum to match your website.
|









