How do I restore MediaWiki images withut command line access?

1

I got the same question than How do I restore the images from a MediaWiki backup?, but without command line access !

Practically, I got a 1.18.? MW install totally crashed, outputting PHP errors. I can display pages and for instance make XML exports, and I got a full backup of both database and httpdocs folder.

... but no access to the server command line, so the scripts described in the quotes answer won't work for me !

I installed a brand-new 1.28.0 MW and successfully imported content and meta pages. Now what about the images ? I uploaded the original images folder and made sure the hash option was on, but to no avail...

Benoît ROBIN

Posted 2017-02-05T09:57:21.527

Reputation: 11

Answers

0

I found a quite satisfying answer using both the UploadLocal extension and the standard XML Import page.

The procedure is the following :

0/ Initial situation : you have image files in your old wiki's images folder, maybe hashed in several subfolders, and always including extra folders like archive, thumbs and temp...

1/ Regroup all your useful image files in just one folder

2/ Install UploadLocal extension (https://www.mediawiki.org/wiki/Extension:UploadLocal). Note that referencing that extension in LocalSettings.php must be done old style, with an include rather than by using with the 1.25.x+ wfLoadExtension function.

3/ Upload all your images in the $PI/extensions/UploadLocal/data/ folder

4/ Launch Special:UploadLocal : you should see a list of all your files. Confirm import and that's all !

5/ On some pages, I had a text description for the image, and I had to import them from my XML export.

Benoît ROBIN

Posted 2017-02-05T09:57:21.527

Reputation: 11