Difference between revisions of "Moodle Upgrade 4.0.1 to 4.2.3"

From Notes_Wiki
 
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Main Page|Home]] > [[Ubuntu]] > [[Ubuntu 22.04]] > [[Ubuntu 22.04 Moodle Upgrade]] > [[Moodle Upgrade 4.0.1 to 4.2.3]]
[[Main Page|Home]] > [[Ubuntu]] > [[Ubuntu 22.04]] > [[Ubuntu 22.04 Moodle Upgrade]] > [[Moodle Upgrade 4.0.1 to 4.2.3]]
* Take the DB dump
<pre>
mysqldump -u <DB-user> -p <DB-name> > moodle_db_backup.sql
</pre>
* Backup moodle directories
<pre>
sudo tar czf moodledata_backup.tar.gz /var/moodledata
</pre>
<pre>
sudo tar czf moodle_code_backup.tar.gz /var/www/html/moodle
</pre>
* Go to moodle directory
<pre>
cd /var/www/html
</pre>
* Rename the old moodle folder
<pre>
sudo mv moodle moodle_old
</pre>
* Download moodle package from the official website and extract the package
<pre> 
sudo tar -zxvf moodle-4.2.11.tgz
</pre>
* Copy the configuration file from the old moodle
<pre>
sudo cp moodle_old/config.php moodle/
</pre>
* Give required permissions and ownership
<pre>
sudo chown -R www-data:www-data moodle
</pre>
<pre>   
sudo chmod -R 755 moodle
</pre>
<pre>
sudo chown -R www-data:www-data /var/moodledata
</pre>
* Edit the '''php.in''' file, uncomment and change the value to 5000
<pre>
vim /etc/php/8.1/apache2/php.ini
max_input_vars = 5000
</pre>
* Open moodle on a browser and follow the steps to upgrade Moodle
* Remove the old moodle folder
<pre>
sudo rm -rf /var/www/html/moodle_old
</pre>

Latest 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-user> -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