Official documentation

ModernCommerce documentation

Install, configure, operate, and extend the Moodle-native commerce platform.

Version 2.1.6

Modern Commerce — Installation


Before you start

Confirm your environment meets the Requirements: Moodle 5.2, PHP 8.3+, HTTPS in production, Composer available, and Moodle cron running.

Install the plugin

Copy the plugin so its path is:

local/moderncommerce

The folder must be named moderncommerce — Moodle derives the component local_moderncommerce from it.

Install PHP dependencies (Composer)

The repository ships a composer.json. From the plugin directory, install its PHP dependencies:

cd local/moderncommerce composer install --no-dev --optimize-autoloader

Run the Moodle upgrade

Complete the database install by visiting Site administration → Notifications, or from the Moodle root:

php admin/cli/upgrade.php

Then confirm the plugin appears under:

Site administration → Plugins → Local plugins → Modern Commerce

Seed install defaults

On a new site, seed safe starting defaults — gateway records, email templates, storefront widgets, and the role presets — before you configure anything:

php local/moderncommerce/cli/demo_data.php --install-defaults

This seeds a real starting configuration, not demo content. Full demo data (--seed) is for development/staging only and creates sample courses, orders, and buyers.

First-run configuration

Open the day-to-day store settings at Modern Commerce → Settings (/local/moderncommerce/admin/settings.php) and set at least:

  1. Store identity — business name and support email.
  2. Currency — pick the active store currency before creating any prices (default NGN).
  3. Tax — mode and default rate, before opening checkout.
  4. Payment gateways — connect at least one merchant account (see Payments).
  5. Checkout fields, navigation labels, and notification sender/support details.

Deeper configuration (webhook security, notification delivery channels, branding seeds, subscription defaults) lives in Moodle's native plugin settings under Site administration → Plugins → Local plugins → Modern Commerce. Both surfaces write to the same config store. See the Admin Settings Reference.

Confirm cron is running — nothing in the notification, subscription, or reporting pipeline works without it.

Verify the install

  1. Visit the storefront at /local/moderncommerce/index.php.

  2. Visit the admin dashboard at /local/moderncommerce/admin/index.php as a manager.

  3. Audit which tables have data:

    php local/moderncommerce/cli/demo_data.php --audit

Uninstalling

Uninstall from Site administration → Plugins → Plugins overview → Modern Commerce → Uninstall. This removes the plugin and its data. Export any orders, invoices, or reports you need to keep first — see Orders, Invoices & Refunds.

Where to go next