Visit NES for IOMAD Home Page

NES for IOMAD Installation Guide

Learn how to install NES for IOMAD by direct download over an existing IOMAD 4.3 site.

Installation Method

NES for IOMAD is distributed as a downloadable archive that you extract over your existing IOMAD 4.3 site. Direct download is the only supported installation method.

Before You Begin

Confirm your platform

Check your PHP and database versions against the Supported Platforms matrix.

Confirm your current IOMAD version

NES for IOMAD is a drop-in replacement for IOMAD 4.3.3, and your site must already be running exactly that version. If you are on an earlier 4.3.x release, upgrade to 4.3.3 through your normal IOMAD upgrade process first.

From the admin interface: go to Site administration → Notifications. The version is shown at the bottom of the page.

From the command line:

sudo -u www-data php admin/cli/cfg.php --name=release

Enable maintenance mode

From the admin interface: go to Site administration → Server → Maintenance mode and set Maintenance mode to Enable.

From the command line:

sudo -u www-data php admin/cli/maintenance.php --enable

Pause scheduled tasks

Maintenance mode blocks web traffic but does not stop a system cron job from invoking admin/cli/cron.php. Stop or disable your cron runner before extracting, and re-enable it once the database update has finished.

Back up

Back up your dirroot or IOMAD webroot, your moodledata directory, and your database.

Disable the built-in update checks

IOMAD inherits Moodle's built-in update check, which queries download.moodle.org and does not know about NES for IOMAD releases. Left enabled, it reports your site as out of date and can offer to deploy upstream IOMAD over your NES files - including from the Notifications page you use later in this guide. Set both of these in config.php before you continue:

$CFG->disableupdatenotifications = true;
$CFG->disableupdateautodeploy = true;

Download and Install

Download the archive

CLI

Download the archive using your NES Access Token as the bearer token. Replace the version with the latest from the release notes:

NES_ACCESS_TOKEN=<your-access-token-beginning-with-"pat-">
curl --header "Authorization: Bearer $NES_ACCESS_TOKEN" --output ~/release.zip \
--location https://registry.nes.herodevs.com/composer/pkg/neverendingsupport/iomad/4.3.5+4.3.3:iomad/release.zip

Browser

Go to the URL for the current release which should be the following, but with the most recent version: https://registry.nes.herodevs.com/composer/pkg/neverendingsupport/iomad/4.3.5+4.3.3:iomad/release.zip

You will be prompted to enter a username and password. Use the email address associated with your NES subscription for the username and your PAT (personal access token) as the password. The file will download to your chosen location.

You can also download through your browser using Basic Authentication. See Direct Downloads for instructions.

Extract over your existing site

Linux/macOS
Windows
unzip -o ~/release.zip -d /path/to/iomad

When in doubt, use the full path to your IOMAD installation.

Your own files are left alone. The archive carries IOMAD core plus every component IOMAD ships with - the local/iomad*, local/email*, and local/report_* plugins, the iomad_* blocks, the iomadoidc and iomadsaml2 auth plugins, and the iomad, iomadboost, and iomadbootstrap themes - so their files are replaced by the copies in the release. Contributed plugins you installed yourself, your own custom themes, and your config.php are not touched. Changes you made inside IOMAD core or a bundled component are overwritten - reapply them afterwards.

Apply the database update

The release updates both IOMAD core and the bundled local_iomad plugin, so the database update covers each of them.

From the admin interface: log in as an administrator and go to Site administration → Notifications. IOMAD detects the new version on disk and starts the update process - review the version and environment pages, then confirm to apply the database update. Afterwards, purge caches from Site administration → Development → Purge caches.

From the command line:

sudo -u www-data php admin/cli/upgrade.php
sudo -u www-data php admin/cli/purge_caches.php

Disable maintenance mode

From the admin interface: go to Site administration → Server → Maintenance mode and set Maintenance mode to Disable.

From the command line:

sudo -u www-data php admin/cli/maintenance.php --disable

Verify your site works as expected, re-enable your cron runner, then delete the downloaded archive at ~/release.zip.

Rolling Back

If the upgrade fails, or the site does not come back healthy, restore the backups you took in Before You Begin. Restore the codebase and the database together: admin/cli/upgrade.php writes schema changes, so a restored database will not match NES code on disk, and restored code will not match an upgraded database.

Re-enable maintenance mode

sudo -u www-data php admin/cli/maintenance.php --enable

Restore the codebase

Replace dirroot with your pre-install backup. Do not extract the NES archive again.

Restore the database

Restore the database dump you took before the install, into the database your config.php points at.

Purge caches and bring the site back

sudo -u www-data php admin/cli/purge_caches.php
sudo -u www-data php admin/cli/maintenance.php --disable

Your moodledata directory does not normally need to be restored - purging caches is enough. If you do restore an older moodledata, make sure it matches the database you restored.

Tell us what went wrong at support@herodevs.com and we will help you get the install through on the next attempt.

Next Steps

Confirm the install with Verifying an NES for IOMAD Installation.

Your site will still compare itself against download.moodle.org and consider itself out of date. That is expected. The settings you applied in Before You Begin stop IOMAD from acting on it.

Every NES release ships a new $version. To apply a later release, repeat Before You Begin and Download and Install with the new archive, including the database update. IOMAD does not record the new version until the update runs.

The release notes are updated with every NES for IOMAD release, and HeroDevs emails customers a monthly release summary. If you are not receiving it, contact support@herodevs.com.