r69195 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69194‎ | r69195 | r69196 >
Date:18:46, 8 July 2010
Author:demon
Status:ok
Tags:
Comment:
Tweaks to UPGRADE and INSTALL instructions. Include new info about new-installer, remove some redundant sections
Modified paths:
  • /trunk/phase3/INSTALL (modified) (history)
  • /trunk/phase3/UPGRADE (modified) (history)
  • /trunk/phase3/includes/installer/Update.php (modified) (history)

Diff [purge]

Index: trunk/phase3/UPGRADE
@@ -53,6 +53,24 @@
5454 You will need to have $wgDBadminuser and $wgDBadminpassword set in your
5555 LocalSettings.php, see there for more info.
5656
 57+==== From the web ====
 58+
 59+You will need to temporarily remove LocalSettings.php. This is to keep people
 60+from accessing the installer. Keep a backup copy of LocalSettings.php somewhere
 61+safe
 62+
 63+If you browse to the web-based installation script (usually at /config/index.php)
 64+from your wiki installation you can follow the script and upgrade your database
 65+in place.
 66+
 67+You may change some settings during the install, but be very careful!
 68+Changing the encoding in particular will generally leave you with a
 69+lot of corrupt pages, particularly if your wiki is not in English.
 70+
 71+Once you are done, you can move LocalSettings.php back to its proper place.
 72+
 73+==== From the command line ====
 74+
5775 From the command line, browse to the "maintenance" directory and run the
5876 update.php script to check and update the schema. This will insert missing
5977 tables, update existing tables, and move data around as needed. In most cases,
@@ -176,34 +194,6 @@
177195 should be replaced with:
178196 $wgMainCacheType = CACHE_MEMCACHED;
179197
180 -
181 -=== Web installer ===
182 -
183 -You can use the web-based installer wizard if you first remove the
184 -LocalSettings.php file; be sure to give the installer the same
185 -information as you did on the original install (language/encoding,
186 -database name, password, etc). This will also generate a fresh
187 -LocalSettings.php, which you may need to customize.
188 -
189 -You may change some settings during the install, but be very careful!
190 -Changing the encoding in particular will generally leave you with a
191 -lot of corrupt pages, particularly if your wiki is not in English.
192 -
193 -=== Command-line upgrade ===
194 -
195 -Additionally, as of 1.4.0 you can run an in-place upgrade script from
196 -the command line, keeping your existing LocalSettings.php. This requires
197 -that you set $wgDBadminuser and $wgDBadminpassword with an appropriate
198 -database user and password with privileges to modify the database structure.
199 -
200 -Once the new files are in place, go into the maintenance subdirectory and
201 -run the script:
202 -
203 - php update.php
204 -
205 -See caveats below on upgrading from 1.3.x or earlier.
206 -
207 -
208198 == Backups! ==
209199
210200 To upgrade an existing MediaWiki installation, first BACK UP YOUR WIKI!
@@ -227,7 +217,6 @@
228218 For general help on pg_dump:
229219 http://www.postgresql.org/docs/current/static/app-pgdump.html
230220
231 -
232221 == Caveats ==
233222
234223 === Postgres ===
@@ -237,7 +226,6 @@
238227 so you will need to at least use the update.php or web installer,
239228 as described above.
240229
241 -
242230 === Upgrading from 1.4.2 or earlier ===
243231
244232 1.4.3 has added new fields to the sitestats table. These fields are
Index: trunk/phase3/includes/installer/Update.php
@@ -43,7 +43,7 @@
4444 protected function loadUpdates() {
4545 foreach( $this->updater->getUpdates() as $version => $updates ) {
4646 $appliedUpdates = $this->getAppliedUpdates( $version );
47 - if( !$appliedUpdates || count( $appliedUpdates ) != count( $updates ) ) {
 47+ if( !$appliedUpdates || $appliedUpdates != $updates ) {
4848 $this->updates[ $version ] = $updates;
4949 }
5050 }
Index: trunk/phase3/INSTALL
@@ -6,8 +6,11 @@
77 "in-place", as long as you have the necessary prerequisites available.
88
99 Required software:
10 -* Web server with PHP 5.x or higher.
11 -* A MySQL server, 4.0.14 or higher OR a Postgres server, 8.1 or higher
 10+* Web server with PHP 5.1.x or higher.
 11+* A SQL server, the following types are supported
 12+** MySQL 4.0.14 or higher
 13+** PostgreSQL 8.1 or higher
 14+** SQLite
1215
1316 MediaWiki is developed and tested mainly on Unix/Linux platforms, but should
1417 work on Windows as well.

Status & tagging log