-
Notifications
You must be signed in to change notification settings - Fork 7
Upgrade the Forums
The vanillaforums.org site lists the latest stable version of the Vanilla forum software. Because we've added a few minor things on top of vanilla, we can't simply download and install from scratch each time there's an update. Below is the step-by-step process of how to merge the latest upstream branch into our 29th-extensions-*
branch, push it to our source control, and then pull it onto the production server. In the examples below, we use versions 2.1.8p2
and 2.1.10
to represent the "current version" and "desired version", respectively. Obviously you'll want to change those version numbers when you use it.
Before anything else, backup the database! Replace the bracketed text below (including the brackets) with the database credentials.
mysqldump -u[username] -p [database name] > [database name].sql
In a local/development environment, clone our forked repo and prepare a new version branch
$ git clone https://github.com/29th/vanilla.git
$ cd forums
$ git remote add upstream https://github.com/vanilla/vanilla.git
$ git fetch upstream
$ git fetch upstream --tags
$ git checkout 29th-extensions-2.1.8p2 // (version upgrading from)
$ git submodule update --init --recursive // (adding submodules)
$ git checkout -b 29th-extensions-2.1.10 // (version upgrading to)
Then open the file update.sh
and change the git pull
line to reflect the new branch you've just created (ie. git pull origin 29th-extensions-2.1.10
) and commit the file change
$ git add update.sh
$ git commit -m "Updated version in update.sh"
Then merge in the latest version of the forum from the upstream repo and push it to source control
$ git rebase --onto tags/Vanilla_2.1.10 tags/Vanilla_2.1.8p2 29th-extensions-2.1.10 // (version upgrading to, version upgrading from, branch just created)
$ git push --force origin 29th-extensions-2.1.10 // (version upgrading to)
On production server, first copy the production forum directory to the staging directory
$ cp -R /var/www/forums.29th.org /var/www/staging-forums.29th.org
Then, from within the staging-forums.29th.org/public_html/
directory, remove the cache and reset the permissions on the cache folder so it will be accessible rom the web
$ rm cache/*.ini
$ rm cache/Smarty/compile/van*
$ chmod -R 777 cache
Then switch to the new version's branch you pushed
$ git fetch
$ git checkout 29th-extensions-2.1.10
Verify it works by visiting staging-forums.29th.org, then move the production forum directory to a backup folder and replace it with this staging directory
$ mv /var/www/forums.29th.org /var/www/backup-forums.29th.org
$ mv /var/www/staging-forums.29th.org /var/www/forums.29th.org
Finally, repeat the cache clearing steps from above from within the forums.29th.org/public_html/
directory
$ rm cache/*.ini
$ rm cache/Smarty/compile/van*
$ chmod -R 777 cache
The forum should now be upgraded at forums.29th.org. Verify by looking at the version number in the footer in the admin dashboard.
Last step is to upgrade the database in case any fields were added/modified. Visit /index.php?p=/utility/update to upgrade.
When you're finished, also change this line in the personnel install script so that developers installing the personnel system get the latest version.