Updating

Keeping your Cotonti up2date, upgrading from previous versions and other systems

Эта страница еще не переведена на украинский. Отображен оригинал страницы на английском языке. Вы можете зарегистрироваться и помочь с переводом.

This document will guide you through necessary steps for keeping your Cotonti website up2date. It makes a presumption that you have got some experience running a website and using popular tools such as phpMyAdmin, FTP, etc.

It is considered as a good habit if you backup your site files and database before making any major updates to it.

#1. Keeping your Cotonti Siena up to date

Most of updates within Siena branch (0.9.x) are automated. So, if you run a Siena website and there are some updates available for the core, modules or plugins, just follow the steps described below.

  1. Copy the updated files into your site's tree. Overwrite existing files with updated ones.

  2. If you have removed install.php from the root folder after previous installation/update, then restore it there. If you are updating the entire Cotonti package and not just a particular module/plugin, then make your datas/config.php writable by PHP (usually means setting CHMOD 666 or CHMOD 664 on it).

  3. Run the installer script in your browser window, e.g. http://example.com/install.php

  4. The script will automatically merge changes in config.php, check for SQL patches and update them, check for updates in all installed modules and plugins and apply them if available. If any errors occur, they will be shown on red background. Normal update log is shown on green background. Please ask for support on forums if you encounter errors during update.

  5. After update is finished successfully, you may remove install.php until next update and revoke write access on datas/config.php (CHMOD 644).

Note for extension developers: the update script detects changes in modules and plugins by comparing their version number to version number present in the database. It does not compare actual files or search for patches. So if you update setup of your extension (configuration, default permissions, etc.), change hooks or extension parts, add PHP or SQL patches, then don't forget to increase the version number in extension's setup file for the update script to know that there is some work for it.

#2. Upgrading from Cotonti Genoa

It is possible to upgrade existing Genoa site to Siena. Configuration and database will be converted automatically. And so will be modules and plugins which have been updated for Siena too. Old Genoa and Seditio plugins will be disabled upon upgrade, because they will either require porting to Siena or enabling a special compatibility plugin first.

Make sure you have updated your site to latest Genoa before upgrading it from Genoa to Siena. Otherwise upgrade may fail.

Follow these steps to upgrade your site from Genoa to Siena:

  1. Backup site files and database. This is strongly recommended. If anything goes wrong, you will be able to restore your site from a backup.

  2. Copy Siena files and paste them on top of your existing Genoa tree. Overwrite old files.

  3. Download Cotonti legacy package and extract it to your site's root.

  4. Make your datas/config.php writable by PHP (usually means setting CHMOD 666 or CHMOD 664 on it).

  5. Run the installer script in your browser window, e.g. http://example.com/install.php

  6. After that the site will be converted to Siena. It may take some time depending on how much data your site has. If any errors occur, they will be shown on red background. Normal update log is shown on green background. Please ask for support on forums if you encounter errors during upgrade.

  7. When upgrade is finished successfully, you may remove install.php until next update and revoke write access on datas/config.php (CHMOD 644).

Your site's theme will be switched to Nemesis, the development/fallback theme of Siena. This is because skins are now called themes, they are located in a different folder and you'll need to modify your Genoa skin into Siena theme to use it on site.

Plugins which have not been ported to Siena are disabled upon upgrade. Then if a plugin gets a Siena port, then you can update its files and install it again in Administration => Extensions. If your site depends on Genoa plugins heavily, you can enable partial backwards compatibility by installing Genoa plugin in Administration => Extensions. After that you will be able to install and run Genoa plugins. Their proper functioning is not guaranteed although Cotonti will do its best to provide old APIs to them. It has a performance downside, so use it only as a temporary measure until all necessary plugins are ported to Siena.

Porting Genoa skins and plugins to Siena is beyond the scope of this guide, please refer to specific articles on these topics.

Probably you will need to configure parsers and editors for your site. Read an article about it.

#2.1. Upgrading from Seditio

Upgrading Seditio to Cotonti Genoa is required first if you want to upgrade a Seditio site to latest Cotonti. This is how you can upgrade Seditio to Cotonti Genoa:

  1. First make sure your Seditio site uses v126 or v130, upgrading from earlier versions is not supported.

  2. Then make sure your Seditio database is converted to UTF-8 character set. Check Seditio documentation or search the web if you need help with it.

  3. Unpack latest Cotonti Genoa files and overwrite Seditio files with them.

  4. Open phpMyAdmin and apply SQL patches in sql folder in the following order:

    • patch-125-n-0.0.1.sql

    • patch-0.0.1-0.0.2.sql

    • patch-0.0.2-0.0.3.sql

    • patch-0.0.3-0.0.4.sql

    • and so on in ascending order of version numbers in patch-A.B.C-D.E.F.sql

  1. Copy sql/patch-0.6.txt to patch.php in the site root. Run it in a browser window, e.g. http://example.com/patch.php. After that remove patch.php.

  2. Open datas/config-sample.php and datas/config.php, merge necessary changes from config-sample.php to config.php.

