Wikipedia:FAQ/Technical: Difference between revisions

From Wikipedia
Jump to navigation Jump to search
Tachyony (talk | contribs)
Imported page
 
imported>Jerryobject
m What software is used to run Wikipedia?: MOS:FIRSTABBReviation define-clarify before parenthetic WP:ABBR. WP:LINKs: update-standardizes, underscores > spaces, needless-WP:PIPEs > WP:NOPIPEs. Small WP:COPYEDIT WP:EoS WP:TERSE.
 
Line 1: Line 1:
{{Wikipedia:FAQ/framework
{{Wikipedia:FAQ/framework
  |shorttitle = Technical
|shorttitle = Technical
  |title = Technical FAQ
|title = Technical FAQ
}}
}}


{{Shortcut|WP:TFAQ}}
{{Shortcut|WP:TFAQ}}
This FAQ answers some questions related to the technical workings of Wikipedia, including software and hardware. Check out [[Wikipedia:FAQ/Main Page]] for additional main page-specific technical information.
This FAQ answers some questions related to the technical workings of Wikipedia, including software and hardware.


''Note: If you're trying to get help for a specific technical problem that isn't answered by the FAQs, read [[Wikipedia:Troubleshooting]] or ask question at the [[Wikipedia:Village pump|technical village pump]].''
''Note: If you're trying to get help for a specific technical problem that isn't answered by the FAQs, read [[Wikipedia:Troubleshooting]] or ask question at the [[Wikipedia:Village pump (technical)|technical village pump]].''
__TOC__
__TOC__


==What happens if two or more people are editing the same page?==
==What happens if two or more people are editing the same page?==
:When the second person (and later people) attempts to save the page, MediaWiki will attempt to merge their changes into the current version of the text. If the merge fails then the user will receive an "edit conflict" message, and in some cases the opportunity to merge their changes manually. If multiple consecutive conflicts are noticed, it will generate a slightly different message. This is similar to [[Concurrent Versions System]] (CVS), a widely used software version management system.
:When the second person (and later people) attempts to save the page, [[Wikipedia:MediaWiki|MediaWiki]] will attempt to merge their changes into the current version of the text. If the merge fails, the user will receive an "edit conflict" message, and the opportunity to merge their changes manually. If multiple consecutive conflicts are noticed, it will generate a slightly different message.


:See [[Help:Edit conflict]] for more information.
:See [[Help:Edit conflict]] for more information.
Line 19: Line 19:
: On the [[Special:PasswordReset|Reset password page]], which loads, enter ''either'' your username ''or'' your email address (the one you associated with the username), and select the <span style="color:white; background-color:red; padding:0.2em;">Reset password</span> button.
: On the [[Special:PasswordReset|Reset password page]], which loads, enter ''either'' your username ''or'' your email address (the one you associated with the username), and select the <span style="color:white; background-color:red; padding:0.2em;">Reset password</span> button.
: You should receive an e-mail message with a new random password; you can use it to log in. You will then be presented with the opportunity to change your password to something you'll remember.
: You should receive an e-mail message with a new random password; you can use it to log in. You will then be presented with the opportunity to change your password to something you'll remember.
: If, however, you did not enter an e-mail address, you cannot recover your account. Simply create a new account and declare that you had a previous account.


