Composr Tutorial: Performing an upgrade
Written by Chris Graham (ocProducts)This tutorial will give background information for this process of upgrading Composr. The Composr upgrader does step you through the process, but further information will be given here so that you may gain a further understanding.
Types of upgradeWhen the developers make a release they will state whether they recommend users upgrade to it. If they have corrected a security issue, or a major bug (such as one that causes data loss), they are likely to strongly recommend upgrade. You can see the fixes included in a release by looking at the bugs database for the release before it.
Upgrades may be roughly categorised under:
- patch releases – these are likely to involve bug fixes, with very few, if any new features. Any new features would have been implemented solely to provide important functionality that was obviously missing. Patch releases are very easy to upgrade to
- or, feature releases – these are likely to include many new features; the quantity of new features will depend on the difference in version numbers between releases. Minor releases are usually easy to upgrade to
- or, major releases – these are likely to involve many architectural changes, as well as new features; major releases are less common, as they need to perform additional testing for them which takes a long length of time – they therefore try to avoid architectural changes other than in large batches
Some words of cautionThe developers cannot make any guarantees about the speed of which any new bugs might be patched, for any upgrade. It is your own responsibility to make and test a full website backup (files and database) before you upgrade, for use in the unlikely event of you wanting to revert your upgrade.
Some users may wish to test upgrades (and pre-fix any theme compatibility problems that could occur) on a staging site (a private mirror of their live site).
Special note: multi-site-networksIf you are using Conversr on a M.S.N. and upgrading to a new major release then you will need to upgrade all the sites together, starting with the one that hosts the forums.
Special note: upgrading third-party forumsIf you are using a third-party forum and upgrading that software, be sure to check that the Composr forum driver you are using is compatible with the new version. This is usually only an issue with major new releases of third-party software. If you need a new/upgraded forum driver, professional developers are available for such work.
Things to check in feature/major releasesBe aware that a number of things can change significantly across releases. Make sure you have a good understanding of how the following things may affect you, before making 'the jump':
- Template and CSS structure could change considerably. Files may be renamed, reorganised internally, or things may just be completely rearchitected.
- Occasionally features may be deprecated.
- New features will be added, and that could possibly interfere with highly tuned layouts or site flows.
- Minimum requirements may have changed, for example a newer version of PHP may be required as a baseline.
- Non-bundled addons may no longer function.
The upgrade process
- get to the upgrader, either via the upgrade link from the top-right of the Admin Zone dashboard, or going to http://yourbaseurl/upgrader.php
- log in to the upgrader using your master password (the one you set when you installed, different to your admin login)
- taking a full backup (just in case a problem occurs) – better safe than sorry. This is also useful in case you overwrite files that you have edited: either due to these files being in locations with no override support, or due to changes being made without using the proper override mechanism
- closing your website
- the upgrader will make it easy for you to close your site using the Composr closed-site feature
- however, for non-patch upgrades your website may return errors until the full upgrade process is complete, so you may wish to place your own closed.html file on the server that shows a standalone closed-site screen. Composr will redirect to that file for all page requests for as long as it exists on your server (so it does not need to load its database or templating system)
- transferring new/updated files (this will copy your customised upgrade file between http://compo.sr and your server, and then extract it)
- if your server's connection to the http://compo.sr server is slow, you could download the TAR file yourself, upload it to your own server, and then use that copy's URL in step 3
- on modern server environments the extraction happens in a separated framed process, so that if timeouts occur it can't leave your website in an inconsistent state
- if in the unlikely event that you do end up with an inconsistent state then you can download the TAR file yourself, extract it manually, and then continue; this is not ideal but the file integrity check should help remove files from uninstalled bundled addons that don't belong
- resolve file integrity issues
- if you have made any Composr overrides in place you may need to change these overrides to be consistent with Composr's latest structure; or if the overrides came from addons, you may need to overwrite the addon(s) with a newer version
- the above guidance applies to totally new code also, such as new modules from non-bundled addons
- resolving any conflicts with templates, as necessary (for example, if there was a change in the verbatim version of a template, and the upgraded website had also changed that template, then changes might [depending on importance] need to be incorporated manually
- removing any files from previous versions of Composr that are no longer required
- removing any files relating to bundled addons that you have previously uninstalled
- upgrading your database; this is the most key step, which upgrades all modules and blocks, as well as doing some cross-system updates, and updating Conversr – if any errors happen they'll be displayed and you should note them down and report them, but Composr will generally try and continue anyway if there are minor errors happening
- performing an automatic theme upgrade (if available for the version jump you're doing)
- clearing caches
- re-opening your website
AssistanceUpgrading is inherently complex, as it is close to programming in the sense that low-level changes are being made to the structure of the website. This is unfortunate but inevitable, and due to Composr's openly configurable and overridable (at the code level) nature, the developers would have an extremely hard time trying to automate the process beyond what the upgrade system (the stage launched by running http://yourbaseurl/upgrader.php) already does.
If you require assistance for an upgrade, professional developers may be able to help.
The integrity checker
Composr comes with a built-in "integrity checker" which can be used to repair a corrupted copy of Composr. Integrity checker is a part of the upgrader tool. The integrity checker can be used to find outdated and corrupt files in the Composr system. You can use this tool at any point, regardless of whether you have recently upgraded or not.
You must provide the master password to access the Composr upgrade tool.
The integrity checker is placed in the "Step 4" of the table under the "Upgrade steps" section in upgrader tools page.
The integrity checker will display the following kinds of file (if any):
- Files that are actually missing and need uploading
- Newer or modified files
- Alien files (unrecognised files)
If you want to prove to yourself how it works, create a random php file named testfile.php in the sources directory of Composr and run the integrity checker again. Now it will list the new testfile.php file in the results.
This is very useful for upgrading because it helps identify old files that need removing. Generally though it is useful to make sure unexpected files don't lay around within the system causing potential problems.
The integrity checker has the ability to get rid of the alien files. Check (tick) the checkbox next to the file name and press the "Automatically handle those ticked (checked) – delete/move as needed" button placed below the list of files. The selected files will be deleted or in some rare cases moved.
Obviously you should be careful deleting files, as there may be legitimate reasons you have put alien files there. The upgrader is smart enough to recognise files from old versions and automatically tick (check) those, leaving the ones totally unrecognised unticked (unchecked).
- Cloning your site
- Basic Installation
- Advanced installation
- Backing up your site
- Problem and feedback reports, and development policies
- Theme lifecycle
Please rate this tutorial:
Have a suggestion? Report an issue on the tracker.