New Semester Site Creation
Goal: prepare and clone the Moodle production site for the new semester using the validated template from EL-CRON
.
Pre-Checks
- Ensure the template site is up to date (latest Moodle version and all plugins updated) – see Chapter 2 – Template Validation.
- Confirm the baseline configuration (theme, categories, settings) is ready for cloning.
- Ensure the OpenLiteSpeed logs show no fatal errors for the template site:
ssh 192.168.23.128 'tail -n 100 /usr/local/lsws/logs/error.log'
Cloning Process
- Create Moodle Web Directory:
cp -a /elearning_data/template/{platformname}_template45 /elearning_data/production/{platformname}_{semester}
- Create Moodledata Directory:
cp -a /elearning_data/template/production_{platformname}_template45 /elearning_data/production/production_{platformname}_{semester}
- Clone Database:
mysqldump -h192.168.23.167 -u root -p production_{platformname}_template45 \ | mysql -h192.168.23.167 -u root -p production_{platformname}_{semester}
Configuration Updates
- Edit
config.php
in the new Moodle web directory:- Update
$CFG->dbname
toproduction_{platformname}_{semester}
- Update
$CFG->wwwroot
to the new semester URL (example:https://{platformname}.umt.edu.my/{semester}
) - Update
$CFG->dataroot
to/elearning_data/production/production_{platformname}_{semester}
- Update
- Ensure permissions are correct:
chown -R nobody:nogroup /elearning_data/production/{platformname}_{semester} chown -R nobody:nogroup /elearning_data/production/production_{platformname}_{semester}
Post-Clone Adjustments
- Log in as admin to the new semester site.
- Go to Site administration → Notifications and complete any pending database upgrade steps.
- Remove old semester-specific banners or announcements.
- Confirm cron is running:
/usr/local/lsws/lsphp82/bin/php /elearning_data/production/{platformname}_{semester}/admin/cli/cron.php
Validation
- Access the front page and confirm the site loads without errors.
- Check Site administration → Plugins → Plugins overview for any missing updates.
- Verify the correct semester name and platform branding are displayed.
- Test login for a sample lecturer and student account.
Handover
- Notify lecturers that the new semester site is live and ready for course content preparation.
- Remind that course content updates are handled by lecturers, not during the cloning process.