From a6adeead804f46dac0376c50eaf57bedf78a7311 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Thu, 8 Jul 2010 18:46:10 +0000 Subject: [PATCH] Tweaks to UPGRADE and INSTALL instructions. Include new info about new-installer, remove some redundant sections --- INSTALL | 7 +++-- UPGRADE | 48 +++++++++++++---------------------- includes/installer/Update.php | 2 +- 3 files changed, 24 insertions(+), 33 deletions(-) diff --git a/INSTALL b/INSTALL index e5bf0c116e..6682d4afee 100644 --- a/INSTALL +++ b/INSTALL @@ -6,8 +6,11 @@ Starting with MediaWiki 1.2.0, it's possible to install and configure the wiki "in-place", as long as you have the necessary prerequisites available. Required software: -* Web server with PHP 5.x or higher. -* A MySQL server, 4.0.14 or higher OR a Postgres server, 8.1 or higher +* Web server with PHP 5.1.x or higher. +* A SQL server, the following types are supported +** MySQL 4.0.14 or higher +** PostgreSQL 8.1 or higher +** SQLite MediaWiki is developed and tested mainly on Unix/Linux platforms, but should work on Windows as well. diff --git a/UPGRADE b/UPGRADE index 7f6701e579..9977e1a1a1 100644 --- a/UPGRADE +++ b/UPGRADE @@ -53,6 +53,24 @@ deleted file archives, and any custom skins. You will need to have $wgDBadminuser and $wgDBadminpassword set in your LocalSettings.php, see there for more info. +==== From the web ==== + +You will need to temporarily remove LocalSettings.php. This is to keep people +from accessing the installer. Keep a backup copy of LocalSettings.php somewhere +safe + +If you browse to the web-based installation script (usually at /config/index.php) +from your wiki installation you can follow the script and upgrade your database +in place. + +You may change some settings during the install, but be very careful! +Changing the encoding in particular will generally leave you with a +lot of corrupt pages, particularly if your wiki is not in English. + +Once you are done, you can move LocalSettings.php back to its proper place. + +==== From the command line ==== + From the command line, browse to the "maintenance" directory and run the update.php script to check and update the schema. This will insert missing tables, update existing tables, and move data around as needed. In most cases, @@ -176,34 +194,6 @@ If using Memcached, you must enabled it differently now: should be replaced with: $wgMainCacheType = CACHE_MEMCACHED; - -=== Web installer === - -You can use the web-based installer wizard if you first remove the -LocalSettings.php file; be sure to give the installer the same -information as you did on the original install (language/encoding, -database name, password, etc). This will also generate a fresh -LocalSettings.php, which you may need to customize. - -You may change some settings during the install, but be very careful! -Changing the encoding in particular will generally leave you with a -lot of corrupt pages, particularly if your wiki is not in English. - -=== Command-line upgrade === - -Additionally, as of 1.4.0 you can run an in-place upgrade script from -the command line, keeping your existing LocalSettings.php. This requires -that you set $wgDBadminuser and $wgDBadminpassword with an appropriate -database user and password with privileges to modify the database structure. - -Once the new files are in place, go into the maintenance subdirectory and -run the script: - - php update.php - -See caveats below on upgrading from 1.3.x or earlier. - - == Backups! == To upgrade an existing MediaWiki installation, first BACK UP YOUR WIKI! @@ -227,7 +217,6 @@ option to 'latin1' to avoid the conversion. For general help on pg_dump: http://www.postgresql.org/docs/current/static/app-pgdump.html - == Caveats == === Postgres === @@ -237,7 +226,6 @@ not apply. The schema was changed significantly from 1.7 to 1.8, so you will need to at least use the update.php or web installer, as described above. - === Upgrading from 1.4.2 or earlier === 1.4.3 has added new fields to the sitestats table. These fields are diff --git a/includes/installer/Update.php b/includes/installer/Update.php index ad240bfba7..3192c9e747 100644 --- a/includes/installer/Update.php +++ b/includes/installer/Update.php @@ -43,7 +43,7 @@ class Update { protected function loadUpdates() { foreach( $this->updater->getUpdates() as $version => $updates ) { $appliedUpdates = $this->getAppliedUpdates( $version ); - if( !$appliedUpdates || count( $appliedUpdates ) != count( $updates ) ) { + if( !$appliedUpdates || $appliedUpdates != $updates ) { $this->updates[ $version ] = $updates; } } -- 2.20.1