Fixes bug MDL-8234, "New groups code & AS keyword"
[moodle-pu.git] / lang / en_utf8 / docs / upgrade.html
blob4b3376a86108246c385c3e0d009d1386add0dcd1
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <title>Moodle Docs: Upgrading</title>
6 <link rel="stylesheet" href="docstyles.css" type="TEXT/CSS" />
7 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
8 </head>
10 <body>
11 <h1>Upgrading Moodle</h1>
13 <blockquote>
14 <p>Moodle is designed to upgrade cleanly from any earlier version to any later
15 version. </p>
16 <p>When upgrading a Moodle installation you should follow these steps:</p>
17 <h3 class="sectionheading">1. Backup important data</h3>
18 <blockquote>
19 <p>Although it is not strictly necessary, it is always a good idea to make a
20 backup of any production system before a major upgrade, just in case you need
21 to revert back to the older version for some reason. In fact, it's a good
22 idea to automate your server to backup your Moodle installation daily, so
23 that you can skip this step.</p>
24 <p>There are three areas that need backing up:</p>
25 <blockquote>
26 <p><strong>1. The Moodle software directory itself</strong></p>
27 <blockquote>
28 <p>Make a separate copy of these files before the upgrade, so that you can
29 retrieve your config.php and any modules you have added like themes, languages
30 etc<strong><br />
31 </strong></p>
32 </blockquote>
33 <p><strong>2. Your data directory.</strong></p>
34 <blockquote>
35 <p>This is where uploaded content resides (such as course resources and
36 student assignments) so it is very important to have a backup of these
37 files anyway. Sometimes upgrades may move or rename directories within
38 your data directory.<strong><br />
39 </strong></p>
40 </blockquote>
41 <p><strong>3. Your database</strong></p>
42 <blockquote>
43 <p>Most Moodle upgrades will alter the database tables, adding or changing
44 fields. Each database has different ways to backup. One way of backing
45 up a MySQL database is to 'dump' it to a single SQL file. The following
46 example shows Unix commands to dump the database called &quot;moodle&quot;:</p>
47 <blockquote>
48 <p><font face="Courier New, Courier, mono">mysqldump moodle &gt; moodle-backup-2002-10-26.sql</font></p>
49 </blockquote>
50 <p>You can also use the &quot;Export&quot; feature in Moodle's optional
51 &quot;Database&quot; web interface to do the same thing on all platforms.</p>
52 <p>&nbsp;</p>
53 </blockquote>
54 </blockquote>
55 </blockquote>
56 <h3 class="sectionheading">2. Install the new Moodle software</h3>
57 <blockquote>
58 <p><strong>Using a downloaded archive</strong></p>
59 <blockquote>
60 <p>Do not overwrite an old installation unless you know what you are doing
61 ... sometimes old files can cause problems in new installations. The best
62 way it to rename the current Moodle directory to something else, then unpack
63 the new Moodle archive into the old location.</p>
64 <blockquote>
65 <p><font face="Courier New, Courier, mono">mv moodle moodle.backup<br />
66 tar xvzf moodle-1.1.tgz</font></p>
67 </blockquote>
68 <p>Next, copy across your config.php and any other plugins such as custom
69 themes:</p>
70 <blockquote>
71 <p><font face="Courier New, Courier, mono">cp moodle.backup/config.php moodle<br />
72 cp -pr moodle.backup/theme/mytheme moodle/theme/mytheme</font></p>
73 </blockquote>
74 </blockquote>
75 <p><strong>Using CVS</strong></p>
76 <blockquote>
77 <p>If you are using CVS, just go into the Moodle root directory and update
78 to the new files:</p>
79 <blockquote>
80 <p><font face="Courier New, Courier, mono">cvs update -dP</font></p>
81 </blockquote>
82 <p>Make sure you use the &quot;d&quot; parameter to create new directories
83 if necessary, and the &quot;P&quot; parameter to prune empty directories.</p>
84 <p>If you have been editing Moodle files, watch the messages very closely
85 for possible conflicts. All your customised themes and non-standard plugins
86 will be untouched.</p>
87 </blockquote>
88 <p>&nbsp;</p>
89 </blockquote>
90 <h3 class="sectionheading">3. Finishing the upgrade</h3>
91 <blockquote>
92 <p>The last step is to trigger the upgrade processes within Moodle.</p>
93 <p>To do this just visit <a target="_top" href="../admin/index.php">the admin page of your
94 installation</a>.</p>
95 <blockquote>
96 <p><font face="Courier New, Courier, mono">http://example.com/moodle/admin</font></p>
97 </blockquote>
98 <p>It doesn't matter if you are logged in as admin or not.</p>
99 <p> Moodle will automatically detect the new version and perform all the database
100 or filesystem upgrades that are necessary. If there is anything it can't do
101 itself (very rare) then you will see messages telling you what you need to
102 do. </p>
103 </blockquote>
104 <p>&nbsp; </p>
105 <p> Assuming all goes well (no error messages) then you can start using your new
106 version of Moodle and enjoy the new features!</p>
107 <p>If you have trouble with the upgrade, visit <a target="_top" href="http://moodle.org/">moodle.org</a>
108 and post on the <a target="_top" href="http://moodle.org/mod/forum/view.php?id=28">Installation
109 Support Forum</a> in the Using Moodle course.</p>
110 </blockquote>
111 <p>&nbsp;</p>
112 <p>&nbsp;</p>
113 <p align="center"><font size="1"><a href="." target="_top">Moodle Documentation</a></font></p>
114 <p align="center"><font size="1">Version: $Id$</font></p>
116 </body>
117 </html>