$100 Website Offer

Get your personal website + domain for just $100.

Limited Time Offer!

Claim Your Website Now

Step by Step Guide of Moodle Upgrade

Backup important data

There are three areas that should be backed up before any upgrade:

  • Moodle software (For example, everything in server/htdocs/moodle)
  • Moodle uploaded files (For example, server/moodledata)
  • Moodle database (For example, your Postgres or MySQL database dump)

Type – Minor

Type – Major

  1. Move your old Moodle software program files to another location. Do NOT copy new files over the old files.
  2. Unzip or unpack the upgrade file so that all the new Moodle software program files are in the location the old files used to be in on the server. Moodle will adjust SQL and moodledata if it needs to in the upgrade.
  3. Copy your old config.php file back to the new Moodle directory.
  4. As mentioned above, if you had installed any plugins on your site you should add them to the new code tree (Moodle directory structure) now. It is important to check that you get the correct version for your new version of Moodle. Be particularly careful that you do not overwrite any code in the new version of Moodle and that you place the plugin folders in the correct directory (the same directory that they are in in the current installation.)
  5. Your moodledata folder should be located separately to your Moodle code folder and, as such, should not need anything done to it. Moodle 3.0 will throw a warning if it is located in a web accessible folder and the moodledata should never be located in the Moodle code folder. If you are moving your installation to a new server or new location on your server, then you will need to follow the Migration documents.
Linux
mv moodle moodle.backup
tar xvzf moodle-latest-3.11.tgz
Next, copy across your config.php, any custom plugins, and your .htaccess file if you created one (check that custom plugins are the correct version for your new Moodle first):

cp moodle.backup/config.php moodle
cp -pr moodle.backup/theme/mytheme moodle/theme/mytheme
cp -pr moodle.backup/mod/mymod moodle/mod/mymod
Don't forget to make moodle/config.php (and the rest of the source code) readable by your www server. For maximum security the files should not be writeable by your server. This is especially important on a 'production' server open to the public internet.

chown -R root:root moodle (Linux debian - or even create a user especially for moodle. Don't use the web server user, e.g. www-data)
chmod -R 755 moodle
If you use cron, take care that cron.php is executeable and uses the correct php command:

chmod 740 admin/cli/cron.php (some configurations need chmod 750 or chmod 755)
copy the first line from cron.php (if it looks like '#!/usr/local/bin/php' or '#!/usr/local/bin/php5.3', no need to copy '<?php') 
if necessary. However, for a simple upgrade, there should be no need to change anything with cron.

Reference

  • https://docs.moodle.org/311/en/Upgrading

Related Posts

The Ultimate Website Development Roadmap for Startups and Small Businesses

Introduction For startups and small businesses, a digital footprint is no longer a luxury—it is the foundation of market credibility. A business website serves as a 24/7…

Read More

Choosing a Reliable Website Development Partner for Sustainable Business Growth

Introduction In today’s hyper-connected economy, a company’s digital storefront is often its single most critical point of consumer interaction. A website is no longer just a digital…

Read More

WP-CLI Complete Tutorial: How to Install It, Understand It, and Use the Most Important wp Commands

If you manage WordPress sites regularly, WP-CLI can save a ridiculous amount of time. Instead of clicking through the dashboard for every plugin, theme, database, or user…

Read More

Master Troubleshooting Guide: Flarum Google Login OAuth Issue on cPanel/Apache with WordPress Root Site

1. Environment Overview This guide is based on a real troubleshooting case where: 2. Original Problem Google login was enabled for Flarum using FoF OAuth. The login…

Read More

Simplifying the Search for Trusted Professionals Near Me

Introduction We live in an era where you can manage almost your entire life from a smartphone, yet finding reliable local help often feels stuck in the…

Read More

Complete AIOps Training Guide: Tools, Use Cases, Certification & Career Path

Modern enterprise infrastructure generates far more data than human operators can realistically process. A typical cloud-native architecture experiences hundreds of thousands of ephemeral events daily, leading to…

Read More
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x