Yay for another breakthrough! I have now figured out how to automate the creation of additional Moodle sites in a multi-site setup. To do this, I will have a "site" that is used as a template for all future sites. Once this template site is setup and configured to my liking I will then use the methods outlined on the official Moodle documentation site for Migrating a Complete Moodle site - Method 2... with one exception: I will perform these steps via a script. The script will:
- Create a database for the new site
- Create the new data directory
- Create the symlink for the new Moodle root
- Put the template site in Maintenance Mode
- rsycn the data directory
- Perform the MySQL dump
- Take the site out of Maintenance Mode
After that, I will log into the new Moodle site and go to admin/replace.php to fix the web links in the database... and that is it... the new site is built and ready to go.
Shortly I will post details on how to initially configure your Moodle installation so that it can support multiple sites. Until then...