Upgrade

Upgrade steps for the Blesta-Cerb plugin

 3 minute read

The following instructions assume that you have console access to a Linux-based server. The officially supported way of upgrading is by using Git, a distributed version control system.

You can use Git to quickly update your local files to the latest version. The major advantage of version control is that it will attempt to automatically merge official code improvements with any local configuration and customization you have performed. Git also gives you the ability to list all your changes to any project files, and to easily restore to an official version when desirable.

Preparation

Follow Blesta and Cerb best practices by backing up your installation before proceeding. The instructions for Blesta and Cerb are included.

Update using Git

Navigate to the root of your Bletsa-Cerb plugin directory which should be: plugins/cerberus/ and verify that everything is configured correctly.

git status

Running the git status command will show any local changes you made. If you made local changes, then stash them:

git stash

Now switch to the master branch:

git checkout master

Update to the latest version:

git pull origin master

Reapply any changes you might have stashed, otherwise skip this step.

git stash pop

Dealing with conflicts

If you encounter conflicts while updating, you can attempt to resolve them manually, or you can overwrite any local changes you made and apply the changes from the upgraded version.

Ensure that you have no remaining conflicts before continuing with the upgrade by running:

git stash

A handy tool to visualize and reconcile conflicts is built into Git:

git mergetool

Download Direct

Alternatively, you may skip git and download the source code directly from GitHub.

It is import to name the folder cerberus within the plugins folder

Set permissions

Depending on your server configuration, the file ownership and permissions might not be correct. It is important to make sure the cerb folder and files are owned by the correct Linux user who has access to read PHP and execute files from the web server.

This handy bash script is provided as a guide and can be modified to suite your needs.

#!/bin/bash

user=$USER
group=$(id -g -n $user)

echo "Fixing ownership and permissions for user: $user group: $group"
chown -R $user:$group *
find . -type d -exec chmod 755 {} \;
find . -type f | xargs -d$'\n' -r chmod 644

Register Upgrade with Blesta

Once the source code files has been updated and merged with any local changes, the last step is to run an upgrade on the plugin itself.

If an upgrade is available, follow the steps:

  • Visit [Admin Portal] -> [Select your Company] -> [Plugins] -> [Available]
  • Click on [Upgrade] next to Cerb Helpdesk.

Some updates to the Blesta-Cerb plugin might not require running an upgrade, while others will. If you do not see an upgrade button you may skip this step.

Finished

The Blesta-Cerb plugin has finished upgrading.


Last modified September 26, 2020: (bb50efe)