Project:Support desk

Jump to navigation Jump to search

About this board

Welcome to the MediaWiki Support desk, where you can ask MediaWiki questions!

(Read this message in a different language)

See also

Before you post

Post a new question

  1. To help us answer your questions, please indicate which versions you are using, as found on your wiki's Special:Version page:
    • MediaWiki version
    • PHP version
    • Database type and version
  2. 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.
  3. To start a new thread, click "Start a new topic".

Is this a valid way to wipe and restore my entire wiki?

RedKnight7 (talkcontribs)

Hi, I have a tiny personal wiki that only I can edit. Yesterday I invited somebody else to edit it; that worked fine. But I made the mistake of leaving Account Creation on overnight and got over a hundred new spam accounts and pages (details here).

Fortunately, I archived my whole wiki just prior to turning on Account Creation. Rather than dealing with all the new bogus users and pages (and clutter in my logs and histories for an otherwise very clean site), I'm considering just restoring from the archive. And then use copies of the few changes that that one guest editor did, for them to apply again.

Could some kindly expert here tell me if these steps will work?

I have been bit many times by simple-looking operations actually going way south and taking days to recover from. This one sounds like it's asking for it!

My host provider is SiteGround. I used their Site Tools and its File Manager to make a .zip of my wiki, specifically, the public_html, logs, and webstats folders. (Not anything else at a "higher" level!) It's an 820 MB zip; my site is pretty small.

IF this is easy, I imagine I only need to:

  1. First, make a copy of the four pages that the one legit editor worked on. The entire contents of them.
  2. Delete the three folders (public_html, logs, and webstat).
  3. Unzip my mediawiki archive to the same place (root wiki.[my site]).

