Posts

Showing posts from October, 2022

Duplicating moodle to create a new instance

The following are steps to DUPLICATE an existing Moodle on Ubuntu 20.x using PHP 7.4 to make a  NEW instance . First you have to create a new database for the new moodle instance. Let's assume your new moodle instance is going to be called "copytwo" If you are moving an instance from one server to another you will have to edit the SQL to replace the hostname. I suggest VIM or VI. Their details are mentioned in step 5. You will need to make a backup copy of the SQL, then edit the SQL, and replace the old hostname with the new hostname. 1. Set up a second MySQL database After this, set up mysql. Login as  root  on mysql. It will require you to use your root moodle password. If you can't remember what you set it to, instructions on resetting it are below in step 2 . mysql -u root -p 1.1 First, create the database: create database copytwo; When creating the moodle database, you need to set the  owner -  the user who will have  write  permissions. Obviously, "someoth