:See [[Help:Logging in#What if I forget my password?]] if this does not work.
==How do I change my password?==
==How do I change my password?==
:You can change your password via [[Special:ChangePassword]]; you can also find a link to this in [[Special:Preferences|your preferences]].
:You can change your password via [[Special:ChangePassword]]; you can also find a link to this in [[Special:Preferences|your preferences]].


==How do I report a bug?==
==How do I report a bug?==
:The developers use the [[Phab:|Phabricator]] bug tracking tool to keep track of bugs. Anybody is welcome to create an account there and report any bugs they encounter; however, if you prefer, you can post about your bug at the [[WP:VPT|technical village pump]]. For more information, see [[Wikipedia:Bug reports|Bug reports]].
:The developers use the [[Phab:|Phabricator]] bug tracking tool to keep track of bugs. Anybody is welcome to create an account there and report any bugs they encounter; however, if you prefer, you can post about your bug at the [[WP:VPT|technical village pump]]. For more information, see [[Wikipedia:Bug reports|Bug reports]].


==How do I suggest a new feature?==
==How do I suggest a new feature?==
:To make an official feature request, use [[Phab:|Phabricator]].  For information on using Phabricator, please see [[Wikipedia:Bug reports|Bug reports]].
:To make an official feature request, use [[Phab:|Phabricator]].


==What software is used to run Wikipedia?==
==What software is used to run Wikipedia?==
:Wikipedia originally ran [[UseModWiki]], a general wiki script by [[user:Clifford Adams|Clifford Adams]] written in [[Perl]]. In January 2002, we switched to the [[Wikipedia:Phase II software|Phase II software]] written by [[Magnus Manske]] in [[PHP]], which in turn was completely overhauled the following July primarily by [[Lee Daniel Crocker]] to create what we now call [[Wikipedia:MediaWiki|MediaWiki]]. Currently, most of the PHP code in Mediawiki at Wikimedia Foundation uses [[PHP#PHP_7|PHP 7]].
:Wikipedia currently runs on [[Wikipedia:MediaWiki|MediaWiki]], created by [[Lee Daniel Crocker]] and written in [[PHP 7]]. We adopted this software in July 2002. Wikipedia originally ran on [[UseModWiki]], a general wiki script by [[user:Clifford Adams|Clifford Adams]] written in [[Perl]]. In January 2002, we switched to the [[Wikipedia:Phase II software|Phase II software]] written by [[Magnus Manske]] in [[PHP]].


:* database backend: [[MySQL]] and [[MariaDB]], both
:* database backend: [[MariaDB]]
:* frontend and caching: [[Apache_Traffic_Server|ATS]] and [[Varnish (software)|Varnish]]
:* frontend and caching: [[Apache Traffic Server]] (ATS) and [[Vinyl Cache]] (formerly Varnish)
:* application server: [[Apache HTTP Server|Apache]]
:* application server: [[Apache HTTP Server]]
:* domain-name service: gdnsd
:* domain-name service: gdnsd
:* Search: [[Lucene]]-based [[ElasticSearch]]
:* Search: [[Apache Lucene|Lucene]]-based [[Elasticsearch]]


:See [[Special:Version]] for software versions. The Wikipedia servers' [[operating system]] is [[Linux]], primarily using the [[Debian]] distribution. Some older servers run [[Ubuntu (operating system)|Ubuntu]]. For details see [[m:Wikimedia servers|Wikimedia servers]].
:See [[Special:Version]] for software versions. The Wikipedia servers' [[operating system]] is [[Linux]], using a [[Debian]] [[Linux distribution]]; formerly, it was [[Ubuntu]]. For details, see [[m:Wikimedia servers|Wikimedia servers]].


== How about the hardware? ==
== How about the hardware? ==
Line 48: Line 48:


=== History of Wikipedia hardware ===
=== History of Wikipedia hardware ===
:A brief history of Wikipedia serving:
:A brief history of Wikipedia servers:
:'''Phase I: January 2001 – January 2002'''
:'''Phase I: January 2001 – January 2002'''
:#One of Bomis' servers hosted all Wikipedia wikis running on [[UseModWiki]] software
:#One of [[Bomis]]'s servers hosted all Wikipedia wikis running on [[UseModWiki]] software
:'''Phase II: January 2002 – July 2002'''
:'''Phase II: January 2002 – July 2002'''
:#One of [[Bomis]]' servers hosted all Wikipedia wikis; English and meta running on the php/mysql-based new software, all other languages on UseModWiki. Runs both the database and the web server on one machine.
:#One of Bomis's servers hosted all Wikipedia wikis; English and meta running on the php/mysql-based new software, all other languages on UseModWiki. Runs both the database and the web server on one machine.
:'''Phase IIIa: July 2002 – May 2003'''
:'''Phase IIIa: July 2002 – May 2003'''
:#Wikipedia gets own server, running English Wikipedia and after a bit meta, with rewritten PHP software. Runs both the database and the web server on one machine.
:#Wikipedia gets own server, running English Wikipedia and after a bit meta, with rewritten PHP software. Runs both the database and the web server on one machine.
:#One of Bomis' servers continues to host some of the other languages on UseModWiki, but most of the active ones are gradually moved over to the other server during this period.
:#One of Bomis's servers continues to host some of the other languages on UseModWiki, but most of the active ones are gradually moved over to the other server during this period.
:'''Phase IIIb: May 2003 – Feb 2004'''
:'''Phase IIIb: May 2003 – Feb 2004'''
:#Wikipedia's server is given the code name "pliny". It serves the database for all phase 3 wikis and the web for all but English.
:#Wikipedia's server is given the code name "pliny". It serves the database for all phase 3 wikis and the web for all but English.
:#New server, code name "larousse", serves the web pages for the English Wikipedia only. Plans to move all languages' web serving to this machine are put on hold until load is brought down with more efficient software or larousse is upgraded to be faster.
:#New server, code name "larousse", serves the web pages for the English Wikipedia only. Plans to move all languages' web serving to this machine are put on hold until load is brought down with more efficient software or larousse is upgraded to be faster.
:#One of Bomis' servers continued to host some of the other languages on UseModWiki until it died. All are now hosted on pliny; a few more of the active ones have been gradually moved over to the new software, and an eventual complete conversion is planned.
:#One of Bomis's servers continued to host some of the other languages on UseModWiki until it died. All are now hosted on pliny; a few more of the active ones have been gradually moved over to the new software, and an eventual complete conversion is planned.
:'''Phase IIIc: Feb 2004 to Present'''
:'''Phase IIIc: Feb 2004 to Present'''
:#Wikipedia gets a whole new set of servers, paid for through donations to the non-profit [[WP:Wikimedia Foundation|Wikimedia Foundation]].
:#Wikipedia gets a whole new set of servers, paid for through donations to the [[WP:Wikimedia Foundation|Wikimedia Foundation]].
:#The new architecture has a new database server (suda), with a set of separate systems running Apache, as well as "squids" that cache results (to reduce the load). More details are at [[m:Wikimedia servers]].
:#The new architecture has a new database server (suda), with a set of separate systems running Apache, as well as "squids" that cache results (to reduce the load). More details are at [[m:Wikimedia servers]].
:# [[m:Wikimedia servers/hardware orders|New servers bought]] as needed, bringing total number to about 350 servers.
:# [[m:Wikimedia servers/hardware orders|New servers bought]] as needed, bringing total number to about 350 servers.


Line 72: Line 72:


==How big is the database?==
==How big is the database?==
{{update section|date=November 2022}}
:As of 2012, the combined size of the databases being backed up was between 4 and 6 TB for the copies of the Primary database, and perhaps 27 TB for the images and media (based on [[wikitech:Backup procedures]]).
:As of 2012, the combined size of the databases being backed up was between 4 and 6 TB for the copies of the Primary database, and perhaps 27 TB for the images and media (based on [[wikitech:Backup procedures]]).


Line 78: Line 79:
:Uploaded files took up approximately 372 gigabytes {{As of|2006|6|alt=lc}}, excluding thumbnails.
:Uploaded files took up approximately 372 gigabytes {{As of|2006|6|alt=lc}}, excluding thumbnails.


:For current information, see [[wikitech:Backup procedures]].{{Update inline|date=November 2014}}
:For current information, see [[wikitech:Backup procedures]].


:Compressed database dumps can be downloaded at https://dumps.wikimedia.org/.
:Compressed database dumps can be downloaded at https://dumps.wikimedia.org/.


==What kind of [[markup language]] does Wikipedia use?==
==What kind of [[markup language]] does Wikipedia use?==
:Wikipedia uses a very simple markup based on [[UseModWiki]]. For more details, see [[Wikipedia:How to edit a page]].
:Wikipedia uses [[Wikipedia:wikitext|wikitext]].


==Why not use [[HTML]]?==
==Why not use [[HTML]]?==
Line 97: Line 98:
::<nowiki>[[Paris]]</nowiki>
::<nowiki>[[Paris]]</nowiki>


:A special markup language even allows you to "transclude" special snippets of code, called [[Wikipedia:Template index|templates]], into wiki pages. (You can also "substitute" the code for that template, effectively copying and pasting it into the document, but this is a waste of space and is obnoxious to other users who try to edit but find that they have to scroll through large amounts of template code. Substitution is, however, preferred in some cases.)
:A special markup language even allows you to "transclude" special snippets of code, called [[Wikipedia:Template index|templates]], into wiki pages. (You can also "substitute" the code for that template, effectively copying and pasting it into the document.)


:Then there's security. Different [[web browser]]s have bugs that can be exploited via HTML. Malicious users could also do things like [[JavaScript]] popup windows or page redirects if they had full HTML ability on Wikipedia. Several "experimental" sites that allowed full-HTML editing have suffered such attacks, including a couple of other wikis that allowed arbitrary HTML.
:Then there's security. Different [[web browser]]s have bugs that can be exploited via HTML. Malicious users could also do things like [[JavaScript]] popup windows or page redirects if they had full HTML ability on Wikipedia. Several "experimental" sites that allowed full-HTML editing have suffered such attacks, including a couple of other wikis that allowed arbitrary HTML.


==So we can't use ''any'' HTML?==
==So we can't use ''any'' HTML?==
:That's not true. Certain [[HTML]] tags work—namely the ones in [[m:Help:HTML in wikitext#Permitted HTML|this list]]. It's still best not to rely on using HTML directly, because support for these tags is not always guaranteed to remain; they might affect the results achieved with [[VisualEditor]]; and if you can achieve your needed effect using only WikiText markup, you're most likely to get a result that is stable when the MediaWiki software is updated.
:That's not true. Certain [[HTML]] tags work—namely the ones in [[mw:Help:HTML in wikitext#Permitted HTML|this list]]. It's still best not to rely on using HTML directly, because support for these tags is not always guaranteed to remain; they might affect the results achieved with [[Wikipedia:VisualEditor|VisualEditor]]; and if you can achieve your needed effect using only WikiText markup, you're most likely to get a result that is stable when the MediaWiki software is updated.
 
:Also see [[Wikipedia:How to edit a page]].


==What about non-[[ASCII]] characters, and special symbols?==
==What about non-[[ASCII]] characters, and special symbols?==
:Wikipedia uses Unicode (specifically the UTF-8 encoding of Unicode) and most browsers can handle it but font issues mean that more obscure characters may not work for many users. [[Meta:Help:Special characters]] page for a detailed discussion of what is generally safe and what isn't. This page will be updated over time as more browsers come to support more features.
:Wikipedia uses Unicode (specifically [[UTF-8]]) and most browsers can handle it. Font issues mean that more obscure characters may not work for many users. See the [[Meta:Help:Special characters]] page for a detailed discussion of what is generally safe and what isn't.


:See http://www.unicode.org/help/display_problems.html for instructions on how to enable Unicode support for most platforms.
:See http://www.unicode.org/help/display_problems.html for instructions on how to enable Unicode support for most platforms.


==What about math topics, which require many special symbols, fonts, and graphics?==
==What about math topics, which require many special symbols, fonts, and graphics?==
:Just use [[TeX]]! See [[Meta:Help:Formula]].
:Just use [[TeX]]! See [[Help:Displaying a formula]].


==Is it possible to download the contents of Wikipedia?==
==Is it possible to download the contents of Wikipedia?==


:Yes, the complete text and editing history of all Wikipedia pages can be downloaded. See [[Wikipedia:Database download]].
:Yes, the complete text and editing history of all Wikipedia pages can be downloaded. See [[Wikipedia:Database download]].


:Note that downloading the database dumps is '''much''' preferred over trying to spider the entire site. Spidering the site will take you much longer, and puts a lot of load on the server (especially if you ignore our [http://www.wikipedia.org/robots.txt robots.txt] and spider over billions of combinations of diffs and whatnot). Heavy spidering can lead to your spider, or your IP, being barred with prejudice from access to the site. Legitimate spiders (for instance search engine indexers) are encouraged to wait about a minute between requests, follow the robots.txt, and if possible only work during less loaded hours (2:00-14:00 UTC is the lighter half of the day).
:Note that downloading the database dumps is '''much''' preferred over trying to spider the entire site. Spidering the site will take you much longer, and puts a lot of load on the server (especially if you ignore our [http://www.wikipedia.org/robots.txt robots.txt] and spider over billions of combinations of diffs and whatnot). Heavy spidering can lead to your spider, or your IP, being barred with prejudice from access to the site. Legitimate spiders (for instance, search engine indexers) are encouraged to wait about a minute between requests, follow the robots.txt, and if possible only work during less loaded hours (2:00–14:00 UTC is the lighter half of the day).


:The uploaded images and other media files are not currently bundled in an easily downloadable form; if you need one, please contact the developers on the [http://mail.wikipedia.org/mailman/listinfo/wikitech-l wikitech-l mailing list]. Please ''do not'' spider the whole site to get images.
:The uploaded images and other media files are not currently bundled in an easily downloadable form; if you need one, please contact the developers on the [http://mail.wikipedia.org/mailman/listinfo/wikitech-l wikitech-l mailing list]. Please ''do not'' spider the whole site to get images.
Line 124: Line 123:
==Is there a library to query Wikipedia in my programming language?==
==Is there a library to query Wikipedia in my programming language?==


:Yes, client code is available in many languages, see [[mw:API:Client code|here]] for a non-exhaustive list. See also the [[mw:API:Main page|API documentation]] and our [[Wikipedia:Creating a bot|bot tutorial]].
:Generally speaking, yes. Client code is available in many languages, see [[mw:API:Client code|here]] for a non-exhaustive list. See also the [[mw:API:Main page|API documentation]] and our [[Wikipedia:Creating a bot|bot tutorial]].


==Does Wikipedia use [[HTTP cookie|cookies]]?==
==Does Wikipedia use [[HTTP cookie|cookies]]?==
:Cookies are '''not required''' to read or edit Wikipedia, but they are required in order to [[Special:Userlogin|log in]] and link your edits to a user account.
:Cookies are not required to read Wikipedia, but they are required in order to [[Special:Userlogin|log in]] and link your edits to a user account.


:When you log in, the wiki will set a temporary session cookie which identifies your login session; this will be expired when your browser exits (or after an inactivity timeout), and is not saved on your hard drive.
:When you log in, the wiki will set a temporary session cookie which identifies your login session; this will be expired when your browser exits (or after an inactivity timeout), and is not saved on your hard drive.


:Another cookie will be saved which lists the user name you last logged in under, to make subsequent logins just a teensy bit easier. (Actually two: one with your name, and one with your account's internal ID number; they must match up.) These cookies expire after 365 days. If this worries you, clear your cookies after completing your session.
:Another cookie will be saved which lists the user name you last logged in under, to make subsequent logins just a teensy bit easier. (Actually two: one with your name, and one with your account's internal ID number; they must match up.) These cookies expire after 365 days. If this worries you, clear your cookies after completing your session.


:If you check the "remember my password" box on the login form, another cookie will be saved with a token that authenticates you to our servers (which is unrelated to your password). As long as this remains valid, you can bypass the login step on subsequent visits to the wiki. The cookie [[HTTP cookie#Expiration|expires]] after 365 days, or is removed if you [[Special:Userlogout|log out]]. If this worries you, don't use the option. (You should not use it on a public terminal!)
:If you check the "remember my password" box on the login form, another cookie will be saved with a token that authenticates you to our servers (which is unrelated to your password). As long as this remains valid, you can bypass the login step on subsequent visits to the wiki. The cookie [[HTTP cookie#Expiration|expires]] after 365 days, or is removed if you [[Special:Userlogout|log out]]. If this worries you, don't use the option. (You should not use it on a public terminal!)
Line 137: Line 136:
:See the [[wmf:Cookie statement|cookie statement]] linked at the bottom of each page for other details.
:See the [[wmf:Cookie statement|cookie statement]] linked at the bottom of each page for other details.


==Why was I automatically logged out?==
:This could be a result of your cookie, browser cache, or firewall/Internet security settings. Or, to quote [[User:Tim Starling|Tim Starling]] (referring to a question about "remembering password across sessions"):
{{talk quote box|
"The kind of session isn't a network session strictly speaking, it's an HTTP session, managed by PHP's [http://www.php.net/manual/en/ref.session.php session handling functions]. This kind of session works by setting a cookie, just like the "remember password" feature. The difference is that the session cookie has the "discard" attribute set, which means that it is discarded when you close your browser. This is done to prevent others from using your account after you have left the computer.


==Hey! Why was I automatically logged out?==
The other difference is that PHP sessions store the user ID and other such information on the server side. Only a "session key" is sent to the user. The remember password feature stores all required authentication information in the cookie itself. On our servers, the session information is stored in [[memcached]], a system for non-durable (unreliable) caching. Session information may occasionally be lost or go missing temporarily, causing users to be logged out. ''The simplest workaround for this is to use the remember password feature'', as long as you are not worried about other people using the same computer."
:This could be a result of your cookie, browser cache, or firewall/Internet security settings.  Or, to quote [[User:Tim Starling|Tim Starling]] (referring to a question about "remembering password across sessions"):
|source=[[Wikipedia:Village pump (technical)]] on May 4, 2005 (italics added)}}
:*"The kind of session isn't a network session strictly speaking, it's an HTTP session, managed by PHP's [http://www.php.net/manual/en/ref.session.php session handling functions]. This kind of session works by setting a cookie, just like the "remember password" feature. The difference is that the session cookie has the "discard" attribute set, which means that it is discarded when you close your browser. This is done to prevent others from using your account after you have left the computer.
 
:*The other difference is that PHP sessions store the user ID and other such information on the server side. Only a "session key" is sent to the user. The remember password feature stores all required authentication information in the cookie itself. On our servers, the session information is stored in [[memcached]], a system for non-durable (unreliable) caching. Session information may occasionally be lost or go missing temporarily, causing users to be logged out. ''The simplest workaround for this is to use the remember password feature'', as long as you are not worried about other people using the same computer."   from the [[Wikipedia:Village pump (technical)]] on May 4, 2005 (italics added).


:In other words: click the "remember me" box when logging in.
:In other words: click the "remember me" box when logging in.
Line 149: Line 149:


== The software that runs Wikipedia is great! Can I use it for my site? ==
== The software that runs Wikipedia is great! Can I use it for my site? ==
: You can, but depending on your needs you might be better served using something else; [[MediaWiki]] is big and complex. See first [[Wiki software]] for a list of alternative wiki software.
: You can, but depending on your needs you might be better served using something else; [[MediaWiki]] is big and complex. First, see [[Wiki software]] for a list of alternative wiki software.


: If, after scanning, you're still sure you want to use MediaWiki, see [[mw:MediaWiki|the MediaWiki web site]] for details on downloading, installing and configuring the software.
: If, after scanning, you're still sure you want to use MediaWiki, see [[mw:MediaWiki|the MediaWiki web site]] for details on downloading, installing and configuring the software.
== Can I add a page hit counter to a Wikipedia page? ==
:To view page hits, go to that page.  Then go to its history page, '''View history'''.  Then choose '''Page view statistics''' to access the [[m:Community Tech/Pageview stats tool|Pageview stats tool]].
:Technical details about the underlying pageview definition, and other sources of raw pageview data (including dumps and [[wikitech:Analytics/AQS/Pageviews|an API]]) can be found [[m:Research:Page view|here]].
==Low-bandwidth wireless Wikipedia==
:Users of mobile devices (smartphones, etc.) should consider browsing the mobile version of Wikipedia, by clicking the "Mobile view" link at the bottom of any page, or visiting the URL [//en.m.wikipedia.org en.m.wikipedia.org]. It is suited to touch devices and will save bandwidth.
:Alternatively, to view a low-bandwidth [[Main Page]] suitable for wireless users, select the ''[[Wikipedia:Main Page alternative (simple layout)]]'' link. That main page has a link to the ''[[Wikipedia:Main Page alternative (text only)|text-only version]]'' of the main page. For now, direct entry of the URL into your wireless device's browser is the most convenient way to get to the articles. If you know a one-word article, such as [[Science]], you can use that article to gain entry to your favorite topics.<noinclude>


== Is the "random article" feature really random? {{anchor|random}} ==
== Is the "random article" feature really random? {{anchor|random}} ==
: No, although it's random enough to provide a small sample of articles reliably.
: No, although it's random enough to provide a small sample of articles reliably.


: In the Wikipedia [[database]], each page is assigned a "random index", which is a random floating point number uniformly distributed between 0 (inclusive) and 1 (exclusive). The "random article" feature (Special:Random) chooses a random [[double-precision|double-precision floating-point number]], and returns the next article whose random index is greater than the selected random number. Some articles will have a larger gap before them, in the random index space, and so will be more likely to be selected. So the actual probability of any given article being selected is in fact itself random.
: In the Wikipedia [[database]], each page is assigned a "random index", which is a pseudorandom floating point number uniformly distributed between 0 (inclusive) and 1 (exclusive). The "random article" feature (Special:Random) chooses a pseudorandom [[double-precision|double-precision floating-point number]], and returns the next article whose random index is greater than the selected random number. Some articles will have a larger gap before them, in the random index space, and so will be more likely to be selected. So the actual probability of any given article being selected is in fact itself randomized.


: The random index value for new articles, and the random value used by Special:Random, is selected by reading two 31-bit words from a [[Mersenne twister]], which is seeded at each request by PHP's initialisation code using a high-resolution timer and the PID. The words are combined using:
: The pseudorandom index value for new articles, and the pseudorandom value used by Special:Random, is selected by reading two 31-bit words from a [[Mersenne twister]], which is seeded at each request by PHP's initialisation code using a high-resolution timer and the PID. The words are combined using:


::(mt_rand() * $max + mt_rand()) / $max / $max
::(mt_rand() * $max + mt_rand()) / $max / $max
Line 179: Line 168:
:: return (((double) rand_st->seed1)/rand_st->max_value_dbl);
:: return (((double) rand_st->seed1)/rand_st->max_value_dbl);


:Due to [[phab:T208909|a bug]], many pages created in 2004 and 2005 used to have non-random page_random values; this was corrected in 2018.  
:Due to [[phab:T208909|a bug]], many pages created in 2004 and 2005 used to have non-random page_random values; this was corrected in 2018.


==<span id="HIT"></span>Are page hit counters available?==
==<span id="HIT"></span>Are page hit counters available?==
: There is an advanced [https://tools.wmflabs.org/pageviews/?project=en.wikipedia.org pageviews analysis] tool, maintained by the Wikimedia Foundation, which allows you to view hit counts for one page or for multiple pages concurrently. "{{int:pageinfo-toolboxlink}}" under "{{int:toolbox}}" in the desktop sidebar shows "{{int:pvi-month-count}}" with a link to a simple graph. Additionally, the weekly [[Wikipedia:Top25Report|Top 25 Report]] provides a list of the 25 most popular articles in the last week.
: Yes. "{{int:pageinfo-toolboxlink}}" under "{{int:toolbox}}" in the desktop sidebar shows "{{int:pvi-month-count}}" with a link to a simple graph.


: For more details please see [[Wikipedia:Technical FAQ#Can I add a page hit counter to a Wikipedia page?]]
:There is an advanced [https://tools.wmflabs.org/pageviews/?project=en.wikipedia.org pageviews analysis] tool, maintained by the Wikimedia Foundation, which allows you to view hit counts for one page or for multiple pages concurrently. Additionally, the weekly [[Wikipedia:Top25Report|Top 25 Report]] provides a list of the 25 most popular articles (with commentary) in the last week.


==Can I access Wikipedia via HTTP, due to problems using HTTPS?==
==Can I access Wikipedia via HTTP, due to problems using HTTPS?==
:No. In 2015, the [[Wikimedia Foundation]] decided to move to only allow access via [[HTTPS]].<ref>{{cite web |url=//blog.wikimedia.org/2015/06/12/securing-wikimedia-sites-with-https/ |title=Securing access to Wikimedia sites with HTTPS |last1=Welinder |first1=Yana |author-link1=foundation:User:YWelinder (WMF) |last2=Baranetsky |first2=Victoria |author-link2=foundation:User:VBaranetsky (WMF) |last3=Black |first3=Brandon |author-link3=User:BBlack (WMF) |date=12 June 2015 |website=[[wmfblog:|Wikimedia blog]] |publisher=[[Wikimedia Foundation]] |access-date=30 January 2016 |quote=Today, we are happy to start the final steps of this transition, and we expect completion within a couple of weeks.}}</ref> [[HTTP]] access is no longer available, and automatically redirects requests to [[HTTPS]] access. [[HTTP Strict Transport Security]] is enabled, so recent browsers should actually refuse to even attempt to connect via HTTP (automatically rewriting URLs into HTTPS before connecting), after the first successful connection via HTTPS.
:No. In 2015, the [[Wikimedia Foundation]] decided to move to only allow access via [[HTTPS]].<ref>{{cite web |url=//blog.wikimedia.org/2015/06/12/securing-wikimedia-sites-with-https/ |title=Securing access to Wikimedia sites with HTTPS |last1=Welinder |first1=Yana |author-link1=foundation:User:YWelinder (WMF) |last2=Baranetsky |first2=Victoria |author-link2=foundation:User:VBaranetsky (WMF) |last3=Black |first3=Brandon |author-link3=User:BBlack (WMF) |date=12 June 2015 |website=[[wmfblog:|Wikimedia blog]] |publisher=[[Wikimedia Foundation]] |access-date=30 January 2016 |quote=Today, we are happy to start the final steps of this transition, and we expect completion within a couple of weeks.}}</ref> [[HTTP]] access is no longer available, and automatically redirects requests to [[HTTPS]] access. [[HTTP Strict Transport Security]] is enabled, so recent browsers should actually refuse to even attempt to connect via HTTP (automatically rewriting URLs into HTTPS before connecting), after the first successful connection via HTTPS.


==Are there currently problems with the servers or network?==
==Are there currently problems with the servers or network?==
:For the current server or network status, please see [https://grafana.wikimedia.org Wikimedia Foundation Grafana].
:For the current server or network status, please see [https://www.wikimediastatus.net/ www.wikimediastatus.net]. More detailed information about specific services can be found on [https://grafana.wikimedia.org Grafana].


==I have a problem not on this list, where do I go?==
==I have a problem not on this list, where do I go?==
:See [[Wikipedia:Troubleshooting|Troubleshooting]]—if it's not on there try the [[wikipedia:Village pump (technical)|village pump]]. For help with a particular software task see [[Wikipedia:Computer help desk]].
:See [[Wikipedia:Troubleshooting|Troubleshooting]]—if it's not on there try the [[wikipedia:Village pump (technical)|village pump]]. For help with a particular software task see [[Wikipedia:Computer help desk]].


===I want to merge my multiple user accounts into one, where do I go?===
===I want to merge my multiple user accounts into one, where do I go?===
:As of 2021 it is technically difficult/unavailable with the risk of database logs/history corruption.https://phabricator.wikimedia.org/T154290
:As of 2021 it is technically difficult/unavailable with the risk of database logs/history corruption. See [[phab:T154290|T154290]].


==References==
==References==
Line 205: Line 194:
{{Help navigation}}
{{Help navigation}}
</div>
</div>
[[es:Ayuda:FAQ Técnico]]

Latest revision as of 08:41, 3 April 2026

Wikipedia:FAQ/framework

This FAQ answers some questions related to the technical workings of Wikipedia, including software and hardware.

Note: If you're trying to get help for a specific technical problem that isn't answered by the FAQs, read Wikipedia:Troubleshooting or ask question at the technical village pump.

What happens if two or more people are editing the same page?

When the second person (and later people) attempts to save the page, MediaWiki will attempt to merge their changes into the current version of the text. If the merge fails, the user will receive an "edit conflict" message, and the opportunity to merge their changes manually. If multiple consecutive conflicts are noticed, it will generate a slightly different message.
See Help:Edit conflict for more information.

How do I recover a password I have forgotten?

If you entered your e-mail address when you signed up, you can have a new password generated. Click on the "Log in" link in the upper-right corner. Follow the link near the bottom of the page titled "Forgot your password?"
On the Reset password page, which loads, enter either your username or your email address (the one you associated with the username), and select the Reset password button.
You should receive an e-mail message with a new random password; you can use it to log in. You will then be presented with the opportunity to change your password to something you'll remember.
If, however, you did not enter an e-mail address, you cannot recover your account. Simply create a new account and declare that you had a previous account.

How do I change my password?

You can change your password via Special:ChangePassword; you can also find a link to this in your preferences.

How do I report a bug?

The developers use the Phabricator bug tracking tool to keep track of bugs. Anybody is welcome to create an account there and report any bugs they encounter; however, if you prefer, you can post about your bug at the technical village pump. For more information, see Bug reports.

How do I suggest a new feature?

To make an official feature request, use Phabricator.

What software is used to run Wikipedia?

Wikipedia currently runs on MediaWiki, created by Lee Daniel Crocker and written in PHP 7. We adopted this software in July 2002. Wikipedia originally ran on UseModWiki, a general wiki script by Clifford Adams written in Perl. In January 2002, we switched to the Phase II software written by Magnus Manske in PHP.
See Special:Version for software versions. The Wikipedia servers' operating system is Linux, using a Debian Linux distribution; formerly, it was Ubuntu. For details, see Wikimedia servers.

How about the hardware?

Current situation

See m:Wikimedia servers.

History of Wikipedia hardware

A brief history of Wikipedia servers:
Phase I: January 2001 – January 2002
  1. One of Bomis's servers hosted all Wikipedia wikis running on UseModWiki software
Phase II: January 2002 – July 2002
  1. One of Bomis's servers hosted all Wikipedia wikis; English and meta running on the php/mysql-based new software, all other languages on UseModWiki. Runs both the database and the web server on one machine.
Phase IIIa: July 2002 – May 2003
  1. Wikipedia gets own server, running English Wikipedia and after a bit meta, with rewritten PHP software. Runs both the database and the web server on one machine.
  2. One of Bomis's servers continues to host some of the other languages on UseModWiki, but most of the active ones are gradually moved over to the other server during this period.
Phase IIIb: May 2003 – Feb 2004
  1. Wikipedia's server is given the code name "pliny". It serves the database for all phase 3 wikis and the web for all but English.
  2. New server, code name "larousse", serves the web pages for the English Wikipedia only. Plans to move all languages' web serving to this machine are put on hold until load is brought down with more efficient software or larousse is upgraded to be faster.
  3. One of Bomis's servers continued to host some of the other languages on UseModWiki until it died. All are now hosted on pliny; a few more of the active ones have been gradually moved over to the new software, and an eventual complete conversion is planned.
Phase IIIc: Feb 2004 to Present
  1. Wikipedia gets a whole new set of servers, paid for through donations to the Wikimedia Foundation.
  2. The new architecture has a new database server (suda), with a set of separate systems running Apache, as well as "squids" that cache results (to reduce the load). More details are at m:Wikimedia servers.
  3. New servers bought as needed, bringing total number to about 350 servers.

How about the connection?

Wikimedia Foundation has multiple facilities spread out worldwide served by different bandwidth suppliers.
See the Wikipedia:Statistics page for information about bandwidth usage.

How big is the database?

TemplateStyles' src attribute must not be empty.

As of 2012, the combined size of the databases being backed up was between 4 and 6 TB for the copies of the Primary database, and perhaps 27 TB for the images and media (based on wikitech:Backup procedures).
Early in Wikipedia's history, in February 2003 the database was about 4 GB in size. By April 2004, it was growing at about 1 to 1.4 GB per week, and by October 2004, it had grown to about 170 GB.
Uploaded files took up approximately 372 gigabytes lc, excluding thumbnails.
For current information, see wikitech:Backup procedures.
Compressed database dumps can be downloaded at https://dumps.wikimedia.org/.

What kind of markup language does Wikipedia use?

Wikipedia uses wikitext.

Why not use HTML?

The short answer is: for simplicity and security.
And now the longer answer. Wikipedia, and wikis in general, are meant to be edited on the fly. HTML is not easy to use when you simply want to write an article. Creating links gives us a particularly dramatic example. To link to the Paris article using HTML, one would have to type
<a href="/wiki/Paris">Paris</a>
Using MediaWiki markup is much easier:
[[Paris]]
A special markup language even allows you to "transclude" special snippets of code, called templates, into wiki pages. (You can also "substitute" the code for that template, effectively copying and pasting it into the document.)
Then there's security. Different web browsers have bugs that can be exploited via HTML. Malicious users could also do things like JavaScript popup windows or page redirects if they had full HTML ability on Wikipedia. Several "experimental" sites that allowed full-HTML editing have suffered such attacks, including a couple of other wikis that allowed arbitrary HTML.

So we can't use any HTML?

That's not true. Certain HTML tags work—namely the ones in this list. It's still best not to rely on using HTML directly, because support for these tags is not always guaranteed to remain; they might affect the results achieved with VisualEditor; and if you can achieve your needed effect using only WikiText markup, you're most likely to get a result that is stable when the MediaWiki software is updated.

What about non-ASCII characters, and special symbols?

Wikipedia uses Unicode (specifically UTF-8) and most browsers can handle it. Font issues mean that more obscure characters may not work for many users. See the Meta:Help:Special characters page for a detailed discussion of what is generally safe and what isn't.
See http://www.unicode.org/help/display_problems.html for instructions on how to enable Unicode support for most platforms.

What about math topics, which require many special symbols, fonts, and graphics?

Just use TeX! See Help:Displaying a formula.

Is it possible to download the contents of Wikipedia?

Yes, the complete text and editing history of all Wikipedia pages can be downloaded. See Wikipedia:Database download.
Note that downloading the database dumps is much preferred over trying to spider the entire site. Spidering the site will take you much longer, and puts a lot of load on the server (especially if you ignore our robots.txt and spider over billions of combinations of diffs and whatnot). Heavy spidering can lead to your spider, or your IP, being barred with prejudice from access to the site. Legitimate spiders (for instance, search engine indexers) are encouraged to wait about a minute between requests, follow the robots.txt, and if possible only work during less loaded hours (2:00–14:00 UTC is the lighter half of the day).
The uploaded images and other media files are not currently bundled in an easily downloadable form; if you need one, please contact the developers on the wikitech-l mailing list. Please do not spider the whole site to get images.

Is there a library to query Wikipedia in my programming language?

Generally speaking, yes. Client code is available in many languages, see here for a non-exhaustive list. See also the API documentation and our bot tutorial.

Does Wikipedia use cookies?

Cookies are not required to read Wikipedia, but they are required in order to log in and link your edits to a user account.
When you log in, the wiki will set a temporary session cookie which identifies your login session; this will be expired when your browser exits (or after an inactivity timeout), and is not saved on your hard drive.
Another cookie will be saved which lists the user name you last logged in under, to make subsequent logins just a teensy bit easier. (Actually two: one with your name, and one with your account's internal ID number; they must match up.) These cookies expire after 365 days. If this worries you, clear your cookies after completing your session.
If you check the "remember my password" box on the login form, another cookie will be saved with a token that authenticates you to our servers (which is unrelated to your password). As long as this remains valid, you can bypass the login step on subsequent visits to the wiki. The cookie expires after 365 days, or is removed if you log out. If this worries you, don't use the option. (You should not use it on a public terminal!)
See the cookie statement linked at the bottom of each page for other details.

Why was I automatically logged out?

This could be a result of your cookie, browser cache, or firewall/Internet security settings. Or, to quote Tim Starling (referring to a question about "remembering password across sessions"):

Template:Talk quote box

In other words: click the "remember me" box when logging in.
See also Help:Logging in.

The software that runs Wikipedia is great! Can I use it for my site?

You can, but depending on your needs you might be better served using something else; MediaWiki is big and complex. First, see Wiki software for a list of alternative wiki software.
If, after scanning, you're still sure you want to use MediaWiki, see the MediaWiki web site for details on downloading, installing and configuring the software.

Is the "random article" feature really random?

No, although it's random enough to provide a small sample of articles reliably.
In the Wikipedia database, each page is assigned a "random index", which is a pseudorandom floating point number uniformly distributed between 0 (inclusive) and 1 (exclusive). The "random article" feature (Special:Random) chooses a pseudorandom double-precision floating-point number, and returns the next article whose random index is greater than the selected random number. Some articles will have a larger gap before them, in the random index space, and so will be more likely to be selected. So the actual probability of any given article being selected is in fact itself randomized.
The pseudorandom index value for new articles, and the pseudorandom value used by Special:Random, is selected by reading two 31-bit words from a Mersenne twister, which is seeded at each request by PHP's initialisation code using a high-resolution timer and the PID. The words are combined using:
(mt_rand() * $max + mt_rand()) / $max / $max
Some old articles had their page_random value reset using MySQL's RAND():
rand_st->seed1=(rand_st->seed1*3+rand_st->seed2) % rand_st->max_value;
rand_st->seed2=(rand_st->seed1+rand_st->seed2+33) % rand_st->max_value;
return (((double) rand_st->seed1)/rand_st->max_value_dbl);
Due to a bug, many pages created in 2004 and 2005 used to have non-random page_random values; this was corrected in 2018.

Are page hit counters available?

Yes. "Page information" under "Tools" in the desktop sidebar shows "Page views in the past 30 days" with a link to a simple graph.
There is an advanced pageviews analysis tool, maintained by the Wikimedia Foundation, which allows you to view hit counts for one page or for multiple pages concurrently. Additionally, the weekly Top 25 Report provides a list of the 25 most popular articles (with commentary) in the last week.

Can I access Wikipedia via HTTP, due to problems using HTTPS?

No. In 2015, the Wikimedia Foundation decided to move to only allow access via HTTPS.[1] HTTP access is no longer available, and automatically redirects requests to HTTPS access. HTTP Strict Transport Security is enabled, so recent browsers should actually refuse to even attempt to connect via HTTP (automatically rewriting URLs into HTTPS before connecting), after the first successful connection via HTTPS.

Are there currently problems with the servers or network?

For the current server or network status, please see www.wikimediastatus.net. More detailed information about specific services can be found on Grafana.

I have a problem not on this list, where do I go?

See Troubleshooting—if it's not on there try the village pump. For help with a particular software task see Wikipedia:Computer help desk.

I want to merge my multiple user accounts into one, where do I go?

As of 2021 it is technically difficult/unavailable with the risk of database logs/history corruption. See T154290.

References

  1. Welinder, Yana; Baranetsky, Victoria; Black, Brandon (12 June 2015). "Securing access to Wikimedia sites with HTTPS". Wikimedia blog. Wikimedia Foundation. Retrieved 30 January 2016. Today, we are happy to start the final steps of this transition, and we expect completion within a couple of weeks.

Wikipedia:FAQ/footer