Moving mediawiki installation to a different host
From Foochal
Contents |
[edit]
Move the mediawiki directory
Use scp or rsync to copy the old mediawiki directory to the new host.
[edit]
Move the database
[edit]
On your old host
- Backup the database on your old host
mysqldump mediawiki_dbname > mediawiki_backup.sql
- Transfer the backup file, via scp or rsync to the new host
[edit]
On your new host
- Create the wiki user on your new host. You can find the wiki user name and password in the mediawiki LocalSettings.php file.
GRANT ALL PRIVILEGES ON *.* TO 'mediawiki_user'@'localhost' IDENTIFIED BY 'mediawiki_password' WITH GRANT OPTION;
- Create the new wiki database
create database mediawiki;
- Restore the database from the backup from
mysql --user root -p -h localhost mediawiki < mediawiki_backup.sql
[edit]
Copy apache httpd.conf settings
- If you are using a virtual server for your wiki installation, copy the relevant lines from your apache httpd.conf file to your apache on your new host.
- Restart apache
[edit]
DNS changes
Change any DNS entries to make them point to your new wiki. DNS changes usually take at least a few hours to propagate and you might want to disable your wiki via your old apache config and start redirecting to the new host in the meantime.

