Project:Support desk
(Read this message in a different language)
See also
Before you post
- Check the FAQ and Errors and symptoms.
- If your question is about a specific feature, check the relevant technical manual, end-user help or extension page and consider asking on its talk page.
- For issues about the mediawiki.org website, report to Village Pump instead.
- Ask technical questions about Wikimedia websites on meta:Tech instead.
Post a new question
- To help us answer your questions, please indicate which version of MediaWiki you are using, as found on your wiki's Special:Version page:
- If possible, add
$wgShowExceptionDetails = true;error_reporting( -1 );ini_set( 'display_errors', 1 );to LocalSettings.php in order to make MediaWiki show more detailed error messages. - Please include the web address (URL) to your wiki if possible. It's often easier for us to identify the source of the problem if we can see the error directly.
- To start a new thread, click the box with the text
Add topic.
How to migrate existing files to a different format while preserving file history?
[edit]Hello!
I have a fairly old wiki that is currently running MediaWiki 1.46.0. It contains a large number of old files with their own wiki history. Since there are quite a lot of these files now, I would like to migrate them to formats that can reduce their file sizes and save storage space.
Are there any ways to migrate, for example, from PNG to WebP? (There are more possible source formats, and the target format is not important at this point.)
I have tried the following approaches, but neither worked:
1. Temporarily moving File:image.png to File:image.webp is not possible, as it results in an error stating that the file extension does not match its contents:
You do not have permission to move this page, for the following reason: The new file extension does not match its type.
2. Uploading a WebP file to the server as a new version of File:image.png also does not work:
File extension ".png" does not match the detected MIME type of the file (image/webp).
I would appreciate any information on how to migrate existing files to newer formats while preserving their file histories, as well as any advice on how this could be done in bulk.
Thank you! ~2026-48657-84 (talk) 18:52, 8 September 2026 (UTC)
- I wonder whether you could turn MIME type checking off. See Manual:MIME type detection and Manual:Configuring file uploads. The latter mentions Manual:$wgStrictFileExtensions which led me to Manual:$wgCheckFileExtensions, which in turn led me to Manual:$wgVerifyMimeType! Then upload the new file, then move/rename the wiki page (if that's not done automatically). Jonathan3 (talk) 18:59, 11 September 2026 (UTC)
- Hi! First of all, sorry for replying so late, but thank you for your answer, and what surprised me is that it is the only answer here to a question that would seem rather trivial!
- I temporarily set all three variables to
false, and it does indeed work, although for some reason thumbnails are still reported as unsupported (I simply did a test manual reupload of the original PNG converted to WebP) -- I need to investigate why exactly WebP thumbnails are not yet working. - I only have one question, or rather a request for advice. Considering that I have a fairly large number of PNG files, is there any way this could be automated somehow, at least at the reupload level? (I will fix the links within the wiki manually as that part is not too difficult.) ~2026-48657-84 (talk) 13:00, 17 September 2026 (UTC)
- I've realized another issue: as I now see it, uploading a new version of a file to the server would actually mean losing the ability to preserve its history per se. The reason is that deleting the previous file versions essentially destroys that history, creating the illusion that the image itself (not this particular file, but the image as such) first appeared here "now" (just because I just uploaded a new version of the file) rather than, say, back in 2010.
- So, it seems that what I'm actually looking for is not so much a way to reupload a file, but rather a way to replace the blob of an already existing file. I'm not sure this is even possible in MediaWiki, and, judging by the looks of it, it would require some sort of intervention in the database -- essentially, hacking it. ~2026-48657-84 (talk) 14:41, 17 September 2026 (UTC)
Manual:Security --> == Upload security ==
[edit]Hi,
before T:89 some tag <translate></translate> seems to be missing as showed below:
thanks
>If you receive an error when reloading Apache with the config and the error log says "Invalid command 'Header'" you may need to enable the headers module. You can do so by running a2enmod headers.<
Regards GpieroMW (talk) 16:15, 13 September 2026 (UTC)
How I can modify the skin-specific styles, or interface texts
[edit]I have been working on my Miraheze Maimai Wiki, and I'm currently configuring interface visuals.
I've edited MediaWiki:Copyright-footer, but it affects all skins including Citizen which the wiki is also using. I want the content in MediaWiki:Copyright-footer to show fully on Vector 2022, but only show the license line on Citizen (hiding the additional Sega disclaimer).
How can I set skin-specific styles or footer content so they don't affect each other?
Here's an example of what I'm trying to achieve: https://ibb.co/Pvy3sSbC.
Thanks.—Chernobox (talk) 09:55, 18 September 2026 (UTC)
- Oh, I've found the solution, THX — Chernobox (talk) 10:46, 20 September 2026 (UTC)
- For posterity, the answer was to enclose the text in a span tag then hide it per skin by CSS. See https://maimai.miraheze.org/wiki/MediaWiki:Copyright-footer?action=edit and https://maimai.miraheze.org/wiki/MediaWiki:Citizen.css. Jonathan3 (talk) 20:19, 20 September 2026 (UTC)
- Thank you. Chernobox (talk) 01:12, 27 September 2026 (UTC)
- For posterity, the answer was to enclose the text in a span tag then hide it per skin by CSS. See https://maimai.miraheze.org/wiki/MediaWiki:Copyright-footer?action=edit and https://maimai.miraheze.org/wiki/MediaWiki:Citizen.css. Jonathan3 (talk) 20:19, 20 September 2026 (UTC)
TOPLEVELPAGE from Subpage Fun suddenly stopped working
[edit]I'm an editor on AllTheTropes.org which is part of Miraheze and on MediaWiki 1.46.0 (93bcca0).
Miraheze updated to the new version yesterday. We use Extension:Subpage Fun heavily because of the format of our wiki, and it's suddenly no longer working: it's transcluded in, among other things, our Recapfooter template, and I realized around midday today that when you save a page that includes that template, Template:TOPLEVELPAGE is coming up redlinked as Template:TOPLEVELPAGE. StarSword (talk) 03:06, 25 September 2026 (UTC)
Infobox bug in mobile
[edit]on the mobile page the infoboxes are collapsed by default and cannot be expanded in any way. how can i fix this? it only happens on mobile and it didn’t happen before Frenkino (talk) 12:18, 28 September 2026 (UTC)
Fatal exception of type "Wikimedia\Rdbms\DBQueryError"
[edit]I was going to edit Himouto! Umaru-chan Wiki as usual, but unable to do due to a message appear like this:
[bc3a0d5b7f9d6fc98273eb7b] 2026-09-28 15:22:50: Fatal exception of type "Wikimedia\Rdbms\DBQueryError"
I don't know where's the place of the problem, and please don't tell me that the solve is in LocalSetting.php. I only had a phone and edit the wiki with it all the time. — Quokrom (talk) 15:58, 28 September 2026 (UTC)
Parsoid
[edit]i want to use parsoid in a PHP file. Can you show me how to? For example ~2026-52165-08 (talk) 04:53, 29 September 2026 (UTC)