Difference between revisions of "Moodle Upgrade 4.0.1 to 4.2.3"

From Notes_Wiki
Line 2: Line 2:




* take the DB dump
* Take the DB dump


<pre>
<pre>
Line 8: Line 8:
</pre>
</pre>


* backup moodle directories
* Backup moodle directories


<pre>
<pre>
Line 18: Line 18:
</pre>
</pre>


* go to moodle directory
* Go to moodle directory


<pre>
<pre>
Line 24: Line 24:
</pre>
</pre>


* rename the old moodle folder
* Rename the old moodle folder


<pre>
<pre>
Line 66: Line 66:
* Open moodle on a browser and follow the steps to upgrade Moodle
* Open moodle on a browser and follow the steps to upgrade Moodle


* remove the old moodle folder
* Remove the old moodle folder


<pre>
<pre>
sudo rm -rf /var/www/html/moodle_old
sudo rm -rf /var/www/html/moodle_old
</pre>
</pre>

Revision as of 06:19, 16 October 2025

Home > Ubuntu > Ubuntu 22.04 > Ubuntu 22.04 Moodle Upgrade > Moodle Upgrade 4.0.1 to 4.2.3


  • Take the DB dump
mysqldump -u <DB-name> -p <DB-name> > moodle_db_backup.sql
  • Backup moodle directories
sudo tar czf moodledata_backup.tar.gz /var/moodledata
sudo tar czf moodle_code_backup.tar.gz /var/www/html/moodle
  • Go to moodle directory
cd /var/www/html
  • Rename the old moodle folder
sudo mv moodle moodle_old
  • Download moodle package from the official website and extract the package
  
sudo tar -zxvf moodle-4.2.11.tgz 
  • Copy the configuration file from the old moodle
sudo cp moodle_old/config.php moodle/
  • Give required permissions and ownership
sudo chown -R www-data:www-data moodle
    
sudo chmod -R 755 moodle
sudo chown -R www-data:www-data /var/moodledata
  • Edit the php.in file, uncomment and change the value to 5000
vim /etc/php/8.1/apache2/php.ini

	max_input_vars = 5000
  • Open moodle on a browser and follow the steps to upgrade Moodle
  • Remove the old moodle folder
sudo rm -rf /var/www/html/moodle_old