This guide helps when updating a Kajona v4 installation to the new Kajona v5.
The Kajona v4 installation should be update to the latest 4 release. This is Kajona v4.7 (module system to v4.7.1). The update is supported using the integrated package management.
As usual, when it comes to updating a Kajona system make sure to back up ALL data. This includes both, the filesystem and the database.
We created a simple script that will take care of updating your template pack so nothing gets lost during the update.
Download or copy the file
to your Kajonas root-folder so the file is on the same level as the index.php, download.php and image.php files.
Open up your browser and point it to the newly created file:
The script should print a bunch of messages and report to you, that it saved all templates to either a newly created template pack, or that it added the missing templates to your current template pack.
In addition, the script moves some if the files below /project to their new location.
/v5preupdate.phpscript and proceed.
Starting with v5, modules and elements are shipped as phar-files. Therefore all module- and element-directories below
/core should be replaced by the corresponding phar. Go to https://www.kajona.de and download the relevant packages according to your installation and delete the v4 folders.
Heads up! In Kajona V5 every package is a module. This means that the previous
element_formularis now called
If you finished downloading the packages, only phar-files should be listed below
Replace your download.php, image.php, index.php, installer.php and xml.php files with a v5 version. You'll find them at the following locations:
|file||v5 download location|
Now that you've replaced all the v4 modules with fancy new phar-packages and that you've updated the root-files, you may prepare the database for v5.
Speaking in technical words, kajona v5 organizes all classes in namespaces, therefore the class-names in your database need to be migrated.
As you may have guessed, we provide another script to prepare your database. It is located in the /core directory and named
/core/V4toV5Migration.php. If you don't have the script in your folder, please download it from https://raw.githubusercontent.com/kajona/kajonacms/master/V4toV5Migration.php.
Open your browser and point it to the file:
The script should spill out a bunch of messages and finish silently. No error means everything went well, the last entry could be s.th. like
Updating table module_xmlfilenameadmin@system_module updating class_module_tags_admin_xml.php to TagsAdminXml.php updating class_module_system_admin_xml.php to SystemAdminXml.php updating class_module_dashboard_admin_xml.php to DashboardAdminXml.php updating class_module_mediamanager_admin_xml.php to MediamanagerAdminXml.php updating class_module_stats_admin_xml.php to StatsAdminXml.php
From now on it's pretty straight forward:
Call the installer and let you guide through the last parts of the update:
If all modules have been updated, the system is back living and based on your old layout.