Migrating media wiki sites to a new webhost

Wiki Migration from Server A to Server B (for all the four wikis)

1) In Server A, run the backup scripts to obtain the latest backups. They include the archives of files folder and database. Downloads these zip files and upload the backups to a temporary location on server B.

2) In Server B, install a copy of MediaWiki via the one click installer.

3) In Server B, note down the database and user account corresponding to the MediaWiki install.

4) Delete this database, and recreate it (so that it is an empty database now.) Again give the same user all privileges on this database.

5) Import the database associated with the backup into the empty database.

6) Modify LocalSettings.php in Server B’s install to match that of Server A’s corresponding wiki keeping it as a baseline. Specifically, the things to be changed are :

Include the extensions that are to be enabled
Enable the cache
Other things such as database details, server URL must not be changed as they are now specific to this newly installed instance and break the site if changed. All other non-specific details must be included.

7) Copy extensions (if any) from the backup’s extension folder to the Server B’s wiki’s extension folder. Also do the same with upload folder, and any pertinent folders discovered.

8) Finally the site, database and extensions must be made to work together by running the update.php script in maintenance folder of the wiki install in server B from the command line(shell access is needed for this, no need of sudo access). Also note that register_argc_argv must be set to true. This depends on site settings, but generally creating a php.ini with the register_argc_argv set to true solves the problems.