How to upgrade your Tribiq CMS 5.x Installation
This howto describes how to upgrade your Tribiq CMS installation from one version to another.
Let's assume your site is called http://www.yourtribiqsite.com and you are migrating from Tribiq CMS version 5.0.6 to 5.0.9.
If you are able to run two concurrent Apache virtual hosts while you migrate, this is the best and safest way to migrate.
You will be able to test your new installation fully, and you should be able to make an instantaneous switch from one to another, with no downtime.
1. Get the new package
Download and unpack the latest Tribiq CMS package on your web server.
If possible, place this in a new directory at the same level as your existing Tribiq installation.
For example, if you have /var/www/tribiq-5.0.6 then make the new one /var/www/tribiq-5.0.10.
You do not need to run the Tribiq CMS installer.
2. Copy the siteconfigs
Look in the "siteconfigs" directory of the new installation directory and delete the the global and mysitename config files:
> cd siteconfigs/
> rm global.php
> rm mysitename.php
Now copy the config files from the existing installation into the new one. For example:
> cp -p /var/www/tribiq-5.0.6/siteconfigs/* .
3. Copy the templates
Change to your templates directory and replace the default templates with a copy of your existing templates.
> cd /var/www/tribiq-5.0.10/templates
> cp -rp /var/www/tribiq-5.0.6/templates/* .
4. Copy other stuff
If you have a custom favicon, special applications in apps, or plugins, copy these now to the new directory.
5. Create a copy database
Your existing Tribiq database may be called something like tribiqdb_506. You will need to duplicate this and perform an upgrade on the copy, which may be called tribiqdb_5010.
(If you prefer, you can simply make a backup of your existing database, in order to avoid duplicating the database. But note that this will mean your site has some downtime while you are performing the upgrade.)
You must either create a copy database, or backup your database.
If you use the mysql console program and you have MySQL root privelige, you will do something like this:
mysql> CREATE DATABASE tribiqdb_5010
-> DEFAULT CHARACTER SET utf8
-> COLLATE utf8_general_ci;
Note that you must use the UTF8 database type to get correct multiple-character set handling.
Otherwise, use whatever method is right for your system for creating a new (empty) database.
You will need to give your database user permission to access the new database, or you may prefer to create a new "user". For example:
mysql> GRANT ALL ON tribiqdb_5010.* to tribiq@localhost;
Before duplicating the old database's content, you should ideally do a MySQL FLUSH TABLES to ensure recent changes are written to disk, thus reducing the risk of corruption.
To duplicate the database, you can use MySQL's mysqldump program, mysqlhotcopy, or even simply copy the database files if you have a MyISAM database.
For example, from a Un*x shell, you could use mysqldump and mysql in batch mode together, like this:
bash> mysqldump -u tribiq -ppasswd tribiqdb_506 | mysql -u tribiq -ppasswd tribiqdb_5010
6. Optional: Create a New Apache Virtual Host
If it's important for you that you have absolutely no downtime during your upgrade, it is recommended that you create a new Apache Virtual Host to point to your new Tribiq installation directory.
This will enable you to test your new installation before going live.
To do this you should edit your Apache virtual hosts file, this may be conf/httpd.conf or similar, depending on your Apache and OS.
Create a new Virtual Host section with a new but temporary URL, say www5010.yourtribiqsite.com. This should have a DocumentRoot at your new installation directory, e.g. /var/www/tribiq-5.0.10/.
Check your config is okay and if so, restart Apache.
7. Optional: Create a temporary DNS record
If you followed step 6, you should now set up a DNS record for your temporary URL; do this before trying to access it in your browser to avoid getting the data into your cache.
How you so this will depend on your method of managing DNS. Add an A record for www5010.yourtribiqsite.com.
8. Accessing your new installation
Provided you have set up your DNS, you can now try going to the new URL in your browser, e.g. http://www2.yourtribalsite.com.
If you skipped steps 6 and 7, then at this point you will need to rename your web directory so that Apache now points to the new installation.
For example, rename /var/www/html to /var/www/html-506. Then rename /var/www/tribiq-5.0.10 to /var/www/html. Then go to your usual URL using your web browser.
9. Upgrade the new copy database
Your site is not ready yet! You will need to apply structural changes to your database in the form of database patches.
Updating Versions 5.0.9 or Later
Since version 5.0.9 of Tribiq CMS, an automatic database patcher has been created to automatically apply the database patches.
Log in to your site as an administrator with sysadmin rights. You should be prompted to visit the database update page.
If you are not (or your update was so severe that the prompt is broken) then immediately go to this URL in your site to apply the updates:
admin/update.php?update_database
Updating Versions 5.0.8 and Earlier
Currently, there is no automatic update path for Tribiq CMS version 5.0.8 or lower.
Owners of installations previous to 5.0.9 will have to manually apply patches up to 5.0.9 before they can follow the steps above with the automatic patcher.
Please see http://tribiq.com/updating_5_0_8_and_earlier.html for more details.
Update Admin Phrases
Our administration area is fully multilingual. However immediately after updating, you may notice that several phrases are missing.
Immediately after the automatic patcher has run, you should be prompted to update the phrases used in the administration area. If you are not, then they can also be updated by going to this URL in your site to apply the updates:
admin/update.php?update_admin_phrases
10. Test your new installation
You should now see your looking familiar, but with the new version of the CMS.
You should check that all is correct and that you can log in and administrer the site normally, albeit with the new functionality.
If you followed steps 6 and 7, then when you are satisfied that all is well, you should change Apache's Virtual Hosts so that the main URL for your site points to the new directory.
Troubleshooting
You should now be able to access your site in your browser.
It will now be using the new Tribiq CMS version, and the new database format.
You can now edit templates if you wish, or simply change DNS to point to your new installation once you are happy all is okay.
If you run into difficulties:
- make sure you have the correct patch according to the version you are going from and to
- if you are upgrading through several versions, make sure you apply the database patches in the right order.
- if these things fail you should look for Support in the tribiq.com forums, or ask for commercial support.
Top of Page