In theory this should restore it to as it was before, right? Nothing else needed? No "sync" problems somehow? (Though I might need to clear all my PC's browser cookies for my site.)

Then for the legit user who only edited four pages:

  1. Work with them to have Account Creation open for a brief period, and let them make an account. Then turn it back off again.
  2. Let them (the new user) replace the four pages with the backups I made.

Since I got copies of the four pages, if they replace the entire page, then all changes will show up as edits they made, right? One of the four pages was their User page (completely new), but the other three were edits here and there on existing pages.

The only thing I can think of that will be lost with this approach is that instead of all their individual edits showing up as they did them the day (yesterday), they'd all now show up as one big edit by them for each page, as of the time they copy in the backup of each page (the one that included their edits from yesterday). We can live with that. Fortunately, they're pretty understanding.

Many thanks if you can help. Wow this is all so much more work than I ever thought. It never ceases to amaze me how much, lol.

Bawolff (talkcontribs)

Page contents are stored in the database. It is unclear if your archive includes that, but it sounds like it might not.

P.s. there is also a feature where if you go to special:createaccount when loggged in as admin,you can invite someone by email (assuming email enabled) without opening it to the world.

RedKnight7 (talkcontribs)

Hi, after researching the wiki database (and still feeling unsure), ultimately I just went with using my site host's Backup And Restore tool, which applies to the entire site. I hadn't thought of this at the time I wrote the OP above; I was hoping there might be a simple Yes to my question.

Fortunately it's a tiny wiki and there were only 5 pages that had been changed, so I just saved their source before backing up. Everything seems to have worked fine. I didn't even need to wipe the cookies and cache on my browser PC.

Also: Many thanks for mentioning Special:CreateAccount. I didn't know about it; it's easy to get lost in all the google results and MW Manual pages that list every possible option. By using it, I didn't even have to expose the Account Creation link.

I'm kind of shocked that spammers found it and started abusing my site within 15 minutes. The analytics for my site show a sudden spike in access from Latvia, haha

Reply to "Is this a valid way to wipe and restore my entire wiki?"

mediawiki trying to parse .png files?

3 (talkcontribs)

mediawiki is trying to parse a bunch of my .png files instead of just displaying the picture....any thoughts?

Bawolff (talkcontribs)

Why is that a problem? Can you define "parse", i suspect you mean something other than the usual definition. (talkcontribs)

Warning: Unexpected character in input: '�' (ASCII=28) state=0 in (removed).png on line 814

Parse error: in (removed).png on line 814

Reply to "mediawiki trying to parse .png files?"
BugDroid (talkcontribs)


I installed 3 wikis on my hostgator hosting:

on the first 2 I removed the folders docs, extensions, includes, languages, maintenance, resources, skins, tests and vendor; in order to save space, according to Manual:Wiki family/pl#Multiple wikis sharing common resources

now I should create symlinks and modifiy some configuration files. I`m not sure how to do this. IMHO the instructions on the page above are rather confusing. Can someone shine some light on this please?

BugDroid (talkcontribs)


Reply to "wiki family symlinks"
BugDroid (talkcontribs)


I set up a mediawiki on my hostgator account, unsing cPanel using Softaculous Apps Installer. So far so good

Now I am thinking to install also wikibase there, but with no success so far. Could this actually work?

I followed the instrctions but now mediawiki wont open anymore. I get:

Original exception: ... Error: Class 'DataValues\Deserializers\DataValueDeserializer' not found

Exception caught inside exception handler: ... Error: Class 'Diff\Differ\MapDiffer' not found

Reply to "Wikibase on cPanel"

How to update PHP to version 7.4.3?

Newman2 (talkcontribs)

Yesterday, I configured a skin that is requires PHP versions 7.4.3 and up. My current PHP version is 7.3.33; the problem is that I don't know how to update to the latest version of PHP.

Can anyone explain this?

Bawolff (talkcontribs)

Depends on your operating system/linux distro (please say which one). If its a shared host you might not even be allowed to.

Newman2 (talkcontribs)

I am using Windows 10.

Reply to "How to update PHP to version 7.4.3?"

How to embed and load a PHP webpage in a MediaWiki webpage?

2 (talkcontribs)

MediaWiki 1.36.1.

I have an empty MediaWiki webpage in which I want to embed and load a PHP file.

  • I tried to do so with XMLHttpRequest but the CSS wasn't loaded
  • I tried to do so with iframe but it was rendered awfully and I didn't have time to keep "playing" with the iframe tags (unique?) attributes
  • I can link to the PHP webpage directly from the sidebar menu but than it would be a standalone webpage lacking all the graphics coming with my MediaWiki theme (logo, etc.) which I don't want

Perhaps fetch is better than XMLHttpRequest (I didn't try).

Anyway, how would you embed and load a PHP file in a MediaWiki webpage?

Bawolff (talkcontribs)

You could make a custom special page: manual:special pages

The other major option are iframes. Remember that iframes can only access cookies that are marked SameSite=none and have the secure flag. The only attributes you really need src, and maybe border=0. And width/height.

Reply to "How to embed and load a PHP webpage in a MediaWiki webpage?"
Highlander2021 (talkcontribs)

Hi, I have just started a new page called Central Highlands Rugby League. I think I posted it in the wrong place(mediawiki). It is a amatuer sports page so I wanted it to go in the main wiki page, have i got the right or wrong? If its wrong how do i get it to wiki main page? Thanks

Clump (talkcontribs)

How to insert templates on bottom of every page?

Gaon12 (talkcontribs)

I want to insert templates on bottom of every pages.

However, I would like to exclude some pages. For example, document Front Page.

What should I do?

Reply to "How to insert templates on bottom of every page?"

How to start a conversation like this at the end of page or article

Nivek2046 (talkcontribs)

Hi! I am new here. I have not installed any MediaWiki yet.

Are the following things possible?

(1) at the end of a wiki article or page to have a conversation thread just like what we are doing right now?

(2) in the middle of an article or page to have a conversation thread?

(3) let individual users make comments like youtube, the guardian, Financial Times, etc? Is that possible ? I presume this is only possible at the end of an article.

Thanks a million!

Reply to "How to start a conversation like this at the end of page or article"

Help! A bunch of new spam accounts!

RedKnight7 (talkcontribs)

Hi, I have a tiny personal wiki. I kept Account Creation off because I was the only person using it.

Yesterday I turned Account Creation on to let a bona fide colleague make an account and come edit.

This morning I looked at Recent Changes to see what they did and was shocked to find over a hundred new users and pages. 127 bogus new users in fact, over the course of 20 hours and 39 minutes (that's about 1 new user every 10 minutes).

At a glance, it looks like each one made one new page. All on ridiculous stuff like "Good Webpage Design Planning", "Ten Wonderful Led linear Light Hacks", "Hello I am a Danish female", User pages, Online Slot Tournaments ... you name it.

As soon as I saw what was happening, I turned off Account Creation a couple of hours ago. However there continue to be new pages added by the bogus accounts after I turned off Account Creation.

With over a hundred bogus accounts and pages, it would be a super hassle to individually revoke rights and delete users and pages.

Is there some way to do it en masse? Like a page that has a checklist, "delete this user and all edits and pages made by them?" Then I could just checkmark it for the 127 accounts. It would be great to simply remove all that b.s. from my logs and pages so it remains just "my" site when I look back on historical edit logs, etc.

When I google on this, the results are oriented toward non-tiny sites trying to keep spam on their site to a minimum. I don't see anything oriented toward "how to kill a lot of users and their pages all at once".

A quick reply will be appreciated. :-)

P.S. I am using MW v. 1.35.1. I did a backup of my wiki folders shortly before turning on account creation. I guess I could restore that but I'm not sure I'd do it right. Plus I'd have to tiptoe all around the new bona fide edits made by my colleague (on maybe 8 pages). Not impossible, but a hassle plus quite embarrassing to me for this person who kindly volunteered to help me with some pages. "No wait - stop editing, stop editing! Make your account again! Make all your changes again!", lol

Clump (talkcontribs)
RedKnight7 (talkcontribs)

That looks enticing but it only applies to deleting pages, not users themselves. Also it doesn't remove the pages from history.

Still it's much better than doing it all manually. I thank you for that.

Clump (talkcontribs)
Jonathan3 (talkcontribs)
Reply to "Help! A bunch of new spam accounts!"