Topic on Project:Support desk

Moving MediaWiki from Linux to Windows and updating

9
80.147.223.128 (talkcontribs)

Hi! Currently I host my MediaWiki on an Ubuntu Server. I would like to Upgrade the wiki to the 1.32 Version and move it to my Windows Server.

What I tried doing was creating a new Wiki on the Win-Server, creating a dump from mysql of the Linux Server and importing it manually to the new db (since phpmyadmin Import did not want to work). Changed the Settings so that they link to the new database but in the end it did not work.

Is there a proper way to migrate from Linux to Windows and upgrade? Did anyone already do this?

Osnard (talkcontribs)

Actually your approach seems to be correct. I have moved a lot of wikis between different servers (even Linux to Windows and vice versa) with that procedure:

  1. Dump database using mysqldump CLI tool on source server
  2. Copy over complete codebase + all configuration files (e.g. LocalSettings.php) from source to destination server
  3. Import database using mysql CLI tool on destination server
  4. Maybe adapt configuration redarding database ($wgDB*) and server ($wgServer)
195.85.237.130 (talkcontribs)

I am getting following Error:


Fatal error: Uncaught TypeError: Argument 1 passed to MWExceptionHandler::report() must be an instance of Exception, instance of Error given, called in C:\xampp\htdocs\wiki\includes\Exception.php on line 569 and defined in C:\xampp\htdocs\wiki\includes\Exception.php:482 Stack trace: #0 C:\xampp\htdocs\wiki\includes\Exception.php(569): MWExceptionHandler::report(Object(Error)) #1 [internal function]: MWExceptionHandler::handle(Object(Error)) #2 {main} thrown in C:\xampp\htdocs\wiki\includes\Exception.php on line 482


Since it was not me who originally made our Wiki, I do not know much about it. On the Linux server there is obviously a folder called "Wiki" in the www and a folder called WikiMedia in the var/data (Does anyone know what that Folder does and where I need to set a Path to it in the LocalSettings.php?)

195.85.237.130 (talkcontribs)

Okay. To update this. What I actually did now was create a fresh wiki (1.32) on windows and then start the config file again with the Database from my Linux that I dumped. The config saw that it was another version and updated it. After the update, I got all the pages as they are on the Linux wiki, just that they all DO NOT HAVE any text. I literally got every page but blank. I ran the update.php script, which walked through for about 15 minutes and finished successfully but the text is still not there.


What is wrong with the db, how can I restore my text?

AhmadF.Cheema (talkcontribs)

When you click on "Edit" for a page, is the text content visible there, or is it absent from there too?

195.85.237.130 (talkcontribs)

I cannot see any Edit option. We do have a lot of link to projects on the left side but when I click on those, it tells me that there is no text and that I could create the page.

Further down it displays a lot of <charinsert> and some errors.

195.85.237.130 (talkcontribs)

Alright, so I tried some things out and it seems to be better now. My procedure was the following:


- Create Database Dump from Linux and move it to the Windows Server

- Set up XAMPP on Windows and start a Mediawiki 1.32 installation

- After the fresh wiki is set up, remove the LocalSettings.php so it will forward you to the mw-config page

- Create a new Database and Export the SQL-Dump into it

- Proceed with the setup and give your new created database in the setup

- Mediawiki should recognise, that the Database is outdated (which in my case was the older Linux Version) and upgrade it automatically


//After the Setup, I was not able to see any content which was because of outdated extensions (or extensions that have not been setup correctly)

- After setting up extensions, I was able to see the content again


//Now there are a lot of Pages which have broken File Paths (need to figure out how to fix that)

Ciencia Al Poder (talkcontribs)

If you have persistent cached enabled, either on database or filesystem, it's very advisable to clear it. For example, truncate the objectcache table and the contents of the /cache folder.

Osnard (talkcontribs)

The error "Fatal error: Uncaught TypeError: Argument 1 passed to MWExceptionHandler::report() must be an instance of Exception, instance of Error given, called in" sounds like an issue with the PHP version. Which version of PHP are you using?

Reply to "Moving MediaWiki from Linux to Windows and updating"