Modern Commerce — Installation
- Before you start
- Install the plugin
- Install PHP dependencies (Composer)
- Run the Moodle upgrade
- Seed install defaults
- First-run configuration
- Verify the install
- Uninstalling
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 componentlocal_moderncommercefrom 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:
- Store identity — business name and support email.
- Currency — pick the active store currency before creating any prices (default NGN).
- Tax — mode and default rate, before opening checkout.
- Payment gateways — connect at least one merchant account (see Payments).
- 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
-
Visit the storefront at
/local/moderncommerce/index.php. -
Visit the admin dashboard at
/local/moderncommerce/admin/index.phpas a manager. -
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.