Submit a ticket My Tickets

unHosting Fix for Failed Upgrade

Sub Heading

  1. Review the deploy log in unHosting for clues as to why the upgrade failed

    1. Examples may include space left, plugin version issue, missing dependency, etc.

  2. Record the current branch and commit

cd /mnt/data/sites/SiteName/http

git branch -av

You should see a list such as:

  1. Record the line that starts with the *asterisk, 

    1. In the above image, it would be:

 WORKPLACE_39_LATEST                7d79eacdb3 Moodle Workplace plugin theme_workplace (build 58654)

  1. Confirm that you should be on a standard named WORKPLACE_NN_LATEST branch in most cases

  2. Now get the latest commit log git log -n 1

    1. The commit log should show that it is a commit from:

Author: Moodle Workplace <workplace@moodle.comand that nothing was committed on top of it

  1. Check out new version (may need to use sudo)

sudo git checkout -b WORKPLACE_310_LATEST origin/WORKPLACE_310_LATEST

sudo git reset --hard origin/WORKPLACE_310_LATEST


If you get this error

fatal: Unable to create '/mnt/data/sites/SiteName/http/.git/index.lock': File exists.

  1. Do this
    sudo rm -rf /mnt/data/sites/SiteName/http/.git/index.lock

  2. Rerun Check out new version


If you get this error
fatal: 'origin/WORKPLACE_310_LATEST' is not a commit and a branch 'WORKPLACE_310_LATEST' cannot be created from it

  1. Do this

sudo /opt/unhosting/scripts/ sitename

  1. Rerun Check out new version

7. Run Upgrade

sudo -u apache /usr/bin/php-7.3 admin/cli/upgrade.php

Once you have confirmed you are on the correct branch, it also helps to run git status to check for any modified files (Note: Workplace force pushes their changes). If there are many modified files, it is best practice to have a Dev team member investigate.

If it comes back clean except for untracked plugins, you can rerun the upgrade script using sudo -u apache php-7.3 admin/cli/upgrade.php (assuming you are in the site’s source folder /mnt/data/sites/sitename/http).

*Add important callouts here

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.