-
Notifications
You must be signed in to change notification settings - Fork 15
Upgrades
aworley edited this page Apr 11, 2017
·
2 revisions
The following are instructions for upgrading an existing installation of Pika CMS to a Pika CMS 6.x release. These instructions assume you have an existing Pika site, you are familiar with MySQL database and Apache web server administration, and are using a CentOS 5/6/7 server to host your Pika site.
- Download the latest Pika CMS 6 .ZIP file from pikasoftware.com/files/releases/.
- Unzip the downloaded file. It will contain a "cms" directory and a “cms-custom" directory. The “cms” directory is the main code directory, and the “cms-custom” directory is the custom code directory.
- Delete the “cms-custom” directory, it’s not needed for upgrades of existing sites.
- Log into a command prompt on the server running Pika CMS.
- Find the directory where Pika CMS is currently installed on the server. It is often in “/ var/www/html”. For this example, assume the main code directory for Pika CMS is installed at “/var/www/html/cms”.
- Locate a fresh copy of the version of Pika CMS you currently have installed.
- Run diff against the fresh copy of Pika CMS and your current production copy. This will identify any main code files that have been modified. In this example, the command would look like “diff -r /home/user/pika_cms-500/ /var/www/html/cms”.
- If the diff results come back empty, great! If diff does find changes, you’ll need to review each change and determine what, if anything needs to be done to preserve the code change. In some cases, it may be a hotfix that was installed to fix a bug, in which case the new version will include the hotfix and no action on your part is needed. But if the change represents a customization, all efforts should be made to move the program logic of the customization out of the main code directory and to the custom code directory.
- Once the diff results have been reviewed, you should next run any SQL upgrade scripts needed to bring your database schema in sync with the latest version. These scripts are located in “cms/app/sql/upgrades/“. For example, if you are upgrading from version 5.11 to version 6.01, you’d run pika512.sql, pika600.sql, and pika601.sql. Note that not every version requires a SQL database modification. Example, upgrading from 5.11 to 6.00: "cd /var/www/html/app/sql/upgrades; cat pika512.sql pika600.sql | mysql -u root -p pika_database_name"
- Rename the old main code directory to something else. Example: "mv -i /var/www/html/cms /var/www/html/cms.001"
- Copy the "cms" folder you just unzipped to "/var/ww/html/cms". Example: "cp -aiv ~/Downloads/pika_cms-600/cms /var/www/html/cms"
- You are now ready to replace the old, main code directory with the main code directory from the new version. Rename the old main code directory to a different location, but remember where you put it in case you want to undo the upgrade. For example, you could rename “cms” to “cms-2014-11-13”. Then replace the old directory with the “cms” directory you unzipped in Step 2.
- Your upgraded Pika site is now ready to use!
- Log in and test out the upgrade.
The most common upgrade issue is when customizations are accidentally put in the main code base, instead of the custom code folder. Here's how to diagnose this issue.
- Locate a fresh copy of the version of Pika CMS you currently have installed.
- Run diff against the fresh copy of Pika CMS compared to your current production copy. This will identify any main code files that have been modified. In this example, the command would look like “diff -r /home/user/pika_cms-511/pika_cms-511 /var/www/html/cms”.
- If diff does find changes, you’ll need to review each change and determine what, if anything needs to be done to preserve the code change. In some cases, it may be a hotfix that was installed to fix a bug, in which case the new version will include the hotfix and no action on your part is needed. But if the change represents a customization, all efforts should be made to move the program logic of the customization out of the main code directory and to the custom code directory. In some cases you may want to contact Pika Software and get advice on the best way to do this.