Topic on Manual talk:RebuildImages.php

rebuildImages or importImages?

3
Pmarfell (talkcontribs)

I have a new wiki created with pages populated by Special:export/import from an older wiki on the same server/domain, this includes the File: pages. The new wiki $wgUploadPath and $wgUploadDirectory parameters in LocalSettings.php point to the same location as the images for the old wiki but images are not displayed. I was thinking importImages.php might have been the way to go but if I am reading things right running "php /maintenance/rebuildImages.php --missing" from the new wiki install directory will populate the images table where there is a match from the File: page to an image. When I get rid of the old wiki I will be leaving the images location untouched so the new wiki can continue using it.

Pmarfell (talkcontribs)

I have now got the host to run rebuildImages.php on the wiki where the UploadPath contains the images that I want in the wiki that match the File: pages already imported - run with options --missing --dry-run and get 870 lines similar to

mwstore://local-backend/local-public/0/00/EastShelterArch.jpg

This number matches the number of File: pages I imported but what does it mean? The text mwstore does not occur anywhere in rebuildImages.php so I don't know what has caused it to be output. What is /local-backend/local-public/? I can see in the file system that in /wikiimages there is a file /0/00/EastShelterArch.jpg. I can also see that I imported a File: page called File:EastShelterArch.jpg

I will now ask my host to run the script without the --dry-run option.

Pmarfell (talkcontribs)

Running php ./maintenance/rebuildImages.php --missing did what was needed. It created entries in the images table where there was no existing entry to match the imported File: page and the existing image file on the file system. Which in my case was all of them. Images now display in the wiki.

Reply to "rebuildImages or importImages?"