After upgrading your site to Genoa and testing it, you will be able to upgrade it to Siena as described in previous chapter.


1. Eugene  28.01.2012 23:15

в части Genoa-Siena пункт 5 не совпадает с англ.версией. Лично у меня при обновлении с  Genoa 0.6.2 -> Siena 0.9.7(testing) скрипт не спрашивал о парсинге.

Сразу после апгрейда шикарно законвертил форумы и страницы в HTML.

Благодарность за удобный инструмент!

2. Dayver  05.04.2012 09:17

Документ не раскрывает вопроса как нужно обновлять - поетапно:

Если например установлена Siena 093 то нужно поочереди обновлять до 094 потом 095 и так далее до последней

или

Если например установлена Genoa 0.6.18 то нужно обновить до 0.6.19 потом 0.6.20 и аж до последней генуи а потом с нее на последнюю сиену?

 

Или же инструмент обновит с любой текущей версии движка до послелней сиены (или генуи в зависимости от требуемого конечного результата)????

3. Trustmaster  08.04.2012 17:53

С Genoa на Siena этапы описаны подробно, читайте внимательнее. В ветке Siena происходит обновление с любой версии на последнюю.

4. Oughtem  22.06.2012 17:36

фраза "скрипт.... проверит на наличие обновлений для всех установленных модулей и плагинов и применит доступные." не понятна. Имеются ввиду стандартные плагины и расширения?

5. Trustmaster  22.06.2012 18:34

Все установленные. Проверит, имеются ли патчи на диске, а не на сайте-источнике.

6. CrazyFreeMan  16.01.2015 21:54

"Если вы удалили файл install.php из корневой папки после предыдущей установки/обновления, восстановите его сейчас. "

Пункт не понятный, если у меня версия к примеру 9.16 файл я удалил инстал, теперь хочу обновится до 9.17 то мне нужно взять файл инстал с старой версии и его запустить? и после обновитсядо 9.18 нужно взять файл инстал от 9.17 ?

7. Dayver  17.01.2015 00:02

Нет, со старой ничего брать не нужно. Этот пункт как дополнение-уточнение к первому, тоесть имелось ввиду что если вы, например, имеете сайт на 0.9.16 и допустим используете не все 28 плагинов которые шли в коробке с двигом, а только к примеру 10, а остальные 18 не просто выключены в админке а и удалены с фтп физически, соответвенно при обновлении например до 0.9.17 или например сразу к 0.9.18 (минуя 0.9.17 - ведь можно и так) вы конечно можете тупо залить все файлы из архива 0.9.18 поверх старых, но ведь зачем заливать\обновлять например те 18 плагинов которые вы не использовали в предыдущей версии и естественно не нужны в новой потому логичнее из архива новой версии вы будете заливать поверх старых только 10 плагинов. Но с файлом install.php (и папкой setup - которую я так же как и install.php тоже сразу удаляю с сервера после установки\обновления двига) не так. Если во время установки 0.9.16 вы этот файл не удалили (а его стоит удалять) то при обновлении до 0..9.18 вы его должны перезалить новым из архива новой версии, а если удалили тогда всеравно взять и залить из архива с новой версией ибо он нужен будет для процеса обновления. Обновление провели и сразу удалили файл install.php (и папку setup - я так делаю) ибо они уже не нужны, а когда в следующий раз будете обновлятся то возмете их из новой версии. Может немного сумбурно но постарался пояснить детально что и почему, если всеравно вопросы возникнут - задавайте на форуме.

8. Dave  26.08.2017 14:04

help...

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2002] Connection refused' in /home/dave69/www/system/database.php on line 79( ! ) PDOException: SQLSTATE[HY000] [2002] Connection refused in /home/dave69/www/system/database.php on line 79Call Stack#TimeMemoryFunctionLocation10.0005260920{main}( )../install.php:020.01681834352CotDB->__construct( )../install.php:10830.01681834816__construct ( )../database.php:79

Додавання комментарів доступно лише зареєстрованим користувачам