Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 111 lines (107 sloc) 5.271 kB
<TITLE>Moodle Docs: Upgrading</TITLE>
<LINK REL="stylesheet" HREF="../theme/standard/styles.css" TYPE="TEXT/CSS">
<H2>Upgrading Moodle</H2>
<p>Moodle is designed to upgrade cleanly from any earlier version to any later
version. </p>
<p>When upgrading a Moodle installation you should follow these steps:</p>
<h2>1. Backup important data</h2>
<p>Although it is not strictly necessary, it is always a good idea to make a
backup of any production system before a major upgrade, just in case you need
to revert back to the older version for some reason. In fact, it's a good
idea to automate your server to backup your Moodle installation daily, so
that you can skip this step.</p>
<p>There are three areas that need backing up:</p>
<p><strong>1. The Moodle software directory itself</strong></p>
<p>Make a separate copy of these files before the upgrade, so that you can
retrieve your config.php and any modules you have added like themes, languages
<p><strong>2. Your data directory.</strong></p>
<p>This is where uploaded content resides (such as course resources and
student assignments) so it is very important to have a backup of these
files anyway. Sometimes upgrades may move or rename directories within
your data directory.<strong><br>
<p><strong>3. Your database</strong></p>
<p>Most Moodle upgrades will alter the database tables, adding or changing
fields. Each database has different ways to backup. One way of backing
up a MySQL database is to 'dump' it to a single SQL file. The following
example shows Unix commands to dump the database called &quot;moodle&quot;:</p>
<p><font face="Courier New, Courier, mono">mysqldump moodle &gt; moodle-backup-2002-10-26.sql</font></p>
<p>You can also use the &quot;Export&quot; feature in Moodle's &quot;Manage
Database&quot; web interface to do the same thing on all platforms.</p>
<h2>2. Install the new Moodle software</h2>
<p><strong>Using a downloaded archive</strong></p>
<p>Do not overwrite an old installation unless you know what you are doing
... sometimes old files can cause problems in new installations. The best
way it to rename the current Moodle directory to something else, then unpack
the new Moodle archive into the old location.</p>
<p><font face="Courier New, Courier, mono">mv moodle moodle.backup<br>
tar xvzf moodle-1.0.6.tgz</font></p>
<p>Next, copy across your config.php and any other plugins such as custom
<p><font face="Courier New, Courier, mono">cp moodle.backup/config.php moodle<br>
cp -pr moodle.backup/theme/mytheme moodle/theme/mytheme</font></p>
<p><strong>Using CVS</strong></p>
<p>If you are using CVS, just go into the Moodle root directory and update
to the new files:</p>
<p><font face="Courier New, Courier, mono">cvs update -dP</font></p>
<p>Make sure you use the &quot;d&quot; parameter to create new directories
if necessary, and the &quot;P&quot; parameter to prune empty directories.</p>
<p>If you have been editing Moodle files, watch the messages very closely
for possible conflicts. All your customised themes and non-standard plugins
will be untouched.</p>
<h2>3. Finishing the upgrade</h2>
<p>The last step is to trigger the upgrade processes within Moodle.</p>
<p>To do this just visit <a target=_top href="../admin/index.php">the admin page of your
<p><font face="Courier New, Courier, mono"></font></p>
<p>It doesn't matter if you are logged in as admin or not.</p>
<p> Moodle will automatically detect the new version and perform all the database
or filesystem upgrades that are necessary. If there is anything it can't do
itself (very rare) then you will see messages telling you what you need to
do. </p>
<p>&nbsp; </p>
<p> Assuming all goes well (no error messages) then you can start using your new
version of Moodle and enjoy the new features!</p>
<p>If you have trouble with the upgrade, visit <a target=_top href=""></a>
and post on the <a target=_top href="">Installation
Support Forum</a>.</p>
<P ALIGN="CENTER"><FONT SIZE="1"><A HREF="index.html" TARGET="_top">Moodle Documentation</A></FONT></P>
<P ALIGN="CENTER"><FONT SIZE="1">Version: $Id$</FONT></P>
Jump to Line
Something went wrong with that request. Please try again.