Project:Support desk

Jump to: navigation, search

About this board

vde   Welcome to's Support desk, where you can ask MediaWiki questions!

There are also other places where to askCommunication: IRCCommunication#Chat, mailing listsMailing lists, Q&A etc.

Before you post

Post a new question

  1. To help us answer your questions, please always indicate which versions you are using (reported by your wiki's Special:Version page):
    • MediaWiki
    • PHP
    • Database
  2. Please include the URL of your wiki unless you absolutely can't. It's often a lot easier for us to identify the source of the problem if we can look for ourselves.
  3. To start a new thread, click "Start a new topic".
By clicking "Add topic", you agree to our Terms of Use and agree to irrevocably release your text under the CC BY-SA 3.0 License and GFDL

Changing $wgserver is not updating the url for my wiki

11 (talkcontribs)

Hello there,

  • Apache/2.2.16 (Debian)
  • MySQL client version: 5.1.49
  • MediaWIki 1.20.3 (it appears)

So I have recently joined a volunteer group where I was to help develop and improve their wiki. On almost my first day the server partition (/var) where the wiki was being developed filled up. Talking the the server administrator caused me to now become the server administrator. I have experience coding but not with wiki's or with server administration.

Here is what I have done. I backed up the sql database, which in my case was called hertiage_media and created a duplicate of it, heritage_media_old. I took my site and changed the wgdbname from the former database to my heritage_media_old database. I then used rsync to duplicate the entire /var/www directory to /home/www where I have a lot more space to play. I then changed the wgserver on my first site from "" to "" and the used "" for the wgserver variable on my new, synchronized location at /home/www. Neither of the urls i have created work, and the original site url of "" is still there but with broken formatting.

What have I missed? I just want to get the wiki at the /home directory to work so i can delete the old directory at /var and get back to developing functionality.

Thanks for reading and for your help and time,

Trent (talkcontribs)

> Talking the the server administrator caused me to now become the server administrator.

Haha, I know that one!

MediaWiki configuration is only one part of your question.

If you have different folders, which both should be accessible from the web, then you need to configure Apache accordingly. Basically, you need a virtual host pointing to each of the two folders. That way, each of them should be available under _some_ URL.

Currently, I cannot call the URLs with "old" and "2" in it at all. I get a server error. No MediaWiki involved here. It seems, like the Apache configuration (or anything else, I am not an expert here) for these two virtual hosts is wrong. Or: Did you create Apache configuration for the according directories at all? (_Missing_ configuration could also be the reason for this.)

Coming to MediaWiki, the value of $wgServer always needs to be the URL, under which the page should be reachable. Basically for each host this is the URL, which you have configured in the Apache configuration. So in case of the URL _without_ old in it, this "old" also should not be in $wgServer.

For the URL _with_ old in its name, this "old" also needs to be in $wgServer.

Whytekong (talkcontribs)

Ok I was wondering about apache but don't really know wanything about it. So there would have originally been an apache configuration somewhere for the original site, if i find it and set the url to "old" like wgserver than that url should work. So then i would need to create and new apache configuration for the new location correct? Does it need to be in the same directory as the /www ?

Whytekong (talkcontribs)

Also the only place I can find an apache2.conf file is in /etc/apache2. Does that sound right? (talkcontribs)

> So there would have originally been an apache configuration somewhere for the original site, if i find it and set the url to "old" like wgserver than that url should work.

Yes, I think so. On the page, which currently is available under the URL _without_ old, $wgServer already seems to be set that way. At least certain internal links inside MediaWiki contain that "old" already.

> So then i would need to create and new apache configuration for the new location correct?

Right, I think what you want to create is a virtual host. Basically like the one, which currently is configured for the URL without "old" in it.

> Does it need to be in the same directory as the /www ?

The _configuration itself_ always needs to be stored at the place where such configuration is stored. I think that is in the same folder as the configuration of the other host is as well.

The _web root directory_ can then be anywhere. It can e.g. be /home/www while for the other virtual host it is somewhere different. It does not have to be the same folder as for the other host. (talkcontribs)

apache2.conf might be such a file. httpd.conf might be another file name. Also, there might be a folder called something like "sites-available". This might also be the place for the configuration. In order to take effect, changes to Apache configuration files usually need an Apache restart.

Whytekong (talkcontribs)

Ok i believe that i got my apache problems fixed. I believe that my virtual host is now pointing at my new website directory. Now im having an issue where when i upload files to my website, its saving the files at the old var/www directory.

Any thoughts?

Ciencia Al Poder (talkcontribs)

You may need to change other configuration settings in LocalSettings.php related to upload directory, etc

Whytekong (talkcontribs)

It doesn't look like there are any configuration settings in my LocalSettings.php related to upload directory. Just to enabling uploading and file extensions. Forgive the inexperienced question but how does MediaWiki upload? Does uploading files utilize mySql in anyway or does LocalSettings direct the uploads directly to /images? Would any of my extensions or mySql have a configuration option that would still be pointing back to /var/www/wiki/images instead of /home/www/wiki/images? (talkcontribs)

File uploads in fact use both: The file system _and_ the database. An overview is available here Manual:Configuring_file_uploads#Upload_directory. Especially $wgUploadPath will be the variable to look into.

Whytekong (talkcontribs)

Ok thanks. Ill take a look into this after work.

Reply to "Changing $wgserver is not updating the url for my wiki"

How to move from WikiMedia 1.25.2 to 1.26.2 WikiMedia ?

18 (talkcontribs)


I am currently on MediaWiki 1.25.2 and  I would like past 1.26.2, but I do not understand much. I am go to the Manual page: Update, but I not understand how to save and transfer files.

I'm Localhost and Wamp server

Could you please help me ? (talkcontribs)

You need a backup of two things: The files and the database.

Your server is stored somewhere on your computer. It has a subfolder called htdocs/. In this folder you will find the files, which you can access under localhost. These are the files, which you have to create a backup from.

You can for example create a zip archive out of this folder and store it at a save place. For the database, you can create a database dump with mysqldump or using PHPMyAdmin.

Later during the update you will start using the files of the new MediaWiki version. Since the files are on your local PC, you do not need wget, SCP, SSH or an FTP client. All these are only needed, if you have to store files on a different PC. In your case, you can just download the MediaWiki tarball and extract it into a new folder as described on the update page. Download the tarball with your webbrowser and extract it. (talkcontribs)

Thank you very much. I also have to keep the Local Setting? Is it normal that in the htdocs folder I have only one HTML page named Index and when I click it opens a web page and me mark "It Works" Last question, how much weighed the database file, I have .sql files a size of 771 bytes ,is that it may be just? (talkcontribs)

Yes, you also have to keep your LocalSettings.php file.

The HTML file is not what you are looking for. This file comes with the Apache webserver. It does not have to do with your MediaWiki installation. If this is the only file you have in that folder, then this is not the foldr, in which MediaWiki is installed.

700 bytes for the database is too small. Depending on what you have in your wiki, the database size might be somewhere between a few megabytes and several gigabytes. Maybe you have not backed up the right database. Reading the contents inside the dump file might tell you more. The size of the database mostly depends on how many revisions you have in it and on how long the text of each revision is. (talkcontribs)

Hi, thank you for your help.

The folders htdoc that I found and folder Wamp but in the folder there are only a html page that calls this index.

Regarding the database I took it from phpMyAdmin, how given the right saved the database? (talkcontribs)

Search your computer for a file named "LocalSettings.php". This is the main configuration file of MediaWiki. The folder in which you have this file is the folder, in which MediaWiki is installed.

Then open LocalSettings.php with a text editor and read its contents. It will contain PHP code. Somewhere in that file, there will be a variable named $wgDBname. The value, which is set in that variable, is the name of the database, which MediaWiki is using.

Sebunian (talkcontribs)

Thank you for your board. I found the name of the database, but via PHPMyAdmin, there's no database called as written in Localsetting file. To be more specific, the database in this Localsetting called "MyFirstWiki" but no database named "MyFirstWiki" in PHPMyAdmin. How it does what it?

Thank you (talkcontribs)

Your database name looks strange. Is that really the value from $wgDBname? Depending on the operating system, database names may or may not be case-sensitive. You are on Windows and there database names are case-insensitive. That means the casing of the letters is not relevant.

If you log in to PHPMyAdmin, make sure that you use the credentials of a MySQL user, who has access to that database. That should be working with the MySQL user root or with the username from $wgDBuser and the password from $wgDBpassword.

Sebunian (talkcontribs)

Thank you for your response. I'm SQLite, is that it can come of his? Here is what it says beneath "Database settings" in my LocalSettings

    1. Database settings

$wgDBtype = "sqlite"; $wgDBserver = ""; $wgDBname = "MyFirstWiki"; $wgDBuser = ""; $wgDBpassword = ""; (talkcontribs)

Yes, that is the reason why you don't find the database in MySQL. In that case you need to create a backup of the SQLite database.

How that works is e.g. explained here: (talkcontribs)

Ok, thank you for your help.

But I did not understand how backed up the database via the website you gave me.

Is there a simpler means? (talkcontribs)

Yes, if the database is _not_ in use currently, then you can also copy the database file. If there is not only the database file itself, but also a *-journal file or a *-wal file with the same name, then you should copy these files as well.

Sebunian (talkcontribs)

I'm really sorry, but I did not understand.

I'm sorry if I ask too many questions (talkcontribs)

You can just copy the sqlite file. (talkcontribs)

I have to copy the folder, SQLite, which is in the Wiki folder?

But the problem is that there are two SQLite folder in the folder my Wiki.

Should I copy the two? (talkcontribs)

You have to copy the database file. This file usually is located inside the SQLite data directory. This directory was set during installation of SQLite. In your case the file name in that directory should be MyFirstWiki.sqlite. (talkcontribs)

So I have to copy / paste the file .sqlite, LocalSetting.php and the Image folder and the Extension folder ?

In the first response I've had, someone told me that I had copied the folder /htdocs, do I have to do and where found? Because I have a folder /htdocs and full document .htdocs, than take?

And I also forgot to apologize to me , from the beginning, of my English . I use Google translation Because I 'm French . (talkcontribs)

> So I have to copy / paste the file .sqlite, LocalSetting.php and the Image folder and the Extension folder ?

Right and if you are using a special skin, then you will also have to paste the folder of that one skin from inside the skins/ folder. If you are using the Vector skin, then you do not have to do this. The Vector skin comes with MediaWiki by default.

These files, which you have to copy, are inside a folder, which is accessible from the web. Above you wrote that you have a folder with the LocalSettings.php file in it. This is the folder, of which you need a backup.

Reply to "How to move from WikiMedia 1.25.2 to 1.26.2 WikiMedia ?" (talkcontribs)

Is there a way for blocked accounts to have the 'read' permission revoked?

Ciencia Al Poder (talkcontribs)

no, and this would make no sense. Most you can do is create a new user group and revoke the read rights for it, and adding those blocked users to the new group, but that wouldn't make more sense anyway, since users can just logout to see the content (talkcontribs)

What Ciencia says is right. You would need a setup, where users cannot see anything, if they are not logged in. Otherwise it would not make sense to revoke read rights from certain accounts.

Reply to "Blocked users permissions"
Stefahn (talkcontribs)

I combined MediaWiki and WordPress: Every time a MediaWiki is created a WordPress page is created. This happens via the MediaWiki feed "new pages".

Now if a MediaWiki is moved, the new pagename is not listed in the feeds "new pages" and also not in the "recent changes" feed. Thus the moved page isn't created in WordPress.

Is there a way to add moved pagenames to any of the feeds? Or is there even a feed for moved pages?

Stefahn (talkcontribs)


Reply to "Feed should list moved pages"
RobinHood70 (talkcontribs)

When an admin has the time, can they please have a look at the page move requested here. Thanks!

Ciencia Al Poder (talkcontribs)

Please report issues in Project:Current issues

Reply to "Admin help requested for page move"
2A02:8108:14C0:1588:8CAB:65C8:7859:9AD9 (talkcontribs)

Hello since when are the servers down, and when will they be back ????

Ciencia Al Poder (talkcontribs)

What server are you talking about?

Reply to "Server Down"
Jfoster81747 (talkcontribs)

I'm experimenting with the new 1.27 mediawiki and have it installed on a working LAMP system ubuntu. I am getting this apache error message when I try to start the server:

[Thu Feb 04 10:03:24.654584 2016] [:error] [pid 26404] [client] PHP Fatal error:  require_once(): Failed opening required '/var/www/html/includes/PHPVersionCheck.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/html/index.php on line 36

I see that the there is no longer a index.php5 file in the start up and the index.php file is vastly different than 1.25.2 mediawiki. Any tips on what to do.


Jfoster81747 (talkcontribs)

FYI: I also am running and have verified that it works Php7. Just need to figure out how to configure the mediawiki1.27 to use it. chave also run composer update and only get a depreciation error warning on constraints. that should no stop the mediawiki from running.

Ciencia Al Poder (talkcontribs)

Does /var/www/html/includes/PHPVersionCheck.php exist and can the server read it?

Jfoster81747 (talkcontribs)

Yes it does exist and as far as I know the server has access, however I did just now compare the files ownership to my provious working set up and see they are different. Fixing that & will report.



Jfoster81747 (talkcontribs)


That did get the very basic site to running. However now its full of bugs. used the basic recycled LocalSettings from the older running site. However it craps out when I try to run php update.php to get the site updated. I'm getting this error regardless of which extension I put in there.

PHP Parse error:  syntax error, unexpected 'require_once' (T_REQUIRE_ONCE) in /var/www/html/LocalSettings.php on line 190. I do not know if this is because of the new style of loading extensions, but that does not work either. Any tips??



Jfoster81747 (talkcontribs)

OK I'm now getting this error using the new load syntax:

PHP Parse error:  syntax error, unexpected 'wfLoadExtension' (T_STRING) in /var/www/html/LocalSettings.php on line 190 (talkcontribs)

You obviously have an error in your LocalSettings file near that line. If you can't figure out what it is, post the lines near that area (redacting any private information).

Reply to "PHP version missmatch on mediawiki1.27"

Visual Editor Insert Menu Missing Code Block Option

Londonx (talkcontribs)

Hi there was a thread earlier on this but no one actually posted how to get it to work other than a link to some extension. I looked it over and I still can't figure out what's wrong. I use media wiki 1.25 with the matching Visual Editor version. I would encourage the community to post how they fixed something when they get it to work so that we can avoid repeat threads with pleas for help.

Ciencia Al Poder (talkcontribs)

They link to some extension because that extension provides such functionality. Have you tried installing that extension?

Londonx (talkcontribs)

Based on what I see, it is already installed and enabled by default in 1.25. I went ahead and tried "re-installing" it .. no change. Buttons still MIA.

Londonx (talkcontribs)

I can actually insert code into the regular syntax editor and it displays correctly but then when I use visual editor, the code block section gets the green and white lines and the cursor has the red sign. (talkcontribs)

Because VE integration was added in the 1.26 branch.

Reply to "Visual Editor Insert Menu Missing Code Block Option" (talkcontribs)


Was curious to know about migration to https from http and how it affected wikipedia's traffic.

Also does it recommend the migration or not.


AKlapper (WMF) (talkcontribs)

See for related information.

Reply to "Https migration"
Temptuousinsolence (talkcontribs)
The "wikimedia/composer-merge-plugin" plugin requires composer-plugin-api 1.0.0, this *WILL* break in the future and it should be fixed ASAP (require ^1.0 for example).

This tells me exactly what? How am I supposed to require it? Doing it via the normal composer require call from the terminal did not offer anything.

So how to fix it?

Reply to "wikimedia/composer-merge-plugin"