Posts

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. Obv...

Installing Moodle on Ubuntu 20.x

The following are steps to install Moodle on Ubuntu 20.x using PHP 7.4. Your versions may differ. Please note that the instructions on Moodle's page ( https://docs.moodle.org/400/en/Step-by-step_Installation_Guide_for_Ubuntu#Step_2:_Install_Apache.2FMySQL.2FPHP ) are NOT correct. There are some substantial errors on that page. They do not tell you to remove php8.1 They tell you to reset the root password using a method that is confusing and causes problems. Their steps for SSL do not work. Rather follow these instructions. 1. Install PHP and set up apache Note that Moodle at present (2022) only likes php7.4 or older, so if the server system is preinstalled, you need to remove the existing php if it is the wrong version. First find out the version: php -v If it returns version higher than 7.4, e.g. version 8.1, you have to remove it. At present, Moodle does NOT like php 8. sudo apt remove php8.1 Now tell it about the older php version repository: sudo add-apt-repository ppa:ondrej...