Hi,
has anyone upgraded from mediawiki 1.6.8 to the newest version 1.11.0 and changed from mysql 4.1 to msyql 5.0 and php4.3 to php5.2.
I have a new server and I will copy my wiki files and the database files to the new server. Then install mysql which should automatically upgrade the tables to version 5. copy the upgrade files to my wiki. doing the upgrade like described in the upgrade manual.
Do you have any recommendations for me?
Thanks,
Achim
I have done the same move of wikis to a new server (Redhat EL3 with mysql 4.1 to RedHat EL4 and mysql 5.1) and updated the wikis (1.6.10 -> 1.11.0). Here is my procedure much of it derived from these web sites: http://www.mediawiki.org/wiki/Manual:Moving_a_wiki http://www.mediawiki.org/wiki/Manual:Upgrading_to_1.9
On the Old Server:
First the database must be locked to prevent updates during the migration. -You can also rename the wiki's directory so the wiki disappears from the users. -You can also uncomment the $wgReadOnly line in LocalSettings.php to make the wiki readonly with a message specified on the $wgReadOnly line that a user will see when they try to edit. This is probably the best method. -Backup the wiki's database. -Backup the wiki's MediaWiki files in the wiki's directory (e.g., in /var/www/html/wikidir). -tar -cvf /tmp/wikidir.tar wikidir
On the New Server:
Create a new MySQL database and user and grant that user permissions on the database (SELECT, INSERT, UPDATE and DELETE), then import the backed up database into MySQL. -Login with sufficient priviledge. -CREATE DATABASE database_name; -USE database_name; -CREATE USER db_username@machine_name (CREATE USER db_username if your database is on the same server); -SET PASSWORD FOR db_username@machine_name = password('password'); -GRANT select,insert,update,delete ON database_name.* TO db_username@machine_name
Import the database backup file into the database. (This may take some time depending on the size of the database): On the New Server give either of the commands: mysql -u db_username -p -h database_server_name -e "source Wiki_DB_Backup_file.sql" database_name; ---or--- mysql -u db_username -p -h database_server_name database_name < Wiki_DB_Backup_file.sql; Each command will ask for the db_username password.
FTP the wiki directory's tar file into the web root (e.g., /var/www/html). -cd /var/www/html -ftp old-server -get /tmp/wikidir.tar -Unpack the wiki tar file -tar -xvf wikidir.tar -You should now have the directory /var/www/html/wikidir on the New Server. -copy LocalSettings.php to preserve it (e.g., cp LocalSettings.php LocalSettings.php.orig)
Check the following in LocalSettings.php and set appropriately (when copying from the old server to the new server only the $wgScriptPath needed to be modified): -$IP -$wgScriptPath -$wgDBserver -$wgDBuser -$wgDBpassword
Upgrade the Wiki Code: In the mediawiki directory (/var/www/html/wikidir), delete all files and directories EXCEPT: -extensions/ -images/ -LocalSettings.php -.htaccess (if it exists) -Adminsettings.php (if it exists) Rename the wiki directory: -mv wikidir wikidir.old Unpack the latest release of MediaWiki into the a mediawiki directory of the same name. -mkdir /var/www/html/wikidir -cp mediawiki.latest.tar.gz /var/www/html/wikidir -Unzip and untar the mediawiki tarball. -Copy everything in /wikidir.old into /wikidir -cp -r /var/www/html/wikidir.old/* /var/www/html/wikidir -Check permissions on the new mediawiki directory (/var/www/html/wikidir) and its files. -config directory should be mode 700. -images directory should be mode 777. Check LocalSettings.php and set any changes made to the database (name, username, etc..), especially: -$IP -$wgScriptPath -$wgDBserver -$wgDBuser -$wgDBpassword You may also want to check other paths to things like "diff" and "ImageMagick". Update any extensions. Look for any other changes made to the wiki, such as changes to monobook or other Mediawiki software.
Update the DB: If Adminsettings.php does not exist, rename AdminSettings.sample to AdminSettings.php Modify AdminSettings.php to set the database admin user and admin password to the admin user and password for the DB server. Run the update script to update the database: -php /var/www/html/wikidir/maintenance/update.php For a simple DB this takes about 2-3 minutes. It is also recommended to refesh the links between various articles inside the wiki. -php refreshLinks.php
Test the new wiki. When satisfied the new wiki works properly, remove the wikidir.old directory and all of its contents, or save it somewhere else for safe keeping if desired.
Hope this helps. It works for me... -Jim
-----Original Message----- From: Achim Stumpf [mailto:newgrp@gmx.net] Sent: Thursday, October 25, 2007 4:24 AM To: mediawiki-l@lists.wikimedia.org Subject: [Mediawiki-l] Upgrade mediawiki 1.6.8 to PHP5.2 and mysql 5.0
Hi,
has anyone upgraded from mediawiki 1.6.8 to the newest version 1.11.0 and changed from mysql 4.1 to msyql 5.0 and php4.3 to php5.2.
I have a new server and I will copy my wiki files and the database files to the new server. Then install mysql which should automatically upgrade the tables to version 5. copy the upgrade files to my wiki. doing the upgrade like described in the upgrade manual.
Do you have any recommendations for me?
Thanks,
Achim
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org