CINXE.COM
MediaWiki-Vagrant - MediaWiki
<!DOCTYPE html> <html class="client-nojs vector-feature-language-in-header-disabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-disabled skin-theme-clientpref-day vector-toc-available" lang="en" dir="ltr"> <head> <meta charset="UTF-8"> <title>MediaWiki-Vagrant - MediaWiki</title> <script>(function(){var className="client-js vector-feature-language-in-header-disabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-disabled skin-theme-clientpref-day vector-toc-available";var cookie=document.cookie.match(/(?:^|; )mediawikiwikimwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":false,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""], "wgDefaultDateFormat":"dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgRequestId":"7f8c42ce-df0d-4f44-b6f2-459634e87bcf","wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"MediaWiki-Vagrant","wgTitle":"MediaWiki-Vagrant","wgCurRevisionId":6753678,"wgRevisionId":6753678,"wgArticleId":116892,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["MediaWiki-Vagrant","Development environments"],"wgPageViewLanguage":"en","wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgRelevantPageName":"MediaWiki-Vagrant","wgRelevantArticleId":116892,"wgIsProbablyEditable":false,"wgRelevantPageIsProbablyEditable":false,"wgRestrictionEdit":["autoconfirmed"],"wgRestrictionMove":["autoconfirmed"],"wgNoticeProject":"mediawiki","wgCiteReferencePreviewsActive":true,"wgMediaViewerOnClick":true, "wgMediaViewerEnabledByDefault":true,"wgVisualEditor":{"pageLanguageCode":"en","pageLanguageDir":"ltr","pageVariantFallbacks":"en"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":false,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":70000,"wgTranslatePageTranslation":"source","wgEditSubmitButtonLabelPublish":true,"wgDiscussionToolsFeaturesEnabled":{"replytool":true,"newtopictool":true,"sourcemodetoolbar":true,"topicsubscription":false,"autotopicsub":false,"visualenhancements":false,"visualenhancements_reply":false,"visualenhancements_pageframe":false},"wgDiscussionToolsFallbackEditMode":"visual","wgULSPosition":"personal","wgULSisCompactLinksEnabled":true,"wgVector2022LanguageInHeader":false,"wgULSisLanguageSelectorEmpty":false,"wgWikibaseItemId":"Q21839573","wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"]};RLSTATE={ "ext.globalCssJs.user.styles":"ready","site.styles":"ready","user.styles":"ready","ext.globalCssJs.user":"ready","user":"ready","user.options":"loading","ext.translate.tag.languages":"ready","ext.cite.styles":"ready","ext.pygments":"ready","ext.tmh.player.styles":"ready","ext.discussionTools.init.styles":"ready","oojs-ui-core.styles":"ready","oojs-ui.styles.indicators":"ready","mediawiki.widgets.styles":"ready","oojs-ui-core.icons":"ready","skins.vector.search.codex.styles":"ready","skins.vector.styles":"ready","skins.vector.icons":"ready","jquery.makeCollapsible.styles":"ready","ext.translate.edit.documentation.styles":"ready","ext.translate":"ready","ext.wikimediamessages.styles":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.pt":"ready","wikibase.client.init":"ready","ext.wikimediaBadges":"ready"};RLPAGEMODULES=["ext.cite.ux-enhancements","ext.pygments.view","mediawiki.page.media","ext.tmh.player","site","mediawiki.page.ready","jquery.makeCollapsible", "mediawiki.toc","skins.vector.js","ext.centralNotice.geoIP","ext.centralNotice.startUp","ext.translate.pagetranslation.uls","ext.urlShortener.toolbar","ext.centralauth.centralautologin","mmv.bootstrap","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.centralauth","ext.discussionTools.init","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.uls.compactlinks","ext.uls.interface","wikibase.client.vector-2022","ext.checkUser.clientHints","wikibase.sidebar.tracking"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=en&modules=ext.cite.styles%7Cext.discussionTools.init.styles%7Cext.pygments%2Ctranslate%2CwikimediaBadges%7Cext.tmh.player.styles%7Cext.translate.edit.documentation.styles%7Cext.translate.tag.languages%7Cext.uls.pt%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediamessages.styles%7Cjquery.makeCollapsible.styles%7Cmediawiki.widgets.styles%7Coojs-ui-core.icons%2Cstyles%7Coojs-ui.styles.indicators%7Cskins.vector.icons%2Cstyles%7Cskins.vector.search.codex.styles%7Cwikibase.client.init&only=styles&skin=vector-2022"> <script async="" src="/w/load.php?lang=en&modules=startup&only=scripts&raw=1&skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=en&modules=site.styles&only=styles&skin=vector-2022"> <meta name="generator" content="MediaWiki 1.44.0-wmf.5"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c0/MediaWiki_Vagrant.svg/1200px-MediaWiki_Vagrant.svg.png"> <meta property="og:image:width" content="1200"> <meta property="og:image:height" content="1349"> <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c0/MediaWiki_Vagrant.svg/800px-MediaWiki_Vagrant.svg.png"> <meta property="og:image:width" content="800"> <meta property="og:image:height" content="899"> <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c0/MediaWiki_Vagrant.svg/640px-MediaWiki_Vagrant.svg.png"> <meta property="og:image:width" content="640"> <meta property="og:image:height" content="719"> <meta name="viewport" content="width=1120"> <meta property="og:site_name" content="MediaWiki"> <meta property="og:title" content="MediaWiki-Vagrant - MediaWiki"> <meta property="og:type" content="website"> <link rel="preconnect" href="//upload.wikimedia.org"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//m.mediawiki.org/wiki/MediaWiki-Vagrant"> <link rel="apple-touch-icon" href="/static/apple-touch/mediawiki.png"> <link rel="icon" href="/static/favicon/mediawiki.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="MediaWiki (en)"> <link rel="EditURI" type="application/rsd+xml" href="//www.mediawiki.org/w/api.php?action=rsd"> <link rel="canonical" href="https://www.mediawiki.org/wiki/MediaWiki-Vagrant"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/"> <link rel="alternate" type="application/atom+xml" title="MediaWiki Atom feed" href="/w/index.php?title=Special:RecentChanges&feed=atom"> <link rel="dns-prefetch" href="//meta.wikimedia.org" /> <link rel="dns-prefetch" href="//login.wikimedia.org"> </head> <body class="ext-discussiontools-replytool-enabled ext-discussiontools-newtopictool-enabled ext-discussiontools-sourcemodetoolbar-enabled skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-MediaWiki-Vagrant rootpage-MediaWiki-Vagrant skin-vector-2022 action-view"><a class="mw-jump-link" href="#bodyContent">Jump to content</a> <div class="vector-header-container"> <header class="vector-header mw-header"> <div class="vector-header-start"> <nav class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-dropdown" class="vector-dropdown vector-main-menu-dropdown vector-button-flush-left vector-button-flush-right" > <input type="checkbox" id="vector-main-menu-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-main-menu-dropdown" class="vector-dropdown-checkbox " aria-label="Main menu" > <label id="vector-main-menu-dropdown-label" for="vector-main-menu-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-menu mw-ui-icon-wikimedia-menu"></span> <span class="vector-dropdown-label-text">Main menu</span> </label> <div class="vector-dropdown-content"> <div id="vector-main-menu-unpinned-container" class="vector-unpinned-container"> <div id="vector-main-menu" class="vector-main-menu vector-pinnable-element"> <div class="vector-pinnable-header vector-main-menu-pinnable-header vector-pinnable-header-unpinned" data-feature-name="main-menu-pinned" data-pinnable-element-id="vector-main-menu" data-pinned-container-id="vector-main-menu-pinned-container" data-unpinned-container-id="vector-main-menu-unpinned-container" > <div class="vector-pinnable-header-label">Main menu</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-main-menu.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-main-menu.unpin">hide</button> </div> <div id="p-navigation" class="vector-menu mw-portlet mw-portlet-navigation" > <div class="vector-menu-heading"> Navigation </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpage-description" class="mw-list-item"><a href="/wiki/MediaWiki" title="Visit the main page [z]" accesskey="z"><span>Main page</span></a></li><li id="n-mw-download" class="mw-list-item"><a href="/wiki/Download"><span>Get MediaWiki</span></a></li><li id="n-mw-extensions" class="mw-list-item"><a href="/wiki/Special:MyLanguage/Category:Extensions"><span>Get extensions</span></a></li><li id="n-blog-text" class="mw-list-item"><a href="https://techblog.wikimedia.org/"><span>Tech blog</span></a></li><li id="n-mw-contribute" class="mw-list-item"><a href="/wiki/Special:MyLanguage/How_to_contribute"><span>Contribute</span></a></li> </ul> </div> </div> <div id="p-support" class="vector-menu mw-portlet mw-portlet-support" > <div class="vector-menu-heading"> Support </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-help" class="mw-list-item"><a href="/wiki/Special:MyLanguage/Help:Contents" title="The place to find out"><span>User help</span></a></li><li id="n-mw-faq" class="mw-list-item"><a href="/wiki/Special:MyLanguage/Manual:FAQ"><span>FAQ</span></a></li><li id="n-mw-manual" class="mw-list-item"><a href="/wiki/Special:MyLanguage/Manual:Contents"><span>Technical manual</span></a></li><li id="n-mw-supportdesk" class="mw-list-item"><a href="/wiki/Project:Support_desk"><span>Support desk</span></a></li><li id="n-mw-communication" class="mw-list-item"><a href="/wiki/Special:MyLanguage/Communication"><span>Communication</span></a></li> </ul> </div> </div> <div id="p-development" class="vector-menu mw-portlet mw-portlet-development" > <div class="vector-menu-heading"> Development </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mw-developerportal" class="mw-list-item"><a href="https://developer.wikimedia.org/"><span>Developer portal</span></a></li><li id="n-svn-statistics" class="mw-list-item"><a href="/wiki/Development_statistics"><span>Code statistics</span></a></li> </ul> </div> </div> <div id="p-mediawiki.org" class="vector-menu mw-portlet mw-portlet-mediawiki_org" > <div class="vector-menu-heading"> mediawiki.org </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-portal" class="mw-list-item"><a href="/wiki/Project:Help" title="About the project, what you can do, where to find things"><span>Community portal</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Special:RecentChanges" title="A list of recent changes in the wiki [r]" accesskey="r"><span>Recent changes</span></a></li><li id="n-mw-translate" class="mw-list-item"><a href="/wiki/Special:LanguageStats"><span>Translate content</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/wiki/Special:Random" title="Load a random page [x]" accesskey="x"><span>Random page</span></a></li><li id="n-mw-discussion" class="mw-list-item"><a href="/wiki/Project:Village_Pump"><span>Village pump</span></a></li><li id="n-Sandboxlink-portlet-label" class="mw-list-item"><a href="/wiki/Project:Sandbox"><span>Sandbox</span></a></li> </ul> </div> </div> <div id="p-lang" class="vector-menu mw-portlet mw-portlet-lang" > <div class="vector-menu-heading"> In other languages </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> <div class="after-portlet after-portlet-lang"><span class="wb-langlinks-add wb-langlinks-link"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q21839573#sitelinks-wikipedia" title="Add interlanguage links" class="wbc-editpage">Add links</a></span></div> </div> </div> </div> </div> </div> </div> </nav> <a href="/wiki/MediaWiki" class="mw-logo"> <img class="mw-logo-icon" src="/static/images/icons/mediawikiwiki.svg" alt="" aria-hidden="true" height="50" width="50"> <span class="mw-logo-container skin-invert"> <img class="mw-logo-wordmark" alt="MediaWiki" src="/static/images/mobile/copyright/mediawikiwiki-wordmark.svg" style="width: 7.5em; height: 1.125em;"> </span> </a> </div> <div class="vector-header-end"> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box-collapses vector-search-box-show-thumbnail vector-search-box-auto-expand-width vector-search-box"> <a href="/wiki/Special:Search" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only search-toggle" title="Search MediaWiki [f]" accesskey="f"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>Search</span> </a> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail cdx-typeahead-search--auto-expand-width"> <form action="/w/index.php" id="searchform" class="cdx-search-input cdx-search-input--has-end-button"> <div id="simpleSearch" class="cdx-search-input__input-wrapper" data-search-loc="header-moved"> <div class="cdx-text-input cdx-text-input--has-start-icon"> <input class="cdx-text-input__input" type="search" name="search" placeholder="Search MediaWiki" aria-label="Search MediaWiki" autocapitalize="sentences" title="Search MediaWiki [f]" accesskey="f" id="searchInput" > <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Special:Search"> </div> <button class="cdx-button cdx-search-input__end-button">Search</button> </form> </div> </div> </div> <nav class="vector-user-links vector-user-links-wide" aria-label="Personal tools"> <div class="vector-user-links-main"> <div id="p-vector-user-menu-preferences" class="vector-menu mw-portlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-uls" class="mw-list-item active user-links-collapsible-item"><a data-mw="interface" href="#" class="uls-trigger cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet"><span class="vector-icon mw-ui-icon-wikimedia-language mw-ui-icon-wikimedia-wikimedia-language"></span> <span>English</span></a> </li> </ul> </div> </div> <div id="p-vector-user-menu-userpage" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-dropdown" class="vector-dropdown " title="Change the appearance of the page's font size, width, and color" > <input type="checkbox" id="vector-appearance-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-appearance-dropdown" class="vector-dropdown-checkbox " aria-label="Appearance" > <label id="vector-appearance-dropdown-label" for="vector-appearance-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-appearance mw-ui-icon-wikimedia-appearance"></span> <span class="vector-dropdown-label-text">Appearance</span> </label> <div class="vector-dropdown-content"> <div id="vector-appearance-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div id="p-vector-user-menu-notifications" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-overflow" class="vector-menu mw-portlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="https://donate.wikimedia.org/?wmf_source=donate&wmf_medium=sidebar&wmf_campaign=www.mediawiki.org&uselang=en" class=""><span>Donate</span></a> </li> <li id="pt-createaccount-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:CreateAccount&returnto=MediaWiki-Vagrant" title="You are encouraged to create an account and log in; however, it is not mandatory" class=""><span>Create account</span></a> </li> <li id="pt-login-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:UserLogin&returnto=MediaWiki-Vagrant" title="You are encouraged to log in; however, it is not mandatory [o]" accesskey="o" class=""><span>Log in</span></a> </li> </ul> </div> </div> </div> <div id="vector-user-links-dropdown" class="vector-dropdown vector-user-menu vector-button-flush-right vector-user-menu-logged-out" title="More options" > <input type="checkbox" id="vector-user-links-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-user-links-dropdown" class="vector-dropdown-checkbox " aria-label="Personal tools" > <label id="vector-user-links-dropdown-label" for="vector-user-links-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-ellipsis mw-ui-icon-wikimedia-ellipsis"></span> <span class="vector-dropdown-label-text">Personal tools</span> </label> <div class="vector-dropdown-content"> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal user-links-collapsible-item" title="User menu" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport" class="user-links-collapsible-item mw-list-item"><a href="https://donate.wikimedia.org/?wmf_source=donate&wmf_medium=sidebar&wmf_campaign=www.mediawiki.org&uselang=en"><span>Donate</span></a></li><li id="pt-createaccount" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:CreateAccount&returnto=MediaWiki-Vagrant" title="You are encouraged to create an account and log in; however, it is not mandatory"><span class="vector-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>Create account</span></a></li><li id="pt-login" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:UserLogin&returnto=MediaWiki-Vagrant" title="You are encouraged to log in; however, it is not mandatory [o]" accesskey="o"><span class="vector-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>Log in</span></a></li> </ul> </div> </div> <div id="p-user-menu-anon-editor" class="vector-menu mw-portlet mw-portlet-user-menu-anon-editor" > <div class="vector-menu-heading"> Pages for logged out editors <a href="/wiki/Help:Introduction" aria-label="Learn more about editing"><span>learn more</span></a> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-anoncontribs" class="mw-list-item"><a href="/wiki/Special:MyContributions" title="A list of edits made from this IP address [y]" accesskey="y"><span>Contributions</span></a></li><li id="pt-anontalk" class="mw-list-item"><a href="/wiki/Special:MyTalk" title="Discussion about edits from this IP address [n]" accesskey="n"><span>Talk</span></a></li> </ul> </div> </div> </div> </div> </nav> </div> </header> </div> <div class="mw-page-container"> <div class="mw-page-container-inner"> <div class="vector-sitenotice-container"> <div id="siteNotice"><!-- CentralNotice --></div> </div> <div class="vector-column-start"> <div class="vector-main-menu-container"> <div id="mw-navigation"> <nav id="mw-panel" class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-pinned-container" class="vector-pinned-container"> </div> </nav> </div> </div> <div class="vector-sticky-pinned-container"> <nav id="mw-panel-toc" aria-label="Contents" data-event-name="ui.sidebar-toc" class="mw-table-of-contents-container vector-toc-landmark"> <div id="vector-toc-pinned-container" class="vector-pinned-container"> <div id="vector-toc" class="vector-toc vector-pinnable-element"> <div class="vector-pinnable-header vector-toc-pinnable-header vector-pinnable-header-pinned" data-feature-name="toc-pinned" data-pinnable-element-id="vector-toc" > <h2 class="vector-pinnable-header-label">Contents</h2> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-toc.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-toc.unpin">hide</button> </div> <ul class="vector-toc-contents" id="mw-panel-toc-list"> <li id="toc-mw-content-text" class="vector-toc-list-item vector-toc-level-1"> <a href="#" class="vector-toc-link"> <div class="vector-toc-text">Beginning</div> </a> </li> <li id="toc-System_requirements" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#System_requirements"> <div class="vector-toc-text"> <span class="vector-toc-numb">1</span> <span>System requirements</span> </div> </a> <ul id="toc-System_requirements-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Quick_start" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Quick_start"> <div class="vector-toc-text"> <span class="vector-toc-numb">2</span> <span>Quick start</span> </div> </a> <button aria-controls="toc-Quick_start-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle Quick start subsection</span> </button> <ul id="toc-Quick_start-sublist" class="vector-toc-list"> <li id="toc-Windows_Subsystem_for_Linux_(WSL)" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Windows_Subsystem_for_Linux_(WSL)"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.1</span> <span>Windows Subsystem for Linux (WSL)</span> </div> </a> <ul id="toc-Windows_Subsystem_for_Linux_(WSL)-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Troubleshooting_startup" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Troubleshooting_startup"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.2</span> <span>Troubleshooting startup</span> </div> </a> <ul id="toc-Troubleshooting_startup-sublist" class="vector-toc-list"> <li id="toc-Any_host" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Any_host"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.2.1</span> <span>Any host</span> </div> </a> <ul id="toc-Any_host-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Windows-specific" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Windows-specific"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.2.2</span> <span>Windows-specific</span> </div> </a> <ul id="toc-Windows-specific-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Mac-specific" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Mac-specific"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.2.3</span> <span>Mac-specific</span> </div> </a> <ul id="toc-Mac-specific-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Debian_and_Ubuntu" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Debian_and_Ubuntu"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.2.4</span> <span>Debian and Ubuntu</span> </div> </a> <ul id="toc-Debian_and_Ubuntu-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Fedora" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Fedora"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.2.5</span> <span>Fedora</span> </div> </a> <ul id="toc-Fedora-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> </ul> </li> <li id="toc-Basic_usage" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Basic_usage"> <div class="vector-toc-text"> <span class="vector-toc-numb">3</span> <span>Basic usage</span> </div> </a> <button aria-controls="toc-Basic_usage-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle Basic usage subsection</span> </button> <ul id="toc-Basic_usage-sublist" class="vector-toc-list"> <li id="toc-Updating" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Updating"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.1</span> <span>Updating</span> </div> </a> <ul id="toc-Updating-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Using_roles" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Using_roles"> <div class="vector-toc-text"> <span class="vector-toc-numb">4</span> <span>Using roles</span> </div> </a> <button aria-controls="toc-Using_roles-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle Using roles subsection</span> </button> <ul id="toc-Using_roles-sublist" class="vector-toc-list"> <li id="toc-Troubleshooting_specific_roles" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Troubleshooting_specific_roles"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.1</span> <span>Troubleshooting specific roles</span> </div> </a> <ul id="toc-Troubleshooting_specific_roles-sublist" class="vector-toc-list"> <li id="toc-centralauth" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#centralauth"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.1.1</span> <span>centralauth</span> </div> </a> <ul id="toc-centralauth-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-wikidata" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#wikidata"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.1.2</span> <span>wikidata</span> </div> </a> <ul id="toc-wikidata-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-How_to_import_a_Wikidata_dump" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#How_to_import_a_Wikidata_dump"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.2</span> <span>How to import a Wikidata dump</span> </div> </a> <ul id="toc-How_to_import_a_Wikidata_dump-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Additional_suggestions" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Additional_suggestions"> <div class="vector-toc-text"> <span class="vector-toc-numb">5</span> <span>Additional suggestions</span> </div> </a> <button aria-controls="toc-Additional_suggestions-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle Additional suggestions subsection</span> </button> <ul id="toc-Additional_suggestions-sublist" class="vector-toc-list"> <li id="toc-Speeding_up_MediaWiki_on_Windows" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Speeding_up_MediaWiki_on_Windows"> <div class="vector-toc-text"> <span class="vector-toc-numb">5.1</span> <span>Speeding up MediaWiki on Windows</span> </div> </a> <ul id="toc-Speeding_up_MediaWiki_on_Windows-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Local_MediaWiki_core_copy" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Local_MediaWiki_core_copy"> <div class="vector-toc-text"> <span class="vector-toc-numb">5.2</span> <span>Local MediaWiki core copy</span> </div> </a> <ul id="toc-Local_MediaWiki_core_copy-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Update_cloned_repos" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Update_cloned_repos"> <div class="vector-toc-text"> <span class="vector-toc-numb">5.3</span> <span>Update cloned repos</span> </div> </a> <ul id="toc-Update_cloned_repos-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Vagrant_reload" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Vagrant_reload"> <div class="vector-toc-text"> <span class="vector-toc-numb">5.4</span> <span>Vagrant reload</span> </div> </a> <ul id="toc-Vagrant_reload-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-When_to_enable_roles" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#When_to_enable_roles"> <div class="vector-toc-text"> <span class="vector-toc-numb">5.5</span> <span>When to enable roles</span> </div> </a> <ul id="toc-When_to_enable_roles-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Vagrant_behind_proxy" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Vagrant_behind_proxy"> <div class="vector-toc-text"> <span class="vector-toc-numb">5.6</span> <span>Vagrant behind proxy</span> </div> </a> <ul id="toc-Vagrant_behind_proxy-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-MediaWiki-Vagrant_prep" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#MediaWiki-Vagrant_prep"> <div class="vector-toc-text"> <span class="vector-toc-numb">5.7</span> <span>MediaWiki-Vagrant prep</span> </div> </a> <ul id="toc-MediaWiki-Vagrant_prep-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Debugging" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Debugging"> <div class="vector-toc-text"> <span class="vector-toc-numb">6</span> <span>Debugging</span> </div> </a> <button aria-controls="toc-Debugging-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle Debugging subsection</span> </button> <ul id="toc-Debugging-sublist" class="vector-toc-list"> <li id="toc-Vagrant" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Vagrant"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.1</span> <span>Vagrant</span> </div> </a> <ul id="toc-Vagrant-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Provisioning" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Provisioning"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.2</span> <span>Provisioning</span> </div> </a> <ul id="toc-Provisioning-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-PHP" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#PHP"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.3</span> <span>PHP</span> </div> </a> <ul id="toc-PHP-sublist" class="vector-toc-list"> <li id="toc-Chrome" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Chrome"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.3.1</span> <span>Chrome</span> </div> </a> <ul id="toc-Chrome-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Firefox" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Firefox"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.3.2</span> <span>Firefox</span> </div> </a> <ul id="toc-Firefox-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-CLI" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#CLI"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.3.3</span> <span>CLI</span> </div> </a> <ul id="toc-CLI-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Log_files" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Log_files"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.3.4</span> <span>Log files</span> </div> </a> <ul id="toc-Log_files-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Running_and_debugging_unit_tests" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Running_and_debugging_unit_tests"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.4</span> <span>Running and debugging unit tests</span> </div> </a> <ul id="toc-Running_and_debugging_unit_tests-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Running_browser_tests" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Running_browser_tests"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.5</span> <span>Running browser tests</span> </div> </a> <ul id="toc-Running_browser_tests-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Pushing_commits" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Pushing_commits"> <div class="vector-toc-text"> <span class="vector-toc-numb">7</span> <span>Pushing commits</span> </div> </a> <button aria-controls="toc-Pushing_commits-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle Pushing commits subsection</span> </button> <ul id="toc-Pushing_commits-sublist" class="vector-toc-list"> <li id="toc-Gerrit" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Gerrit"> <div class="vector-toc-text"> <span class="vector-toc-numb">7.1</span> <span>Gerrit</span> </div> </a> <ul id="toc-Gerrit-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Troubleshooting" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Troubleshooting"> <div class="vector-toc-text"> <span class="vector-toc-numb">8</span> <span>Troubleshooting</span> </div> </a> <ul id="toc-Troubleshooting-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Advanced_usage" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Advanced_usage"> <div class="vector-toc-text"> <span class="vector-toc-numb">9</span> <span>Advanced usage</span> </div> </a> <button aria-controls="toc-Advanced_usage-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle Advanced usage subsection</span> </button> <ul id="toc-Advanced_usage-sublist" class="vector-toc-list"> <li id="toc-MediaWiki_settings" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#MediaWiki_settings"> <div class="vector-toc-text"> <span class="vector-toc-numb">9.1</span> <span>MediaWiki settings</span> </div> </a> <ul id="toc-MediaWiki_settings-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Vagrant_flags" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Vagrant_flags"> <div class="vector-toc-text"> <span class="vector-toc-numb">9.2</span> <span>Vagrant flags</span> </div> </a> <ul id="toc-Vagrant_flags-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Job_queue" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Job_queue"> <div class="vector-toc-text"> <span class="vector-toc-numb">9.3</span> <span>Job queue</span> </div> </a> <ul id="toc-Job_queue-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Additional_storage_space" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Additional_storage_space"> <div class="vector-toc-text"> <span class="vector-toc-numb">9.4</span> <span>Additional storage space</span> </div> </a> <ul id="toc-Additional_storage_space-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Authoring_roles" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Authoring_roles"> <div class="vector-toc-text"> <span class="vector-toc-numb">10</span> <span>Authoring roles</span> </div> </a> <ul id="toc-Authoring_roles-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Setting_up_an_instance_on_Cloud_VPS" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Setting_up_an_instance_on_Cloud_VPS"> <div class="vector-toc-text"> <span class="vector-toc-numb">11</span> <span>Setting up an instance on Cloud VPS</span> </div> </a> <ul id="toc-Setting_up_an_instance_on_Cloud_VPS-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Bugs" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Bugs"> <div class="vector-toc-text"> <span class="vector-toc-numb">12</span> <span>Bugs</span> </div> </a> <ul id="toc-Bugs-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Links" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Links"> <div class="vector-toc-text"> <span class="vector-toc-numb">13</span> <span>Links</span> </div> </a> <ul id="toc-Links-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Notes" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Notes"> <div class="vector-toc-text"> <span class="vector-toc-numb">14</span> <span>Notes</span> </div> </a> <ul id="toc-Notes-sublist" class="vector-toc-list"> </ul> </li> </ul> </div> </div> </nav> </div> </div> <div class="mw-content-container"> <main id="content" class="mw-body"> <header class="mw-body-header vector-page-titlebar"> <nav aria-label="Contents" class="vector-toc-landmark"> <div id="vector-page-titlebar-toc" class="vector-dropdown vector-page-titlebar-toc vector-button-flush-left" > <input type="checkbox" id="vector-page-titlebar-toc-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-titlebar-toc" class="vector-dropdown-checkbox " aria-label="Toggle the table of contents" > <label id="vector-page-titlebar-toc-label" for="vector-page-titlebar-toc-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-listBullet mw-ui-icon-wikimedia-listBullet"></span> <span class="vector-dropdown-label-text">Toggle the table of contents</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-titlebar-toc-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-main">MediaWiki-Vagrant</span></h1> <div class="mw-indicators"> <div id="mw-indicator-phabricator-project" class="mw-indicator"><div class="mw-parser-output"><div class="mw-parser-output"><style data-mw-deduplicate="TemplateStyles:r6605561">.mw-parser-output .tpl-badge{background-color:var(--background-color-progressive-subtle,#eaf3ff);color:var(--color-base,#202122);border-radius:10px;display:inline-block;font-size:90%;padding:5px 8px}</style><div class="tpl-badge"><a href="/wiki/Special:MyLanguage/Phabricator" title="Special:MyLanguage/Phabricator">Issue tracker</a>: <a href="https://phabricator.wikimedia.org/tag/mediawiki-vagrant/" class="extiw" title="phab:tag/mediawiki-vagrant/"><b>#MediaWiki-Vagrant</b></a></div></div></div></div> </div> </header> <div class="vector-page-toolbar"> <div class="vector-page-toolbar-container"> <div id="left-navigation"> <nav aria-label="Namespaces"> <div id="p-associated-pages" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-associated-pages" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-nstab-main" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/MediaWiki-Vagrant" title="View the content page [c]" accesskey="c"><span>Page</span></a></li><li id="ca-talk" class="vector-tab-noicon mw-list-item"><a href="/wiki/Talk:MediaWiki-Vagrant" rel="discussion" title="Discussion about the content page [t]" accesskey="t"><span>Discussion</span></a></li> </ul> </div> </div> <div id="vector-variants-dropdown" class="vector-dropdown emptyPortlet" > <input type="checkbox" id="vector-variants-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-variants-dropdown" class="vector-dropdown-checkbox " aria-label="Change language variant" > <label id="vector-variants-dropdown-label" for="vector-variants-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">English</span> </label> <div class="vector-dropdown-content"> <div id="p-variants" class="vector-menu mw-portlet mw-portlet-variants emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> </div> </div> </nav> </div> <div id="right-navigation" class="vector-collapsible"> <nav aria-label="Views"> <div id="p-views" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-views" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-view" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/MediaWiki-Vagrant"><span>Read</span></a></li><li id="ca-viewsource" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=MediaWiki-Vagrant&action=edit" title="This page is protected. You can view its source [e]" accesskey="e"><span>View source</span></a></li><li id="ca-history" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=MediaWiki-Vagrant&action=history" title="Past revisions of this page [h]" accesskey="h"><span>View history</span></a></li> </ul> </div> </div> </nav> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-dropdown" class="vector-dropdown vector-page-tools-dropdown" > <input type="checkbox" id="vector-page-tools-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-tools-dropdown" class="vector-dropdown-checkbox " aria-label="Tools" > <label id="vector-page-tools-dropdown-label" for="vector-page-tools-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">Tools</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-tools-unpinned-container" class="vector-unpinned-container"> <div id="vector-page-tools" class="vector-page-tools vector-pinnable-element"> <div class="vector-pinnable-header vector-page-tools-pinnable-header vector-pinnable-header-unpinned" data-feature-name="page-tools-pinned" data-pinnable-element-id="vector-page-tools" data-pinned-container-id="vector-page-tools-pinned-container" data-unpinned-container-id="vector-page-tools-unpinned-container" > <div class="vector-pinnable-header-label">Tools</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-page-tools.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-page-tools.unpin">hide</button> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-has-collapsible-items" title="More options" > <div class="vector-menu-heading"> Actions </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-more-view" class="selected vector-more-collapsible-item mw-list-item"><a href="/wiki/MediaWiki-Vagrant"><span>Read</span></a></li><li id="ca-more-viewsource" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=MediaWiki-Vagrant&action=edit"><span>View source</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=MediaWiki-Vagrant&action=history"><span>View history</span></a></li> </ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb" > <div class="vector-menu-heading"> General </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/Special:WhatLinksHere/MediaWiki-Vagrant" title="A list of all wiki pages that link here [j]" accesskey="j"><span>What links here</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Special:RecentChangesLinked/MediaWiki-Vagrant" rel="nofollow" title="Recent changes in pages linked from this page [k]" accesskey="k"><span>Related changes</span></a></li><li id="t-upload" class="mw-list-item"><a href="//commons.wikimedia.org/wiki/Special:UploadWizard" title="Upload files [u]" accesskey="u"><span>Upload file</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/wiki/Special:SpecialPages" title="A list of all special pages [q]" accesskey="q"><span>Special pages</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/w/index.php?title=MediaWiki-Vagrant&oldid=6753678" title="Permanent link to this revision of this page"><span>Permanent link</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=MediaWiki-Vagrant&action=info" title="More information about this page"><span>Page information</span></a></li><li id="t-cite" class="mw-list-item"><a href="/w/index.php?title=Special:CiteThisPage&page=MediaWiki-Vagrant&id=6753678&wpFormIdentifier=titleform" title="Information on how to cite this page"><span>Cite this page</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Special:UrlShortener&url=https%3A%2F%2Fwww.mediawiki.org%2Fwiki%2FMediaWiki-Vagrant"><span>Get shortened URL</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Special:QrCode&url=https%3A%2F%2Fwww.mediawiki.org%2Fwiki%2FMediaWiki-Vagrant"><span>Download QR code</span></a></li> </ul> </div> </div> <div id="p-coll-print_export" class="vector-menu mw-portlet mw-portlet-coll-print_export" > <div class="vector-menu-heading"> Print/export </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="coll-create_a_book" class="mw-list-item"><a href="/w/index.php?title=Special:Book&bookcmd=book_creator&referer=MediaWiki-Vagrant"><span>Create a book</span></a></li><li id="coll-download-as-rl" class="mw-list-item"><a href="/w/index.php?title=Special:DownloadAsPdf&page=MediaWiki-Vagrant&action=show-download-screen"><span>Download as PDF</span></a></li><li id="t-print" class="mw-list-item"><a href="/w/index.php?title=MediaWiki-Vagrant&printable=yes" title="Printable version of this page [p]" accesskey="p"><span>Printable version</span></a></li> </ul> </div> </div> <div id="p-wikibase-otherprojects" class="vector-menu mw-portlet mw-portlet-wikibase-otherprojects" > <div class="vector-menu-heading"> In other projects </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-wikibase" class="wb-otherproject-link wb-otherproject-wikibase-dataitem mw-list-item"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q21839573" title="Link to connected data repository item [g]" accesskey="g"><span>Wikidata item</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> </div> </div> </div> <div class="vector-column-end"> <div class="vector-sticky-pinned-container"> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-pinned-container" class="vector-pinned-container"> </div> </nav> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-pinned-container" class="vector-pinned-container"> <div id="vector-appearance" class="vector-appearance vector-pinnable-element"> <div class="vector-pinnable-header vector-appearance-pinnable-header vector-pinnable-header-pinned" data-feature-name="appearance-pinned" data-pinnable-element-id="vector-appearance" data-pinned-container-id="vector-appearance-pinned-container" data-unpinned-container-id="vector-appearance-unpinned-container" > <div class="vector-pinnable-header-label">Appearance</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-appearance.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-appearance.unpin">hide</button> </div> </div> </div> </nav> </div> </div> <div id="bodyContent" class="vector-body" aria-labelledby="firstHeading" data-mw-ve-target-container> <div class="vector-body-before-content"> <div id="siteSub" class="noprint">From mediawiki.org</div> </div> <div id="contentSub"><div id="mw-content-subtitle"></div></div> <div id="mw-content-text" class="mw-body-content"><div class="mw-pt-translate-header noprint nomobile" dir="ltr" lang="en"><a href="/w/index.php?title=Special:Translate&group=page-MediaWiki-Vagrant&action=page&filter=&action_source=translate_page" title="Special:Translate">Translate this page</a></div><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr"><div class="mw-pt-languages noprint navigation-not-searchable" lang="en" dir="ltr"><div class="mw-pt-languages-label">Languages:</div><ul class="mw-pt-languages-list"><li><a href="/wiki/MediaWiki-Vagrant/id" class="mw-pt-progress mw-pt-progress--low" title="MediaWiki-Vagrant (2% translated)" lang="id" dir="ltr">Bahasa Indonesia</a></li> <li><a href="/wiki/MediaWiki-Vagrant/de" class="mw-pt-progress mw-pt-progress--low" title="MediaWiki-Vagrant (14% translated)" lang="de" dir="ltr">Deutsch</a></li> <li><span class="mw-pt-languages-ui mw-pt-languages-selected mw-pt-progress mw-pt-progress--complete" lang="en" dir="ltr">English</span></li> <li><a href="/wiki/MediaWiki-Vagrant/tr" class="mw-pt-progress mw-pt-progress--med" title="MediaWiki-Vagrant (52% translated)" lang="tr" dir="ltr">Türkçe</a></li> <li><a href="/wiki/MediaWiki-Vagrant/es" class="mw-pt-progress mw-pt-progress--low" title="MediaWiki-Vagrant (14% translated)" lang="es" dir="ltr">español</a></li> <li><a href="/wiki/MediaWiki-Vagrant/fr" class="mw-pt-progress mw-pt-progress--complete" title="MediaWiki-Vagrant (100% translated)" lang="fr" dir="ltr">français</a></li> <li><a href="/wiki/MediaWiki-Vagrant/it" class="mw-pt-progress mw-pt-progress--low" title="MediaWiki-Vagrant (3% translated)" lang="it" dir="ltr">italiano</a></li> <li><a href="/wiki/MediaWiki-Vagrant/pl" class="mw-pt-progress mw-pt-progress--low" title="MediaWiki-Vagrant (1% translated)" lang="pl" dir="ltr">polski</a></li> <li><a href="/wiki/MediaWiki-Vagrant/pt" class="mw-pt-progress mw-pt-progress--low" title="MediaWiki-Vagrant (2% translated)" lang="pt" dir="ltr">português</a></li> <li><a href="/wiki/MediaWiki-Vagrant/pt-br" class="mw-pt-progress mw-pt-progress--low" title="MediaWiki-Vagrant (5% translated)" lang="pt-BR" dir="ltr">português do Brasil</a></li> <li><a href="/wiki/MediaWiki-Vagrant/sv" class="mw-pt-progress mw-pt-progress--low" title="MediaWiki-Vagrant (2% translated)" lang="sv" dir="ltr">svenska</a></li> <li><a href="/wiki/MediaWiki-Vagrant/cs" class="mw-pt-progress mw-pt-progress--high" title="MediaWiki-Vagrant (88% translated)" lang="cs" dir="ltr">čeština</a></li> <li><a href="/wiki/MediaWiki-Vagrant/el" class="mw-pt-progress mw-pt-progress--low" title="MediaWiki-Vagrant (1% translated)" lang="el" dir="ltr">Ελληνικά</a></li> <li><a href="/wiki/MediaWiki-Vagrant/ru" class="mw-pt-progress mw-pt-progress--med" title="MediaWiki-Vagrant (34% translated)" lang="ru" dir="ltr">русский</a></li> <li><a href="/wiki/MediaWiki-Vagrant/ta" class="mw-pt-progress mw-pt-progress--low" title="MediaWiki-Vagrant (1% translated)" lang="ta" dir="ltr">தமிழ்</a></li> <li><a href="/wiki/MediaWiki-Vagrant/th" class="mw-pt-progress mw-pt-progress--low" title="MediaWiki-Vagrant (3% translated)" lang="th" dir="ltr">ไทย</a></li> <li><a href="/wiki/MediaWiki-Vagrant/zh" class="mw-pt-progress mw-pt-progress--med" title="MediaWiki-Vagrant (25% translated)" lang="zh" dir="ltr">中文</a></li> <li><a href="/wiki/MediaWiki-Vagrant/ja" class="mw-pt-progress mw-pt-progress--med" title="MediaWiki-Vagrant (65% translated)" lang="ja" dir="ltr">日本語</a></li> <li><a href="/wiki/MediaWiki-Vagrant/ko" class="mw-pt-progress mw-pt-progress--low" title="MediaWiki-Vagrant (2% translated)" lang="ko" dir="ltr">한국어</a></li></ul></div> <figure class="mw-halign-center" typeof="mw:File"><a href="/wiki/File:MediaWiki_Vagrant_Visualization.svg" class="mw-file-description" title="Visual overview of Vagrant"><img alt="Visual overview of Vagrant" src="//upload.wikimedia.org/wikipedia/commons/thumb/9/9e/MediaWiki_Vagrant_Visualization.svg/900px-MediaWiki_Vagrant_Visualization.svg.png" decoding="async" width="900" height="371" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/9/9e/MediaWiki_Vagrant_Visualization.svg/1350px-MediaWiki_Vagrant_Visualization.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/9/9e/MediaWiki_Vagrant_Visualization.svg/1800px-MediaWiki_Vagrant_Visualization.svg.png 2x" data-file-width="512" data-file-height="211"/></a><figcaption>Visual overview of Vagrant</figcaption></figure> <figure class="mw-halign-right" typeof="mw:File"><a href="/wiki/File:MediaWiki_Vagrant.svg" class="mw-file-description" title="MediaWiki Vagrant logo"><img alt="MediaWiki Vagrant logo" src="//upload.wikimedia.org/wikipedia/commons/thumb/c/c0/MediaWiki_Vagrant.svg/120px-MediaWiki_Vagrant.svg.png" decoding="async" width="120" height="135" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/c/c0/MediaWiki_Vagrant.svg/180px-MediaWiki_Vagrant.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/c/c0/MediaWiki_Vagrant.svg/240px-MediaWiki_Vagrant.svg.png 2x" data-file-width="347" data-file-height="390"/></a><figcaption>MediaWiki Vagrant logo</figcaption></figure> <figure class="mw-default-size" typeof="mw:File/Thumb"><span><audio id="mwe_player_0" controls="" preload="none" data-mw-tmh="" class="mw-file-element" width="220" style="width:220px;" data-durationhint="272" data-mwtitle="What_is_Vagrant.flac" data-mwprovider="wikimediacommons" resource="/wiki/File:What_is_Vagrant.flac"><source src="//upload.wikimedia.org/wikipedia/commons/transcoded/f/f3/What_is_Vagrant.flac/What_is_Vagrant.flac.ogg" type="audio/ogg; codecs="vorbis"" data-transcodekey="ogg" data-width="0" data-height="0"/><source src="//upload.wikimedia.org/wikipedia/commons/transcoded/f/f3/What_is_Vagrant.flac/What_is_Vagrant.flac.mp3" type="audio/mpeg" data-transcodekey="mp3" data-width="0" data-height="0"/><source src="//upload.wikimedia.org/wikipedia/commons/f/f3/What_is_Vagrant.flac" type="audio/flac" data-width="0" data-height="0"/></audio></span><figcaption>Bryan Davis explains in an interview at Wikimania what MediaWiki Vagrant is</figcaption></figure> <figure class="mw-default-size" typeof="mw:File/Thumb"><span><video id="mwe_player_1" poster="//upload.wikimedia.org/wikipedia/commons/thumb/5/52/What%27s_new_with_MediaWiki-Vagrant.webm/220px--What%27s_new_with_MediaWiki-Vagrant.webm.jpg" controls="" preload="none" data-mw-tmh="" class="mw-file-element" width="220" height="124" data-durationhint="2617" data-mwtitle="What's_new_with_MediaWiki-Vagrant.webm" data-mwprovider="wikimediacommons" resource="/wiki/File:What%27s_new_with_MediaWiki-Vagrant.webm"><source src="//upload.wikimedia.org/wikipedia/commons/transcoded/5/52/What%27s_new_with_MediaWiki-Vagrant.webm/What%27s_new_with_MediaWiki-Vagrant.webm.360p.vp9.webm" type="video/webm; codecs="vp9, opus"" data-transcodekey="360p.vp9.webm" data-width="640" data-height="360"/><source src="//upload.wikimedia.org/wikipedia/commons/5/52/What%27s_new_with_MediaWiki-Vagrant.webm" type="video/webm; codecs="vp8, vorbis"" data-width="640" data-height="360"/><source src="//upload.wikimedia.org/wikipedia/commons/transcoded/5/52/What%27s_new_with_MediaWiki-Vagrant.webm/What%27s_new_with_MediaWiki-Vagrant.webm.360p.webm" type="video/webm; codecs="vp8, vorbis"" data-transcodekey="360p.webm" data-width="640" data-height="360"/><source src="//upload.wikimedia.org/wikipedia/commons/transcoded/5/52/What%27s_new_with_MediaWiki-Vagrant.webm/What%27s_new_with_MediaWiki-Vagrant.webm.240p.vp9.webm" type="video/webm; codecs="vp9, opus"" data-transcodekey="240p.vp9.webm" data-width="426" data-height="240"/></video></span><figcaption>TechTalk on MediaWiki-Vagrant by Bryan Davis and Dan Duvall</figcaption></figure> <figure class="mw-default-size" typeof="mw:File/Thumb"><a href="/wiki/File:MediaWiki-Vagrant_Tech_Talk_2014Q4.pdf" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/1/1d/MediaWiki-Vagrant_Tech_Talk_2014Q4.pdf/page1-220px-MediaWiki-Vagrant_Tech_Talk_2014Q4.pdf.jpg" decoding="async" width="220" height="124" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/1/1d/MediaWiki-Vagrant_Tech_Talk_2014Q4.pdf/page1-330px-MediaWiki-Vagrant_Tech_Talk_2014Q4.pdf.jpg 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/1/1d/MediaWiki-Vagrant_Tech_Talk_2014Q4.pdf/page1-440px-MediaWiki-Vagrant_Tech_Talk_2014Q4.pdf.jpg 2x" data-file-width="1500" data-file-height="843"/></a><figcaption>Slides from TechTalk on MediaWiki-Vagrant by Bryan Davis and Dan Duvall</figcaption></figure> <p><b>MediaWiki-Vagrant</b> is a portable MediaWiki development environment. It consists of a set of configuration scripts for <a href="https://en.wikipedia.org/wiki/Vagrant_(software)" class="extiw" title="w:Vagrant (software)">Vagrant</a> and <a href="https://en.wikipedia.org/wiki/VirtualBox" class="extiw" title="w:VirtualBox">VirtualBox</a> that automate the creation of a virtual machine that runs MediaWiki. Since the configuration is geared towards easy development rather than security, MediaWiki-Vagrant is not recommended for publicly accessible wikis. </p><p>The virtual machine that MediaWiki-Vagrant creates makes it easy to learn about, modify, and improve MediaWiki's code: useful debugging information is displayed by default, and various developer tools are set up specifically for inspecting and interacting with MediaWiki code, including a powerful debugger and an interactive interpreter. Best of all, because the configuration is automated and contained in a virtual environment, mistakes are easy to undo. </p> <meta property="mw:PageProp/toc"/> <div class="mw-heading mw-heading2 ext-discussiontools-init-section"><h2 id="System_requirements" data-mw-thread-id="h-System_requirements"><span data-mw-comment-start="" id="h-System_requirements"></span>System requirements<span data-mw-comment-end="h-System_requirements"></span></h2><!--__DTELLIPSISBUTTON__{"threadItem":{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-System_requirements","replies":[]}}--></div> <dl><dt>CPU</dt> <dd>64-bit x86 processor</dd> <dt>OS</dt> <dd><a href="#Debian_and_Ubuntu">Linux</a>, <a href="#Mac-specific">macOS</a>, or <a href="#Windows-specific">Windows</a></dd> <dt>Memory</dt> <dd>At least 4 GiB RAM total on your system, preferably 8 GiB or more, in order to run both the host operating system and the VM. <b>Do not</b> attempt to run on a system with only 2 GiB RAM, it will eventually fail.</dd> <dt>Disk</dt> <dd>For complex installations, you must have 10–12 GB free on the primary drive (<code>/home</code> partition for Linux, <code>C:</code> drive for Windows). Note in particular that the VM disk images will be stored under your home directory by default.</dd> <dt>Network</dt> <dd>Active network connection with sufficient bandwidth to download Debian Linux updates and the MediaWiki source code.</dd> <dt>Time for setup</dt> <dd>20 minutes to 2 hours, depending on conditions and if you have any troubles</dd></dl> <div class="mw-heading mw-heading2 ext-discussiontools-init-section"><h2 id="Quick_start" data-mw-thread-id="h-Quick_start"><span data-mw-comment-start="" id="h-Quick_start"></span>Quick start<span data-mw-comment-end="h-Quick_start"></span></h2><!--__DTELLIPSISBUTTON__{"threadItem":{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Quick_start","replies":["h-Windows_Subsystem_for_Linux_(WSL)-Quick_start","h-Troubleshooting_startup-Quick_start"]}}--></div> <p>(If you are installing MediaWiki-Vagrant from the USB distribution, follow the steps in the README rather than the first five steps.) </p> <ol><li><a rel="nofollow" class="external text" href="https://git-scm.com/">Get Git</a></li> <li>(Linux only) Install <a href="https://en.wikipedia.org/wiki/Network_File_System" class="extiw" title="w:Network File System">NFS</a> if it is not already installed. <ul><li>In Ubuntu, use <code>sudo apt-get install nfs-kernel-server</code>.</li> <li>Fedora usually comes with NFS installed; if not, run <code>sudo dnf install nfs-utils</code>.</li></ul></li> <li><a rel="nofollow" class="external text" href="https://www.virtualbox.org/wiki/Downloads">Get VirtualBox</a><sup id="cite_ref-fedora_1-0" class="reference"><a href="#cite_note-fedora-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup></li> <li><a rel="nofollow" class="external text" href="https://www.vagrantup.com/downloads">Get Vagrant</a>. Note that Vagrant v2.3.7 is the last version licensed under a free license.<sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup></li> <li>Clone code into your current directory (don't clone into a folder in WSL)<sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup> <dl><dd><div class="mw-highlight mw-highlight-lang-shell-session mw-content-ltr" dir="ltr"><pre><span></span><span class="gp">$ </span>git<span class="w"> </span>clone<span class="w"> </span>--recursive<span class="w"> </span>https://gerrit.wikimedia.org/r/mediawiki/vagrant </pre></div></dd></dl></li> <li>Enter vagrant directory to run <code>vagrant</code> commands in: <dl><dd><div class="mw-highlight mw-highlight-lang-shell-session mw-content-ltr" dir="ltr"><pre><span></span><span class="gp">$ </span><span class="nb">cd</span><span class="w"> </span>vagrant </pre></div></dd></dl></li> <li>Run setup script to setup vagrant before starting the machine: <dl><dd>Linux/macOS:</dd> <dd><div class="mw-highlight mw-highlight-lang-shell-session mw-content-ltr" dir="ltr"><pre><span></span><span class="gp">$ </span>./setup.sh </pre></div></dd> <dd>Windows:</dd> <dd><div class="mw-highlight mw-highlight-lang-shell-session mw-content-ltr" dir="ltr"><pre><span></span><span class="gp">$ </span>.<span class="se">\s</span>etup.bat </pre></div></dd> <dd>When prompted, enter your <a href="/wiki/Special:MyLanguage/Gerrit" title="Special:MyLanguage/Gerrit">Gerrit</a> user name (recommended), or just press <style data-mw-deduplicate="TemplateStyles:r6747130">.mw-parser-output .keyboard-key{border:1px solid var(--border-color-base,#aaa);border-radius:0.2em;box-shadow:0.1em 0.2em 0.2em #ddd;background-image:linear-gradient(to bottom,var(--background-color-neutral,#eee),var(--background-color-interactive-subtle,#f9f9f9),var(--background-color-neutral,#eee));color:var(--color-base,#333);padding:0.1em 0.3em;font-family:inherit;font-size:0.85em}@media screen{html.skin-theme-clientpref-night .mw-parser-output .keyboard-key{box-shadow:0.1em 0.2em 0.2em #444}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .keyboard-key{box-shadow:0.1em 0.2em 0.2em #444}}</style><kbd class="keyboard-key nowrap">↵ Enter</kbd>.</dd> <dd>If you want to use a release branch instead of the latest version, you can specify it now with <code>vagrant hiera mediawiki::branch REL1_27</code></dd></dl></li> <li>Start the virtual machine: <dl><dd><div class="mw-highlight mw-highlight-lang-shell-session mw-content-ltr" dir="ltr"><pre><span></span><span class="gp">$ </span>vagrant<span class="w"> </span>up </pre></div></dd> <dd>Doing this for the first time might ask for your password as setting up directory sharing via NFS requires sysadmin rights. You can avoid that by setting the appropriate <code>sudo</code> permissions, <a rel="nofollow" class="external text" href="https://developer.hashicorp.com/vagrant/docs/synced-folders/nfs#root-privilege-requirement">as described here</a>.</dd> <dd>Pay attention to the console output to make sure that there are no errors. If you bump into errors, the <a href="#Troubleshooting_startup">#Troubleshooting startup</a> section may be helpful.</dd></dl></li> <li>Run the command <code>vagrant open</code> to open your MediaWiki instance. You can login with user <code>Admin</code> and password <code>vagrant</code>.</li> <li>Enable additional MediaWiki features and extensions. <dl><dd>To see a list of features (vagrant roles) you can enable, run:</dd> <dd><div class="mw-highlight mw-highlight-lang-shell-session mw-content-ltr" dir="ltr"><pre><span></span><span class="gp">$ </span>vagrant<span class="w"> </span>roles<span class="w"> </span>list </pre></div></dd> <dd>To enable a feature, for example the <a href="/wiki/Special:MyLanguage/Extension:VisualEditor" title="Special:MyLanguage/Extension:VisualEditor">VisualEditor</a><span style="display:none"><a href="/wiki/Extension:VisualEditor" title="Extension:VisualEditor"> </a></span>, run:</dd> <dd><div class="mw-highlight mw-highlight-lang-shell-session mw-content-ltr" dir="ltr"><pre><span></span><span class="gp">$ </span>vagrant<span class="w"> </span>roles<span class="w"> </span><span class="nb">enable</span><span class="w"> </span>visualeditor </pre></div></dd> <dd>To apply the roles you've enabled to your wiki, run:</dd> <dd><div class="mw-highlight mw-highlight-lang-shell-session mw-content-ltr" dir="ltr"><pre><span></span><span class="gp">$ </span>vagrant<span class="w"> </span>provision </pre></div></dd></dl></li></ol> <style data-mw-deduplicate="TemplateStyles:r6651107">.mw-parser-output .note{background-position:left 7px top 50%;padding:0.5em 0.5em 0.5em 40px;margin:0.5em 0;overflow:hidden;background-color:#f8f9fa;color:#333;background-repeat:no-repeat;border:1px solid #ddd}.mw-parser-output .note-inline{display:inline-block;vertical-align:middle}.mw-parser-output .note-info{background-color:#eaf3ff;color:#333;background-image:url("https://upload.wikimedia.org/wikipedia/commons/e/ec/OOjs_UI_icon_information-progressive.svg");background-size:25px;border-color:#a3caff;padding-left:40px;min-height:25px}.mw-parser-output .note-reminder{background-color:#fff9ea;color:#333;background-image:url("https://upload.wikimedia.org/wikipedia/commons/a/a8/OOjs_UI_icon_lightbulb-yellow.svg");background-size:25px;border-color:#fc3;min-height:25px}.mw-parser-output .note-warn{background-color:#fff9ea;color:#333;background-image:url("https://upload.wikimedia.org/wikipedia/commons/3/3b/OOjs_UI_icon_alert-warning.svg");background-size:25px;border-color:#fc3;min-height:25px}.mw-parser-output .note-error{background-color:#fee7e6;color:#333;background-image:url("https://upload.wikimedia.org/wikipedia/commons/b/bf/OOjs_UI_icon_notice-destructive.svg");background-size:25px;border-color:#c33;min-height:25px}@media screen{html.skin-theme-clientpref-night .mw-parser-output .note{background-color:transparent;color:inherit}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .note{background-color:transparent;color:inherit}}</style><div role="note" class="note note-info"><code>vagrant up</code> fails if the default VirtualBox provider is used and the number of virtual CPUs on the host exceeds 32. Use <code>vagrant config vagrant_cores <number of cores></code> to assign less than 32 of the cores to the VM.</div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r6651107"><div role="note" class="note note-info">It may take an hour or more before the first <code>vagrant up</code> completes.</div> <div class="mw-heading mw-heading3"><h3 id="Windows_Subsystem_for_Linux_(WSL)" data-mw-thread-id="h-Windows_Subsystem_for_Linux_(WSL)-Quick_start"><span id="Windows_Subsystem_for_Linux_.28WSL.29"></span><span data-mw-comment-start="" id="h-Windows_Subsystem_for_Linux_(WSL)-Quick_start"></span>Windows Subsystem for Linux (WSL)<span data-mw-comment-end="h-Windows_Subsystem_for_Linux_(WSL)-Quick_start"></span></h3></div> <p>If you are using the WSL Linux-compatible shell on Windows: run commands with <code>vagrant.exe</code> instead of <code>vagrant</code>. Run <code>vagrant.exe config --required</code> instead of <code>./setup.bat</code>, which does not work in the Linux bash shell. </p><p>The account running Vagrant will probably need the "Create Symbolic Links" permission (the easy way to achieve that is running as administrator). </p> <div class="mw-heading mw-heading3"><h3 id="Troubleshooting_startup" data-mw-thread-id="h-Troubleshooting_startup-Quick_start"><span data-mw-comment-start="" id="h-Troubleshooting_startup-Quick_start"></span>Troubleshooting startup<span data-mw-comment-end="h-Troubleshooting_startup-Quick_start"></span></h3></div> <p>If your issues are not answered here, <a href="/wiki/Special:MyLanguage/MediaWiki_on_IRC" title="Special:MyLanguage/MediaWiki on IRC">IRC</a> is a good option, specifically the <style data-mw-deduplicate="TemplateStyles:r6651115">.mw-parser-output .irc-connect>a{color:green}@media screen{html.skin-theme-clientpref-night .mw-parser-output .irc-connect>a{color:#12c812}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .irc-connect>a{color:#12c812}}</style><span class="plainlinks" style="font-family: monospace,Courier; white-space: pre-wrap !important; word-wrap: break-word; max-width: 1200px; overflow: auto;" title="#wikimedia-tech on Libera.Chat IRC"><a rel="nofollow" class="external text" href="ircs://irc.libera.chat:6697/wikimedia-tech">#wikimedia-tech</a></span> <sup class="plainlinks irc-connect"><a rel="nofollow" class="external text" href="https://web.libera.chat/?channel=#wikimedia-tech">connect</a></sup> channel. </p> <ul><li>Sometimes you can fix broken installations (e.g. one saying <a href="https://phabricator.wikimedia.org/T116500" class="extiw" title="phab:T116500">"No wiki found..."</a> by running <code>vagrant destroy; vagrant up</code> which will rebuild the virtual machine without repeating the most time-consuming parts of the installation process.</li></ul> <div class="mw-heading mw-heading4"><h4 id="Any_host" data-mw-thread-id="h-Any_host-Troubleshooting_startup"><span data-mw-comment-start="" id="h-Any_host-Troubleshooting_startup"></span>Any host<span data-mw-comment-end="h-Any_host-Troubleshooting_startup"></span></h4></div> <ul><li>You can try installing the versions of VirtualBox and Vagrant that your Linux distribution provides. If you're running recent Debian or Ubuntu, try <code>sudo apt-get install virtualbox vagrant</code> to install the packages for <a rel="nofollow" class="external text" href="https://wiki.debian.org/VirtualBox">VirtualBox</a> and Vagrant.</li> <li>If you get errors from <code>vagrant up</code>, instead install the most recent versions of VirtualBox and Vagrant.</li> <li>If you run into error message like "Couldn't open file $CLONED_REPOSITORY/trusty-cloud", try the following command: <code>vagrant up --provider=virtualbox</code></li> <li>If you got any puppet errors you might need to init puppet submodules, on vagrant directory run <code>git submodule update --init</code> <ul><li><code>Error: <code style="background-color: transparent; border:none; padding: 0px 0px;" class="inline-syntax mw-highlight mw-highlight-lang-php mw-content-ltr" dir="ltr"><span class="nx">Puppet</span><span class="o">::</span><span class="na">Parser</span><span class="o">::</span><span class="na">AST</span><span class="o">::</span><span class="na">Resource</span></code> failed with error ArgumentError: Could not find declared class</code></li></ul></li> <li>Use <span class="plainlinks"><a rel="nofollow" class="external free" href="http://127.0.0.1:8080/info.php">http://127.0.0.1:8080/info.php</a></span> to check that Apache/PHP is up and running.</li></ul> <p>You might want to compare the output of the initial run of <code>vagrant up</code> in your terminal with this <a href="/wiki/MediaWiki-Vagrant/Initial_run" title="MediaWiki-Vagrant/Initial run">sample</a>. The initial setup may take a long time; if it seems to hang somewhere but there are no errors, just give it a while. </p> <ul><li>If you get warnings that your VirtualBox Guest Additions are the wrong version, you can try installing the <a rel="nofollow" class="external text" href="https://github.com/dotless-de/vagrant-vbguest">vagrant-vbguest</a> plugin which updates them automatically.</li> <li>Vagrant rarely loses pairing with your VM. <a rel="nofollow" class="external text" href="https://github.com/hashicorp/vagrant/issues/1755">This thread</a> discusses some ways to work around it (e.g. attaching old VM harddrive to the new profile)</li> <li>Make sure that <code>vagrant/mediawiki</code> repository is up to date:</li></ul> <div class="mw-highlight mw-highlight-lang-shell-session mw-content-ltr" dir="ltr"><pre><span></span><span class="gp">$ </span><span class="nb">cd</span><span class="w"> </span>vagrant/mediawiki <span class="gp">$ </span>git<span class="w"> </span>pull </pre></div> <ul><li>Make sure that you have enabled virtualization in the BIOS. Sometimes this is under the Security settings.</li> <li>Make sure your language encoding settings are UTF-8. If you get "<a rel="nofollow" class="external text" href="https://github.com/rubygems/bundler/issues/1570">invalid byte sequence in US-ASCII</a>", try (re)setting your LANG and LC_ALL environment variables to something suitable. For example:</li></ul> <div class="mw-highlight mw-highlight-lang-bash mw-content-ltr" dir="ltr"><pre><span></span><span class="nb">export</span><span class="w"> </span><span class="nv">LANG</span><span class="o">=</span>en_US.UTF-8 <span class="nb">export</span><span class="w"> </span><span class="nv">LC_ALL</span><span class="o">=</span>en_US.UTF-8 </pre></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r6651107"><div role="note" class="note note-info">If you have deleted any old VMs you will see an error message like "...path contains non-directory or non-existent components..." and <code>vagrant up</code> will not complete. If you are using NFS (on a non-Windows host operating system), you should be able to fix this by removing <code>/etc/exports</code>: enter <code>sudo rm -i /etc/exports</code> Vagrant will recreate the <code>/etc/exports</code> file the next time you run <code>vagrant up</code>.</div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r6651107"><div role="note" class="note note-info"><i>MediaWiki-Vagrant will not run on a host that doesn't support VT-X because it specifies a 64bit guest (virtual machine).</i> MediaWiki-Vagrant needs to run on a 64-bit virtual machine, in part because it uses use deb packages from WMF production that are only built for the amd64 architecture.</div> <div class="mw-heading mw-heading4"><h4 id="Windows-specific" data-mw-thread-id="h-Windows-specific-Troubleshooting_startup"><span data-mw-comment-start="" id="h-Windows-specific-Troubleshooting_startup"></span>Windows-specific<span data-mw-comment-end="h-Windows-specific-Troubleshooting_startup"></span></h4></div> <ul><li>If you are on Windows and you get "guest machine entered an invalid state" - "poweroff", try downloading a 4.3.15 build of VirtualBox (<a rel="nofollow" class="external text" href="https://forums.virtualbox.org/viewtopic.php?f=6&t=62615">there is a known problem with 4.3.14 on Windows</a>). If that does not help, make sure you enable Hardware Virtualization Technology (VT-x or AMD-V) in BIOS. Hardware Virtualization is required. It is not an optional performance enhancement. (Some laptops require you to remove the power cable and battery for 30 seconds <a rel="nofollow" class="external autonumber" href="https://forums.virtualbox.org/viewtopic.php?f=1&t=36464#p163497">[1]</a>)</li> <li><b>VirtualBox is incompatible with Microsoft's Hyper-V.</b> If you have Hyper-V enabled – which may be the default if you have installed Visual Studio – you'll get the above errors trying to boot up a VM in VirtualBox. There are three possibilities: <ul><li>In command prompt, run <i>bcdedit /set hypervisorlaunchtype off</i> to turn off Hyper-V and reboot. To turn Hyper-V back on set it back to <i>auto</i> instead of <i>off</i></li> <li>Disable Hyper-V through 'Add/Remove Windows Features' in Control Panel and reboot. This will get VirtualBox working, but will prevent you from using any Hyper-V VMs you may have, such as Windows Phone emulators.</li> <li>or, use the <a href="/wiki/Special:MyLanguage/MediaWiki-Vagrant/Hyper-V" title="Special:MyLanguage/MediaWiki-Vagrant/Hyper-V">Hyper-V provider</a> for Vagrant instead of VirtualBox. This may be unstable.</li></ul></li></ul> <div class="mw-heading mw-heading4"><h4 id="Mac-specific" data-mw-thread-id="h-Mac-specific-Troubleshooting_startup"><span data-mw-comment-start="" id="h-Mac-specific-Troubleshooting_startup"></span>Mac-specific<span data-mw-comment-end="h-Mac-specific-Troubleshooting_startup"></span></h4></div> <ul><li><b>NFS errors</b> To avoid NFS errors, while installing, ensure the firewall will accept connections: Apple > System Preferences > Security & Privacy > Firewall > Firewall Options. You will need to UNcheck "Block all incoming connections" and probably also UNcheck "Enable stealth mode" in order to accept the following: netbiosd, nfsd, rpc.lockd, rpc.rquotad, rpcbind, VBoxHeadless. Note, you may need to restart your computer and change the status to "Allow incoming connections" during a couple <code>vagrant up</code>s. After installation, you may be able to re-check "Block all incoming connections and "Enable stealth mode" now that the firewall rules have been updated. <ul><li>Alternatively you can turn off NFS shares via <code>vagrant config nfs_shares off</code></li></ul></li></ul> <div class="mw-heading mw-heading4"><h4 id="Debian_and_Ubuntu" data-mw-thread-id="h-Debian_and_Ubuntu-Troubleshooting_startup"><span data-mw-comment-start="" id="h-Debian_and_Ubuntu-Troubleshooting_startup"></span>Debian and Ubuntu<span data-mw-comment-end="h-Debian_and_Ubuntu-Troubleshooting_startup"></span></h4></div> <ul><li>MediaWiki-Vagrant uses <a href="https://en.wikipedia.org/wiki/Network_File_System" class="extiw" title="w:Network File System">NFS</a> to share some folders with the host machine (your computer). You need to set up your computer as an "NFS server", see e.g., <a rel="nofollow" class="external text" href="https://help.ubuntu.com/community/SettingUpNFSHowTo">Ubuntu instructions</a>. On Debian, <code>sudo apt-get install nfs-kernel-server</code> will work; you may need to <code>modprobe nfsv3</code> as well. <b>Note that Debian's NFS server will not start without an entry in <code>/etc/exports</code>.</b> If <code>sudo rpcinfo -p</code> doesn't show "nfs" services running, this is likely what's going on. Adding your home directory as the last line in <code>/etc/exports</code> and then <code>/etc/init.d/nfs-kernel-server restart</code> will usually be good enough to get you past this chicken-and-egg problem.</li> <li>The NFS shares used by MediaWiki-Vagrant cannot be run from an encrypted directory, as may be the case if you are running on Ubuntu and using an encrypted home directory. To run MediaWiki-Vagrant, you can either: <ul><li>Move the MediaWiki-Vagrant directory to an unencrypted volume (e.g., <code>/opt</code>) before running <code>vagrant up</code></li> <li>Alternatively, you can turn off NFS shares via <code>vagrant config nfs_shares off</code></li></ul></li> <li>NFS setup seems to get stuck sometimes (initial <code>vagrant up</code> hangs at "Mounting NFS shared folders"). Restarting the NFS daemon on the host helps. (See <a rel="nofollow" class="external text" href="https://github.com/mitchellh/vagrant/issues/5802">#5802</a>.)</li> <li>If you are getting port forwarding errors saying the ports are in use, you may need to open up VirtualBox, entirely remove the virtual machine, and try again.</li> <li><code>vagrant up</code> may tell you that "The executable 'bsdtar' Vagrant is trying to run was not found in the PATH variable." You can fix this on Ubuntu with <code>sudo apt install libarchive-tools</code>.</li> <li>On Ubuntu with Secure Boot enabled, you will have a difficult time installing VirtualBox. Your machine may give you guff when you run <code>/sbin/vboxconfig</code>. If it does, you can rectify the situation by signing the associated kernel module. Step-by-step instructions can be found in <a rel="nofollow" class="external text" href="https://askubuntu.com/questions/760671/could-not-load-vboxdrv-after-upgrade-to-ubuntu-16-04-and-i-want-to-keep-secur/768310#768310">this askubuntu post</a>.</li></ul> <div class="mw-heading mw-heading4"><h4 id="Fedora" data-mw-thread-id="h-Fedora-Troubleshooting_startup"><span data-mw-comment-start="" id="h-Fedora-Troubleshooting_startup"></span>Fedora<span data-mw-comment-end="h-Fedora-Troubleshooting_startup"></span></h4></div> <ul><li>If you get <code>Network 10.11.12.13 is not available.</code> after running <code>vagrant up</code>, disable SELinux via <code>sudo setenforce 0</code> or fix your SELinux setup.</li> <li>If you get <code>The provider for this Vagrant-managed machine is reporting that it is not yet ready for SSH.</code> after running <code>vagrant roles enable mediawiki --provision</code>, make sure to explicitly set the provider, for example via <code>vagrant destroy</code> followed by <code>vagrant up --provider=virtualbox</code></li> <li>If you get <code>mount.nfs: mount to NFS server '10.11.12.13:download-directory/vagrant' failed: RPC Error: Unable to receive</code>, run <code>vagrant config nfs_shares</code></li></ul> <div class="mw-heading mw-heading2 ext-discussiontools-init-section"><h2 id="Basic_usage" data-mw-thread-id="h-Basic_usage"><span data-mw-comment-start="" id="h-Basic_usage"></span>Basic usage<span data-mw-comment-end="h-Basic_usage"></span></h2><!--__DTELLIPSISBUTTON__{"threadItem":{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Basic_usage","replies":["h-Updating-Basic_usage"]}}--></div> <figure class="mw-default-size" typeof="mw:File/Thumb"><a href="/wiki/File:Mediawiki-vagrant-screenshot.png" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/0/06/Mediawiki-vagrant-screenshot.png/220px-Mediawiki-vagrant-screenshot.png" decoding="async" width="220" height="146" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/0/06/Mediawiki-vagrant-screenshot.png/330px-Mediawiki-vagrant-screenshot.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/0/06/Mediawiki-vagrant-screenshot.png/440px-Mediawiki-vagrant-screenshot.png 2x" data-file-width="916" data-file-height="606"/></a><figcaption>Screenshot</figcaption></figure> <p>The <code>vagrant</code> command-line tool on the host machine provides several subcommands for controlling your virtual machine. You've already used one: <code>vagrant up</code>, which turns on the virtual machine. Like most <code>vagrant</code> subcommands, you need to run it from the MediaWiki-Vagrant directory or one of its children. When you first run it, Vagrant will fetch a system image and set up requisite software for running MediaWiki. This can take 1–2 hours of CPU and wall clock time on a broadband connection, but it only needs to happen once. When you run <code>vagrant up</code> in the future, it will simply boot up the machine. </p><p><code>vagrant ssh</code> starts an interactive login shell on the virtual machine. It'll log you in as the user <code>vagrant</code>; root access is available to via <code>sudo</code>, which is passwordless. Because the virtual machine is entirely sandboxed within your computer, it is configured for convenience, not security. As a rule, whenever you encounter a password prompt, the password is <code>vagrant</code>. </p><p>When you log in, you should see a colorful MediaWiki banner and a few reminders of useful commands. </p><p>The command <code>phpsh</code> will start an interactive PHP interpreter with MediaWiki's codebase already loaded. You can type in some code, hit 'enter', and the code will be evaluated immediately. If you start a line with '=', its computed value will be pretty-printed. Type <code>?</code> for quick help or <code>help start</code> for additional instructions. </p><p>The <code>/vagrant</code> folder corresponds to the MediaWiki-Vagrant folder on your host machine, and its contents is shared. MediaWiki's code is installed in <code>/vagrant/mediawiki</code>. This allows you to use your normal editor environment on your host machine to edit the MediaWiki code that runs on your virtual machine. </p> <div class="mw-heading mw-heading3"><h3 id="Updating" data-mw-thread-id="h-Updating-Basic_usage"><span data-mw-comment-start="" id="h-Updating-Basic_usage"></span>Updating<span data-mw-comment-end="h-Updating-Basic_usage"></span></h3></div> <p>Use <code>vagrant git-update</code> to keep your git repositories, external libraries, and database schema up to date. This command is equivalent to running </p> <ol><li><code>git pull</code> in <code>core</code> and all extension and skin directories</li> <li><code>composer update</code> to ensure that the latest Composer-managed libraries are available</li> <li>finally the <code>update.php</code> script.</li></ol> <p>You should also occasionally (or when needed for a new feature) update MediaWiki-Vagrant itself, which <code>vagrant git-update</code> does not include. Run: </p> <div class="mw-highlight mw-highlight-lang-bash mw-content-ltr" dir="ltr"><pre><span></span>git<span class="w"> </span>pull </pre></div> <p>… in your MediaWiki-Vagrant root directory. This will take effect when you run: </p> <div class="mw-highlight mw-highlight-lang-bash mw-content-ltr" dir="ltr"><pre><span></span>vagrant<span class="w"> </span>provision </pre></div> <p>You can run that command immediately after you run <code>git pull</code>, or sometime after. </p> <table class="warning-message" style="background-color: var( --background-color-error-subtle, #ffe9e5 ); color: var( --color-base, #202122 ); border: 1px var( --border-color-error, #9f3526 ) solid; box-sizing: border-box; margin: 0.5em 0; padding: 0.5em;"><tbody><tr><td style="white-space: nowrap; vertical-align: top;"><span style="position: relative; top: -2px;"><span typeof="mw:File"><span><img alt="Warning" src="//upload.wikimedia.org/wikipedia/commons/thumb/b/bf/OOjs_UI_icon_notice-destructive.svg/18px-OOjs_UI_icon_notice-destructive.svg.png" decoding="async" width="18" height="18" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/b/bf/OOjs_UI_icon_notice-destructive.svg/27px-OOjs_UI_icon_notice-destructive.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/b/bf/OOjs_UI_icon_notice-destructive.svg/36px-OOjs_UI_icon_notice-destructive.svg.png 2x" data-file-width="20" data-file-height="20"/></span></span></span> <b>Warning:</b> </td><td style="padding-left: 0.5em vertical-align: top;">If you update from git manually you may also need to run <code>composer update</code> to download external libraries required by MediaWiki. You can run the <code>checkComposerLockUpToDate.php</code> script to see if <code>composer update</code> is needed.</td></tr></tbody></table> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r6651107"><div role="note" class="note note-info">Some projects have NPM dependencies, often for development usage only, that are not installed by Composer. These may be approximately identified with <code>find -not \( -name node_modules -prune \) -name package.json</code> and manually installed as needed after an update by executing <code>npm install</code> in each directory wanted.</div> <p>Log out of your virtual machine by typing <code>logout</code> or by pressing <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r6747130"><kbd class="keyboard-key nowrap">Ctrl</kbd>+<kbd class="keyboard-key nowrap">D</kbd>. Now that you're back in a standard command prompt, you can run <code>vagrant halt</code> to shut down the virtual machine and <code>vagrant up</code> to bring it back up. <code>vagrant destroy</code> will delete the virtual machine's files; this command is useful if you want to return your instance to a pristine state. (You'll need to follow up with <code>vagrant up</code> to provision a fresh instance.) </p> <div class="mw-heading mw-heading2 ext-discussiontools-init-section"><h2 id="Using_roles" data-mw-thread-id="h-Using_roles"><span data-mw-comment-start="" id="h-Using_roles"></span>Using roles<span data-mw-comment-end="h-Using_roles"></span></h2><!--__DTELLIPSISBUTTON__{"threadItem":{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Using_roles","replies":["h-Troubleshooting_specific_roles-Using_roles","h-How_to_import_a_Wikidata_dump-Using_roles"]}}--></div> <p>MediaWiki-Vagrant sets up a basic MediaWiki instance by default, but it also knows how to configure a range of complementary software, including some popular MediaWiki extensions and their dependencies. These optional software stacks are collectively known as 'roles', and MediaWiki-Vagrant offers an easy and powerful command-line interface for managing them. </p><p><code class="mw-code mw-highlight" style="display:block"><span class="gp">$</span> vagrant roles list <span class="c1"># Display a list of available roles.</span> <span class="gp">$</span> vagrant roles enable <i>role</i> <span class="c1"># Turn on <i>role</i> for this machine.</span> <span class="gp">$</span> vagrant roles disable <i>role</i> <span class="c1"># Turn off <i>role</i> for this machine.</span> <span class="gp">$</span> vagrant provision <span class="c1"># After you are done enabling and/or disabling roles, run this to make the change take effect.</span> </code> </p><p>Watch a short <a rel="nofollow" class="external text" href="https://asciinema.org/a/4428"><b>screencast</b></a> demonstrating how to use roles. <a href="/wiki/Special:MyLanguage/MediaWiki-Vagrant/Roles" title="Special:MyLanguage/MediaWiki-Vagrant/Roles">Roles</a> has more information about some roles. </p><p>If you add many roles, you may need to increase memory available to the Vagrant VM. <s>In particular, setting up the "browsertests" role involves compiling the <code>ffi</code> <a href="https://en.wikipedia.org/wiki/RubyGems" class="extiw" title="w:RubyGems">ruby Gem</a> which is a memory-hungry task; if it fails try freeing some memory in the VM or increasing its memory allocation (<span><a href="https://phabricator.wikimedia.org/T55864" class="extiw" title="phabricator:T55864">bug 53864</a></span>).</s> </p><p>See the section <i><a href="#Authoring_roles">Authoring roles</a></i> below if you're interested in adding roles to MediaWiki-Vagrant. </p> <div class="mw-heading mw-heading3"><h3 id="Troubleshooting_specific_roles" data-mw-thread-id="h-Troubleshooting_specific_roles-Using_roles"><span data-mw-comment-start="" id="h-Troubleshooting_specific_roles-Using_roles"></span>Troubleshooting specific roles<span data-mw-comment-end="h-Troubleshooting_specific_roles-Using_roles"></span></h3></div> <div class="mw-heading mw-heading4"><h4 id="centralauth" data-mw-thread-id="h-centralauth-Troubleshooting_specific_roles"><span data-mw-comment-start="" id="h-centralauth-Troubleshooting_specific_roles"></span>centralauth<span data-mw-comment-end="h-centralauth-Troubleshooting_specific_roles"></span></h4></div> <p>There are some roles that require special attention, centralauth role does not run db migrations automatically via puppet and requires running those by hand. If you get errors on provisioning this role try to run this script on the extension and see the errors it outputs: </p> <pre>mwscript extensions/CentralAuth/maintenance/migrateAccount.php --username 'Admin' --auto </pre> <p>Once you get a more concrete error you probably need to know what migration you need to run from the ones here: </p> <pre>extensions/CentralAuth/db_patches </pre> <div class="mw-heading mw-heading4"><h4 id="wikidata" data-mw-thread-id="h-wikidata-Troubleshooting_specific_roles"><span data-mw-comment-start="" id="h-wikidata-Troubleshooting_specific_roles"></span>wikidata<span data-mw-comment-end="h-wikidata-Troubleshooting_specific_roles"></span></h4></div> <p>A simple <code>vagrant roles enable wikidata && vagrant provision</code> would fail. Here is a complete set of commands to make the Wikidata role up and running. </p> <div class="mw-highlight mw-highlight-lang-shell-session mw-content-ltr" dir="ltr"><pre><span></span><span class="gp">$ </span>vagrant<span class="w"> </span>up <span class="gp">$ </span>vagrant<span class="w"> </span>git-update <span class="gp">$ </span>vagrant<span class="w"> </span>ssh <span class="gp">$ </span>sudo<span class="w"> </span>apt-get<span class="w"> </span>update<span class="w"> </span><span class="o">&&</span><span class="w"> </span>sudo<span class="w"> </span>apt-get<span class="w"> </span>upgrade <span class="gp">$ </span>composer<span class="w"> </span>selfupdate<span class="w"> </span>--update-keys <span class="gp">$ </span>composer<span class="w"> </span>config<span class="w"> </span>--global<span class="w"> </span>process-timeout<span class="w"> </span><span class="m">9600</span> <span class="gp">$ </span><span class="nb">exit</span> <span class="gp">$ </span>vagrant<span class="w"> </span>roles<span class="w"> </span><span class="nb">enable</span><span class="w"> </span>wikidata <span class="gp">$ </span>vagrant<span class="w"> </span>provision </pre></div> <p>Note that the first provision may complain, thus looking like a failure. However, if you run a second provision, you will see that everything goes fine. </p><p>You may then point your browser to <a rel="nofollow" class="external free" href="http://wikidata.wiki.local.wmftest.net:8080/">http://wikidata.wiki.local.wmftest.net:8080/</a>. To create a new wikidata item load <a rel="nofollow" class="external free" href="http://wikidata.wiki.local.wmftest.net:8080/wiki/Special:NewItem">http://wikidata.wiki.local.wmftest.net:8080/wiki/Special:NewItem</a> and to create a new property navigate to <a rel="nofollow" class="external free" href="http://wikidata.wiki.local.wmftest.net:8080/wiki/Special:NewProperty">http://wikidata.wiki.local.wmftest.net:8080/wiki/Special:NewProperty</a> </p> <div class="mw-heading mw-heading3"><h3 id="How_to_import_a_Wikidata_dump" data-mw-thread-id="h-How_to_import_a_Wikidata_dump-Using_roles"><span data-mw-comment-start="" id="h-How_to_import_a_Wikidata_dump-Using_roles"></span>How to import a Wikidata dump<span data-mw-comment-end="h-How_to_import_a_Wikidata_dump-Using_roles"></span></h3></div> <p>The Vagrant command <code>import-dump</code>, which imports an XML file into MediaWiki, does not handle wikis other than the default one (see <a href="https://phabricator.wikimedia.org/T183274#3893785" class="extiw" title="phab:T183274">phab:T183274#3893785</a>). You need to run the <code><a href="/wiki/Special:MyLanguage/Manual:Importing_XML_dumps#Using_importDump.php,_if_you_have_shell_access" title="Special:MyLanguage/Manual:Importing XML dumps">importDump.php</a><span style="display:none"><a href="/wiki/Manual:Importing_XML_dumps#Using_importDump.php,_if_you_have_shell_access" title="Manual:Importing XML dumps"> </a></span></code> script <b>inside</b> the Vagrant box. </p><p>Here is the procedure to import <b>XML</b> dumps. </p> <div class="mw-highlight mw-highlight-lang-shell-session mw-content-ltr" dir="ltr"><pre><span></span><span class="gp">$ </span>mkdir<span class="w"> </span>wikidata_dumps <span class="gp">$ </span><span class="nb">cd</span><span class="w"> </span>wikidata_dumps </pre></div> <ul><li>download the <code>pages-articles</code> chunks. For instance:</li></ul> <div class="mw-highlight mw-highlight-lang-shell-session mw-content-ltr" dir="ltr"><pre><span></span><span class="gp">$ </span>wget<span class="w"> </span>https://dumps.wikimedia.org/wikidatawiki/latest/wikidatawiki-latest-pages-articles10.xml-p5264684p6341661.bz2 </pre></div> <ul><li>enable the import of Wikibase entities (see <a href="https://phabricator.wikimedia.org/T72898#1588002" class="extiw" title="phab:T72898">phab:T72898#1588002</a>). Append the following line to your <code>LocalSettings.php</code>:</li></ul> <div class="mw-highlight mw-highlight-lang-shell-session mw-content-ltr" dir="ltr"><pre><span></span><span class="gp">$</span>wgWBRepoSettings<span class="o">[</span><span class="w"> </span><span class="s1">'allowEntityImport'</span><span class="w"> </span><span class="o">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>true<span class="p">;</span> </pre></div> <ul><li>the following BASH script can help you monitor the process. You can paste it in a <code>import_wikidata.sh</code> file. Note that the highlighted line calls the actual import script:</li></ul> <div class="mw-highlight mw-highlight-lang-bash mw-content-ltr" dir="ltr"><pre><span></span><span class="ch">#!/usr/bin/env bash</span> <span class="nv">chunks</span><span class="o">=</span><span class="k">$(</span>find<span class="w"> </span>wikidata_dumps<span class="w"> </span>-type<span class="w"> </span>f<span class="k">)</span> <span class="k">for</span><span class="w"> </span>chunk<span class="w"> </span><span class="k">in</span><span class="w"> </span><span class="nv">$chunks</span> <span class="k">do</span> <span class="w"> </span><span class="nv">now</span><span class="o">=</span><span class="k">$(</span>date<span class="k">)</span> <span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s2">"</span><span class="nv">$now</span><span class="s2">: started import of </span><span class="nv">$chunk</span><span class="s2">"</span><span class="w"> </span>>><span class="w"> </span>wd_import.log <span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s2">"-------------------------------------------"</span><span class="w"> </span>>><span class="w"> </span>wd_import.log <span class="hll"><span class="w"> </span>bzcat<span class="w"> </span><span class="nv">$chunk</span><span class="w"> </span><span class="p">|</span><span class="w"> </span>mwscript<span class="w"> </span>importDump.php<span class="w"> </span>--wiki<span class="o">=</span>wikidatawiki<span class="w"> </span>--uploads<span class="w"> </span>--debug<span class="w"> </span>--report<span class="w"> </span><span class="m">10000</span><span class="w"> </span><span class="m">2</span>>>wd_import.log </span><span class="w"> </span><span class="nv">now</span><span class="o">=</span><span class="k">$(</span>date<span class="k">)</span> <span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s2">"-------------------------------------------"</span><span class="w"> </span>>><span class="w"> </span>wd_import.log <span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s2">"</span><span class="nv">$now</span><span class="s2">: completed import of </span><span class="nv">$chunk</span><span class="s2">"</span><span class="w"> </span>>><span class="w"> </span>wd_import.log <span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s2">"==========================================="</span><span class="w"> </span>>><span class="w"> </span>wd_import.log <span class="k">done</span> </pre></div> <ul><li>log into the Vagrant box and run the script. Debug messages should show up there:</li></ul> <div class="mw-highlight mw-highlight-lang-shell-session mw-content-ltr" dir="ltr"><pre><span></span><span class="gp">$ </span>vagrant<span class="w"> </span>ssh <span class="gp">$ </span><span class="nb">cd</span><span class="w"> </span>/vagrant <span class="gp">$ </span>sudo<span class="w"> </span>chmod<span class="w"> </span>+x<span class="w"> </span>import_wikidata.sh <span class="gp">$ </span>./import_wikidata.sh </pre></div> <ul><li>you can follow the progress log from outside the Vagrant box:</li></ul> <div class="mw-highlight mw-highlight-lang-shell-session mw-content-ltr" dir="ltr"><pre><span></span><span class="gp">$ </span>tail<span class="w"> </span>-f<span class="w"> </span>wd_import.log </pre></div> <div class="mw-heading mw-heading2 ext-discussiontools-init-section"><h2 id="Additional_suggestions" data-mw-thread-id="h-Additional_suggestions"><span data-mw-comment-start="" id="h-Additional_suggestions"></span>Additional suggestions<span data-mw-comment-end="h-Additional_suggestions"></span></h2><!--__DTELLIPSISBUTTON__{"threadItem":{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Additional_suggestions","replies":["h-Speeding_up_MediaWiki_on_Windows-Additional_suggestions","h-Local_MediaWiki_core_copy-Additional_suggestions","h-Update_cloned_repos-Additional_suggestions","h-Vagrant_reload-Additional_suggestions","h-When_to_enable_roles-Additional_suggestions","h-Vagrant_behind_proxy-Additional_suggestions","h-MediaWiki-Vagrant_prep-Additional_suggestions"]}}--></div> <div class="mw-heading mw-heading3"><h3 id="Speeding_up_MediaWiki_on_Windows" data-mw-thread-id="h-Speeding_up_MediaWiki_on_Windows-Additional_suggestions"><span data-mw-comment-start="" id="h-Speeding_up_MediaWiki_on_Windows-Additional_suggestions"></span>Speeding up MediaWiki on Windows<span data-mw-comment-end="h-Speeding_up_MediaWiki_on_Windows-Additional_suggestions"></span></h3></div> <p>MediaWiki out-of-the-box will likely run slow (page loads take 5+ seconds). This is because the virtual machine uses a shared file system that retrieves the files very slowly. Enabling NFS on Windows by installing the Vagrant WinNFSd plugin with <code>vagrant plugin install vagrant-winnfsd</code>, enabling NFS shares with <code>vagrant config nfs_shares true</code>, and restarting the machine with <code>vagrant reload</code> should significantly speed up page load times. You should make sure that the plugin is installed every time you run the machine as well.<sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup> You can further speed it up by enabling <code>nfs_cache</code>, however, be warned that your wiki may run into weird errors because some files may not be updated completely when using the cache. </p><p>You can also speed up Mediawiki by using <code>smb_shares</code>. Make sure not to enable it at the same time as <code>nfs_shares</code>. Enable it with <code>vagrant config smb_shares yes</code> and run <code>vagrant reload</code> in an shell run as an administrator. If you don't run it as an administrator, you will be warned with an error when vagrant goes up and when you go to the wiki address, you will see a <code>Wiki not found</code>. When prompted, type in the username of your account (the name of your home user directory) and password (your Microsoft account password if your account is not a local account with a normal password). </p> <div class="mw-heading mw-heading3"><h3 id="Local_MediaWiki_core_copy" data-mw-thread-id="h-Local_MediaWiki_core_copy-Additional_suggestions"><span data-mw-comment-start="" id="h-Local_MediaWiki_core_copy-Additional_suggestions"></span>Local MediaWiki core copy<span data-mw-comment-end="h-Local_MediaWiki_core_copy-Additional_suggestions"></span></h3></div> <p>Sometimes you may want to start over from scratch by removing the entire <code>vagrant</code> directory or cleaning out the <code>vagrant/mediawiki</code> directory. In order to speed up the vagrant provisioning process, you may want to consider keeping a local, updated clone of the MediaWiki core that you copy into <code>vagrant/mediawiki</code>. </p><p>for example, assuming you are cloning MediaWiki repos into <code>~/projects/mediawiki/</code>: </p> <div class="mw-highlight mw-highlight-lang-bash mw-content-ltr" dir="ltr"><pre><span></span><span class="c1"># clone and store a clean copy of MediaWiki core in ~/projects/mediawiki/core</span> <span class="nb">cd</span><span class="w"> </span>~/projects/mediawiki/ git<span class="w"> </span>clone<span class="w"> </span>ssh://<your-gerrit-username>@gerrit.wikimedia.org:29418/mediawiki/core <span class="c1"># clone a clean copy of vagrant in ~/projects/mediawiki/vagrant</span> <span class="nb">cd</span><span class="w"> </span>~/projects/mediawiki git<span class="w"> </span>clone<span class="w"> </span>ssh://<your-gerrit-username>@gerrit.wikimedia.org:29418/mediawiki/vagrant <span class="c1"># create the mediawiki subdirectory if it doesn't exist</span> <span class="nb">cd</span><span class="w"> </span>~/projects/mediawiki/vagrant mkdir<span class="w"> </span>~/projects/mediawiki/vagrant/mediawiki <span class="c1"># copy the clean MediaWiki core to the clean vagrant/mediawiki directory</span> cp<span class="w"> </span>-r<span class="w"> </span>~/projects/mediawiki/core/<span class="w"> </span>~/projects/mediawiki/vagrant/mediawiki </pre></div> <div class="mw-heading mw-heading3"><h3 id="Update_cloned_repos" data-mw-thread-id="h-Update_cloned_repos-Additional_suggestions"><span data-mw-comment-start="" id="h-Update_cloned_repos-Additional_suggestions"></span>Update cloned repos<span data-mw-comment-end="h-Update_cloned_repos-Additional_suggestions"></span></h3></div> <p>Update the cloned repos as often as possible/necessary. </p> <div class="mw-highlight mw-highlight-lang-bash mw-content-ltr" dir="ltr"><pre><span></span><span class="nb">cd</span><span class="w"> </span>~/projects/mediawiki/core git<span class="w"> </span>pull <span class="nb">cd</span><span class="w"> </span>~/projects/mediawiki/vagrant git<span class="w"> </span>pull git<span class="w"> </span>submodule<span class="w"> </span>update<span class="w"> </span>--init<span class="w"> </span>--recursive </pre></div> <p>Or to update all cloned repos: </p> <div class="mw-highlight mw-highlight-lang-bash mw-content-ltr" dir="ltr"><pre><span></span>vagrant<span class="w"> </span>git-update </pre></div> <div class="mw-heading mw-heading3"><h3 id="Vagrant_reload" data-mw-thread-id="h-Vagrant_reload-Additional_suggestions"><span data-mw-comment-start="" id="h-Vagrant_reload-Additional_suggestions"></span>Vagrant reload<span data-mw-comment-end="h-Vagrant_reload-Additional_suggestions"></span></h3></div> <p>If you change configuration (e.g. <code>vagrant_ram</code>, your VM/MediaWiki website freezes, or you experience a problem, <code>vagrant reload</code> may resolve it. This will restart your guest. Some roles also require reloading, which should happen automatically. </p> <div class="mw-heading mw-heading3"><h3 id="When_to_enable_roles" data-mw-thread-id="h-When_to_enable_roles-Additional_suggestions"><span data-mw-comment-start="" id="h-When_to_enable_roles-Additional_suggestions"></span>When to enable roles<span data-mw-comment-end="h-When_to_enable_roles-Additional_suggestions"></span></h3></div> <p>Enable roles only once you've successfully run your first <code>vagrant up</code>. </p><p>Note that <code>vagrant destroy</code> will <b>not</b> reset the enabled roles. Be sure to disable all roles after running <code>vagrant destroy</code>, then run <code>vagrant up</code>. Then you can re-enable any roles and run <code>vagrant provision</code>. </p> <div class="mw-heading mw-heading3"><h3 id="Vagrant_behind_proxy" data-mw-thread-id="h-Vagrant_behind_proxy-Additional_suggestions"><span data-mw-comment-start="" id="h-Vagrant_behind_proxy-Additional_suggestions"></span>Vagrant behind proxy<span data-mw-comment-end="h-Vagrant_behind_proxy-Additional_suggestions"></span></h3></div> <p>If you are behind a proxy, Vagrant might throw some <a rel="nofollow" class="external text" href="https://gist.github.com/ankita-kumari/b7598a62ae209fca1db2">errors</a>. You can install <code><a rel="nofollow" class="external text" href="https://github.com/tmatilai/vagrant-proxyconf">vagrant-proxyconf</a></code>. It’s a plugin that allows your virtual machine to use specified proxies. This is a quick set up guide. For a detailed documentation you may check <a rel="nofollow" class="external text" href="https://github.com/tmatilai/vagrant-proxyconf">here</a>. </p><p>Install the plugin: </p> <div class="mw-highlight mw-highlight-lang-bash mw-content-ltr" dir="ltr"><pre><span></span>vagrant<span class="w"> </span>plugin<span class="w"> </span>install<span class="w"> </span>vagrant-proxyconf </pre></div> <p>To configure proxy settings for all pieces of software on all vagrant VMs, add the following lines to your <code>$VAGRANT_HOME/Vagrantfile</code> (default <code>~/.vagrant.d/Vagrantfile</code>). </p> <div class="mw-highlight mw-highlight-lang-bash mw-content-ltr" dir="ltr"><pre><span></span>Vagrant.configure<span class="o">(</span><span class="s2">"2"</span><span class="o">)</span><span class="w"> </span><span class="k">do</span><span class="w"> </span><span class="p">|</span>config<span class="p">|</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span>Vagrant.has_plugin?<span class="o">(</span><span class="s2">"vagrant-proxyconf"</span><span class="o">)</span> <span class="w"> </span>config.proxy.http<span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"http://192.168.0.2:3128/"</span> <span class="w"> </span>config.proxy.https<span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"http://192.168.0.2:3128/"</span> <span class="w"> </span>config.proxy.no_proxy<span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"localhost,127.0.0.1,.example.com"</span> <span class="w"> </span>end <span class="w"> </span><span class="c1"># ... other stuff</span> end </pre></div> <p>Replace the addresses with the IP and port number of your proxy server. Use the <code>config.proxy.no_proxy</code> option to list out all the sites/domains for which you might want to bypass proxy. For example, </p> <div class="mw-highlight mw-highlight-lang-bash mw-content-ltr" dir="ltr"><pre><span></span>config.proxy.no_proxy<span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"localhost,127.0.0.1,.example.com,.someinternaldomain.com"</span> </pre></div> <p>Now when you run a <code>vagrant up</code>, there shouldn’t be any warnings. </p><p>To disable the plugin, set <code>config.proxy.enabled</code> to <code>false</code> or empty string <code>("")</code>. You can also disable it for specific applications. For example, </p> <div class="mw-highlight mw-highlight-lang-bash mw-content-ltr" dir="ltr"><pre><span></span>config.proxy.enabled<span class="w"> </span><span class="c1"># → all applications enabled(default)</span> config.proxy.enabled<span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">true</span><span class="w"> </span><span class="c1"># → all applications enabled</span> config.proxy.enabled<span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">{</span><span class="w"> </span>svn:<span class="w"> </span>false,<span class="w"> </span>docker:<span class="w"> </span><span class="nb">false</span><span class="w"> </span><span class="o">}</span> <span class="w"> </span><span class="c1"># → specific applications disabled</span> config.proxy.enabled<span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">""</span><span class="w"> </span><span class="c1"># → all applications disabled</span> config.proxy.enabled<span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">false</span><span class="w"> </span><span class="c1"># → all applications disabled</span> </pre></div> <div class="mw-heading mw-heading3"><h3 id="MediaWiki-Vagrant_prep" data-mw-thread-id="h-MediaWiki-Vagrant_prep-Additional_suggestions"><span data-mw-comment-start="" id="h-MediaWiki-Vagrant_prep-Additional_suggestions"></span>MediaWiki-Vagrant prep<span data-mw-comment-end="h-MediaWiki-Vagrant_prep-Additional_suggestions"></span></h3></div> <p>You may want to consider using a shell script such as <a rel="nofollow" class="external text" href="https://github.com/dan-nl/mw-vagrant-prep">mw-vagrant-prep</a> to prepare a directory for a MediaWiki-Vagrant install. </p> <div class="mw-heading mw-heading2 ext-discussiontools-init-section"><h2 id="Debugging" data-mw-thread-id="h-Debugging"><span data-mw-comment-start="" id="h-Debugging"></span>Debugging<span data-mw-comment-end="h-Debugging"></span></h2><!--__DTELLIPSISBUTTON__{"threadItem":{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Debugging","replies":["h-Vagrant-Debugging","h-Provisioning-Debugging","h-PHP-Debugging","h-Running_and_debugging_unit_tests-Debugging","h-Running_browser_tests-Debugging"]}}--></div> <div class="mw-heading mw-heading3"><h3 id="Vagrant" data-mw-thread-id="h-Vagrant-Debugging"><span data-mw-comment-start="" id="h-Vagrant-Debugging"></span>Vagrant<span data-mw-comment-end="h-Vagrant-Debugging"></span></h3></div> <p>You can debug MediaWiki-Vagrant itself (e.g. the errors that happen during <code>vagrant up</code>) with <code>VAGRANT_LOG</code>: </p> <div class="mw-highlight mw-highlight-lang-bash mw-content-ltr" dir="ltr"><pre><span></span><span class="nv">VAGRANT_LOG</span><span class="o">=</span>debug<span class="w"> </span>vagrant<span class="w"> </span>up </pre></div> <div class="mw-heading mw-heading3"><h3 id="Provisioning" data-mw-thread-id="h-Provisioning-Debugging"><span data-mw-comment-start="" id="h-Provisioning-Debugging"></span>Provisioning<span data-mw-comment-end="h-Provisioning-Debugging"></span></h3></div> <p>You can debug the provisioning process by running </p> <div class="mw-highlight mw-highlight-lang-bash mw-content-ltr" dir="ltr"><pre><span></span><span class="nv">PUPPET_DEBUG</span><span class="o">=</span><span class="m">1</span><span class="w"> </span>vagrant<span class="w"> </span>provision </pre></div> <div class="mw-heading mw-heading3"><h3 id="PHP" data-mw-thread-id="h-PHP-Debugging"><span data-mw-comment-start="" id="h-PHP-Debugging"></span>PHP<span data-mw-comment-end="h-PHP-Debugging"></span></h3></div> <p>You can debug PHP with Xdebug. Debugging in PHP is different from other client-side debugging. Your IDE listens for incoming connections, and when you access the server with a browser, a special header instructs PHP to connect to your IDE. For lack of better documentation, see the (old and overly verbose) <a href="/wiki/MediaWiki-Vagrant/Advanced_usage#MediaWiki_debugging_using_Xdebug_and_an_IDE_in_your_host" title="MediaWiki-Vagrant/Advanced usage">MediaWiki-Vagrant/Advanced usage#MediaWiki debugging using Xdebug and an IDE in your host</a> for further information. </p> <div class="mw-heading mw-heading4"><h4 id="Chrome" data-mw-thread-id="h-Chrome-PHP"><span data-mw-comment-start="" id="h-Chrome-PHP"></span>Chrome<span data-mw-comment-end="h-Chrome-PHP"></span></h4></div> <ul><li>For Chrome users, you should get <a rel="nofollow" class="external text" href="https://chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc">XDebug Helper</a>, and optionally <a rel="nofollow" class="external text" href="https://chrome.google.com/webstore/detail/clear-cache/cppjkneekbjaeellbfkmgnhonkkjfpdn">Clear Cache</a>, <a rel="nofollow" class="external text" href="https://chrome.google.com/webstore/detail/http-headers/fhfgegloanobkdlkicjoefpnlbclfebg">HTTP headers</a>, and <a rel="nofollow" class="external text" href="https://chrome.google.com/webstore/detail/modheader/idgpnmonknjnojddfkpgkljpfnnfcklj">Mod Headers</a>. Configure clear cache to automatically reload after clearing, and set up keyboard shortcuts (e.g. <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r6747130"><kbd class="keyboard-key nowrap">Ctrl</kbd>+<kbd class="keyboard-key nowrap">R</kbd> for clear&reload, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r6747130"><kbd class="keyboard-key nowrap">Ctrl</kbd>+<kbd class="keyboard-key nowrap">⇧ Shift</kbd>+<kbd class="keyboard-key nowrap">D</kbd> to switch XDebugger on/off)</li></ul> <div class="mw-heading mw-heading4"><h4 id="Firefox" data-mw-thread-id="h-Firefox-PHP"><span data-mw-comment-start="" id="h-Firefox-PHP"></span>Firefox<span data-mw-comment-end="h-Firefox-PHP"></span></h4></div> <ul><li>Firefox users should check out <a rel="nofollow" class="external text" href="https://addons.mozilla.org/firefox/addon/easy-xdebug/">easy Xdebug</a>.</li> <li>Install and configure an <a rel="nofollow" class="external text" href="http://xdebug.org/docs/step_debug">xdebug-compatible</a> IDE on your machine (Eclipse, PhpStorm, Emacs, etc.)</li> <li>In IDE, start listening for the incoming debug connection</li> <li>In IDE, set break point at the spot that interests you</li> <li>Enable XDebug in the browser and navigate to your vagrant installation ( http://127.0.0.1:8080/... )</li></ul> <div class="mw-heading mw-heading4"><h4 id="CLI" data-mw-thread-id="h-CLI-PHP"><span data-mw-comment-start="" id="h-CLI-PHP"></span>CLI<span data-mw-comment-end="h-CLI-PHP"></span></h4></div> <p>For maintenance scripts and other code executed from CLI, you can use the <code>xdebug_on</code> and <code>xdebug_off</code> shell commands to enable/disable debugging. </p> <div class="mw-heading mw-heading4"><h4 id="Log_files" data-mw-thread-id="h-Log_files-PHP"><span data-mw-comment-start="" id="h-Log_files-PHP"></span>Log files<span data-mw-comment-end="h-Log_files-PHP"></span></h4></div> <p>The MediaWiki logs can be found in <code>/vagrant/logs</code>. There are log files for Apache in <code>/var/log/apache2/</code>, but it seems they are not written to. The MySQL query log can be obtained by issuing <code>SET GLOBAL general_log = 'ON';</code> in a client and then looking at <code>/var/lib/mysql/*.log</code>. </p> <div class="mw-heading mw-heading3"><h3 id="Running_and_debugging_unit_tests" data-mw-thread-id="h-Running_and_debugging_unit_tests-Debugging"><span data-mw-comment-start="" id="h-Running_and_debugging_unit_tests-Debugging"></span>Running and debugging unit tests<span data-mw-comment-end="h-Running_and_debugging_unit_tests-Debugging"></span></h3></div> <p>To <i>run</i> the <a href="/wiki/Special:MyLanguage/Manual:PHP_unit_testing" title="Special:MyLanguage/Manual:PHP unit testing">PHPUnit</a><span style="display:none"><a href="/wiki/Manual:PHP_unit_testing" title="Manual:PHP unit testing"> </a></span> tests for ALL extensions: </p> <div class="mw-highlight mw-highlight-lang-console mw-content-ltr" dir="ltr"><pre><span></span><span class="gp">$ </span>vagrant<span class="w"> </span>ssh <span class="gp">$ </span>sudo<span class="w"> </span>-u<span class="w"> </span>www-data<span class="w"> </span>env<span class="w"> </span><span class="nv">PHPUNIT_WIKI</span><span class="o">=</span>wiki<span class="w"> </span><span class="nv">PHPUNIT_LOGS</span><span class="o">=</span><span class="m">0</span><span class="w"> </span>composer<span class="w"> </span>--working-dir<span class="o">=</span>/vagrant/mediawiki<span class="w"> </span>phpunit </pre></div> <p>To run unit tests for a single extension: </p> <div class="mw-highlight mw-highlight-lang-console mw-content-ltr" dir="ltr"><pre><span></span><span class="gp">$ </span>sudo<span class="w"> </span>-u<span class="w"> </span>www-data<span class="w"> </span>env<span class="w"> </span><span class="nv">PHPUNIT_WIKI</span><span class="o">=</span>wiki<span class="w"> </span><span class="nv">PHPUNIT_LOGS</span><span class="o">=</span><span class="m">0</span><span class="w"> </span>composer<span class="w"> </span>--working-dir<span class="o">=</span>/vagrant/mediawiki<span class="w"> </span>composer<span class="w"> </span>phpunit<span class="w"> </span>/vagrant/mediawiki/extensions/ExtensionName/tests/phpunit/ </pre></div> <p>Some tests may require running as the proper user to create lock files and such, hence this command runs as the "user" <code>www-data</code> that handles web requests. </p><p>For building coverage reports, see <a href="/wiki/Special:MyLanguage/Manual:PHP_unit_testing/Code_coverage#MediaWiki-Vagrant" title="Special:MyLanguage/Manual:PHP unit testing/Code coverage">Manual:PHP unit testing/Code coverage#MediaWiki-Vagrant</a>. </p><p>Debugging phpunit tests is a little more complex. This method is a bit hacky, but can be used until debugging remote interpreter improves (e.g. in phpStorm 8 EAP). This workaround lets you run MediaWiki unit tests from the browser. </p> <ul><li>Download <a rel="nofollow" class="external text" href="https://phpunit.de/manual/4.1/en/installation.html">phpunit.phar</a> file to the root of your vagrant directory.</li> <li>Create a php file <code>unittest.php</code> in the root of the <code>mediawiki</code> directory. Do not commit this file to the repository. Paste the following code into it:</li></ul> <style data-mw-deduplicate="TemplateStyles:r6651106">@media screen{html.skin-theme-clientpref-night .mw-parser-output .template-hidden,html.skin-theme-clientpref-night .mw-parser-output .template-hidden-header{background-color:inherit!important;color:inherit!important}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .template-hidden,html.skin-theme-clientpref-os .mw-parser-output .template-hidden-header{background-color:inherit!important;color:inherit!important}}</style> <table border="1"" cellspacing="0"" cellpadding="2" class="template-hidden mw-collapsible mw-collapsed" style="width:100%;margin:0;padding:0;border:1px solid #999999;border-collapse:collapse;background:#FFFFFF"> <tbody><tr> <th style="text-align:center;"><div class="template-hidden-header" style="font-weight:bold;background-color:#CCCCFF;">unittest.php </div> </th></tr> <tr> <td style="font-weight:normal;background-color:transparent;text-align:left;"> <div class="mw-highlight mw-highlight-lang-php mw-content-ltr" dir="ltr"><pre><span></span><span class="x"><html><body><pre></span> <span class="cp"><?php</span> <span class="nb">error_reporting</span><span class="p">(</span><span class="k">E_ALL</span><span class="p">);</span> <span class="nb">ini_set</span><span class="p">(</span><span class="s1">'display_errors'</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span> <span class="k">require_once</span> <span class="s1">'includes/WebStart.php'</span><span class="p">;</span> <span class="nv">$_SERVER</span><span class="p">[</span> <span class="s1">'argv'</span> <span class="p">]</span> <span class="o">=</span> <span class="k">array</span><span class="p">(</span> <span class="s1">'--configuration'</span><span class="p">,</span> <span class="s1">'/vagrant/mediawiki/tests/phpunit/suite.xml'</span><span class="p">,</span> <span class="s1">'/vagrant/mediawiki/extensions/JsonConfig/tests/phpunit/JCObjContentTest.php'</span><span class="p">,</span> <span class="p">);</span> <span class="k">require_once</span> <span class="s1">'/vagrant/mediawiki/tests/TestsAutoLoader.php'</span><span class="p">;</span> <span class="k">require_once</span> <span class="s1">'/vagrant/phpunit.phar'</span><span class="p">;</span> <span class="nx">PHPUnit_TextUI_Command</span><span class="o">::</span><span class="na">main</span><span class="p">(</span><span class="k">false</span><span class="p">);</span> </pre></div> </td></tr></tbody></table> <p><br/> </p> <ul><li>In the above file, change <i>argv</i> parameter to the name of your test file</li> <li>Apache maps the root of the MediaWiki directory to <code>/w</code>. So navigate to <a rel="nofollow" class="external free" href="http://127.0.0.1:8080/w/unittest.php">http://127.0.0.1:8080/w/unittest.php</a> to run this file</li> <li>Follow <a href="#Debugging">#Debugging</a> instructions to attach your debugger</li></ul> <div class="mw-heading mw-heading3"><h3 id="Running_browser_tests" data-mw-thread-id="h-Running_browser_tests-Debugging"><span data-mw-comment-start="" id="h-Running_browser_tests-Debugging"></span>Running browser tests<span data-mw-comment-end="h-Running_browser_tests-Debugging"></span></h3></div> <p>For JavaScript unit tests (QUnit), see <a href="/wiki/Special:MyLanguage/Manual:JavaScript_unit_testing" title="Special:MyLanguage/Manual:JavaScript unit testing">Manual:JavaScript unit testing</a><span style="display:none"><a href="/wiki/Manual:JavaScript_unit_testing" title="Manual:JavaScript unit testing"> </a></span>. </p><p>For browser end-to-end tests (Selenium), see <a href="/wiki/Special:MyLanguage/Quality_Assurance/Browser_testing/Running_tests#Running_VisualEditor_browser_tests_via_Vagrant" title="Special:MyLanguage/Quality Assurance/Browser testing/Running tests">Quality Assurance/Browser testing/Running tests#Running VisualEditor browser tests via Vagrant</a><span style="display:none"><a href="/wiki/Quality_Assurance/Browser_testing/Running_tests#Running_VisualEditor_browser_tests_via_Vagrant" class="mw-redirect" title="Quality Assurance/Browser testing/Running tests"> </a></span> </p> <div class="mw-heading mw-heading2 ext-discussiontools-init-section"><h2 id="Pushing_commits" data-mw-thread-id="h-Pushing_commits"><span data-mw-comment-start="" id="h-Pushing_commits"></span>Pushing commits<span data-mw-comment-end="h-Pushing_commits"></span></h2><!--__DTELLIPSISBUTTON__{"threadItem":{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Pushing_commits","replies":["h-Gerrit-Pushing_commits"]}}--></div> <p>If you're using MediaWiki-Vagrant for development you'll probably want to push some commits to MediaWiki core or an extension's repository using <code>git review</code>. By default, all remotes point to the <code>https://</code> URLs. To avoid overriding this on a case by case basis, run: </p> <pre>$ git config --global url."ssh://<username>@gerrit.wikimedia.org:29418/".insteadOf "https://gerrit.wikimedia.org/r/" </pre> <p>You also need to have your ssh keys in <code>~/.ssh</code>. </p> <div class="mw-heading mw-heading3"><h3 id="Gerrit" data-mw-thread-id="h-Gerrit-Pushing_commits"><span data-mw-comment-start="" id="h-Gerrit-Pushing_commits"></span>Gerrit<span data-mw-comment-end="h-Gerrit-Pushing_commits"></span></h3></div> <p>To submit changes, use <code>cd</code> to navigate to your extensions folder. Then follow the instructions on <a href="/wiki/Gerrit/Tutorial#Submit_a_patch" title="Gerrit/Tutorial">submitting a patch</a> via gerrit. </p><p><span class="anchor" id="How_do_I...?"></span> </p> <div class="mw-heading mw-heading2 ext-discussiontools-init-section"><h2 id="Troubleshooting" data-mw-thread-id="h-Troubleshooting"><span data-mw-comment-start="" id="h-Troubleshooting"></span>Troubleshooting<span data-mw-comment-end="h-Troubleshooting"></span></h2><!--__DTELLIPSISBUTTON__{"threadItem":{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Troubleshooting","replies":[]}}--></div> <dl><dt>Check PHP version and settings</dt> <dd><span class="plainlinks"><a rel="nofollow" class="external free" href="http://127.0.0.1:8080/info.php">http://127.0.0.1:8080/info.php</a></span></dd></dl> <dl><dt>Edit LocalSettings.php?</dt> <dd>First, check that there is no role (<code>vagrant list-roles</code>) that already does what you need. If not, create a file in <code>settings.d/</code> directory. See README and 00-debug.php-example file.</dd></dl> <dl><dt>Update MediaWiki code?</dt> <dd>The easiest is to use <code>vagrant git-update</code> from the host. Or, to just update the code without dependencies, you can use regular <a href="/wiki/Special:MyLanguage/Gerrit" title="Special:MyLanguage/Gerrit">git</a> <code>fetch</code>, <code>pull</code>, etc. commands in <code>vagrant/mediawiki</code> and <code>vagrant/mediawiki/extensions/<i>SomeExtension</i></code> directories. You can run these commands on the virtual machine, but the file access will be faster on the host machine. MediaWiki-Vagrant pulls code from git master when you initially set up and/or add a role, but doesn't automatically update code after that.</dd></dl> <dl><dt>Run MediaWiki PHP interpreter</dt> <dd>ssh to vagrant and run <code>mwscript eval.php</code>. You might need to run it with <code>sudo</code></dd></dl> <dl><dt>Run MediaWiki SQL interpreter</dt> <dd>ssh to vagrant and run <code>mwscript sql.php</code>. You might need to run it with <code>sudo</code></dd></dl> <dl><dt>Update virtual machine software packages?</dt> <dd><code>vagrant provision</code> does not update system packages in the VM. When you connect with vagrant ssh the login message will inform that you:<br/><i>NN packages can be updated.<br/>NN updates are security updates.</i><br/>In vagrant ssh: <ul><li>to update all packages, enter <code>sudo apt-get update && sudo apt-get upgrade</code></li> <li>for "automatic installation of security (and other) upgrades", similar to Cloud VPS instances, enter <code>sudo unattended-upgrade</code></li> <li>to update to the same packages that are on production WMF servers... <i>TODO</i></li></ul></dd></dl> <dl><dt>Customize Vagrant</dt> <dd>You should never need to change Vagrantfile directly. There are several aspects of vagrant you can customize: <ul><li>Core settings (git user, ports, ram, ip, port forwarding) can be customized via .settings.yaml file. See <code>vagrant config --help</code> and <code>vagrant forward-port --help</code> for instructions. So for example you may run <code>vagrant forward-port 1234 80</code> to enable port forwarding from host:1234 to guest:80.</li> <li>Perform additional steps after Vagrantfile load by creating a file called <code>Vagrantfile-extra.rb</code> and placing it in the same folder as Vagrantfile - it will be automatically loaded. In case of conflict, values in the 'extra' file will supersede values in this file. See example in support/ directory.</li></ul></dd></dl> <dl><dt>Add custom Puppet code?</dt> <dd>This is ideal if you want to work on your own MediaWiki site locally and let the MediaWiki-Vagrant install your dependencies for you. It's ideal if you have your own fork. There is a distinction between a role and this use case. Roles are meant to be installed in any order and without breaking. If your fork needs different calls and get in trouble with roles, create your own class and call what you need, including roles.</dd> <dd>To do so, place your custom puppet code in <code>puppet/modules/local/manifests/myown.pp</code> with your own class, like so:</dd></dl> <div class="mw-highlight mw-highlight-lang-bash mw-content-ltr" dir="ltr"><pre><span></span>class<span class="w"> </span>local::myown<span class="w"> </span><span class="o">{</span> <span class="w"> </span>include<span class="w"> </span>::role::svg <span class="o">}</span> </pre></div> <p>To apply your class, add it to the "classes" key in <code>puppet/hieradata/local.yaml</code>. You can create the file if it doesn't exist. </p> <div class="mw-highlight mw-highlight-lang-bash mw-content-ltr" dir="ltr"><pre><span></span>classes: <span class="w"> </span>-<span class="w"> </span>local::myown </pre></div> <p>Then run <code>vagrant provision</code> to apply the change via Puppet. </p> <dl><dt>Update MediaWiki-Vagrant itself?</dt> <dd>(For example, to use new roles.) In a terminal, change to the vagrant directory on the host computer and enter a regular <a href="/wiki/Special:MyLanguage/Gerrit" title="Special:MyLanguage/Gerrit">git</a> command such as <code>git pull --ff-only</code>. You will typically want to run <code>vagrant provision</code> after updating to apply any new puppet changes to your virtual machine.</dd></dl> <dl><dt>Run GUI applications on the virtual machine?</dt> <dd>If you have an X server installed, SSH into the virtual machine using <code>ssh -- -X</code> to enable X forwarding. (Mac users should <a rel="nofollow" class="external text" href="http://xquartz.macosforge.org/landing/">update to the latest version of XQuartz</a>.)</dd></dl> <dl><dd>As an alternative, you can run the virtual machine in GUI mode, which allows you to interact with the VM as though it had a physical display. To enable GUI mode, create a file called <code>Vagrantfile-extra.rb</code> in the root repository folder, with this as its content:</dd></dl> <div style="display: inline-block; margin: 0 1.2em;"> <div class="mw-highlight mw-highlight-lang-ruby mw-content-ltr" dir="ltr"><pre><span></span><span class="no">Vagrant</span><span class="o">.</span><span class="n">configure</span><span class="p">(</span><span class="s1">'2'</span><span class="p">)</span><span class="w"> </span><span class="k">do</span><span class="w"> </span><span class="o">|</span><span class="n">config</span><span class="o">|</span> <span class="w"> </span><span class="n">config</span><span class="o">.</span><span class="n">vm</span><span class="o">.</span><span class="n">provider</span><span class="w"> </span><span class="ss">:virtualbox</span><span class="w"> </span><span class="k">do</span><span class="w"> </span><span class="o">|</span><span class="n">vb</span><span class="o">|</span> <span class="w"> </span><span class="n">vb</span><span class="o">.</span><span class="n">gui</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kp">true</span> <span class="w"> </span><span class="k">end</span> <span class="k">end</span> </pre></div></div> <dl><dd>Save the file and run <code>vagrant halt</code> followed by <code>vagrant up</code>. The virtual machine's display will appear in a window on your desktop.</dd></dl> <dl><dt><span id="Adjust_CPU"></span>Adjust the resources allocated to the VM?</dt> <dd>If you'd like to allocate more or less CPU / RAM to the VM, see <code>vagrant config --help</code> for instructions.</dd></dl> <p>Alternatively, you can do it by creating Vagrantfile-extra.rb (see support/ dir for an example): </p> <div style="display: inline-block; margin: 0 1.2em;"> <div class="mw-highlight mw-highlight-lang-ruby mw-content-ltr" dir="ltr"><pre><span></span><span class="no">Vagrant</span><span class="o">.</span><span class="n">configure</span><span class="p">(</span><span class="s1">'2'</span><span class="p">)</span><span class="w"> </span><span class="k">do</span><span class="w"> </span><span class="o">|</span><span class="n">config</span><span class="o">|</span> <span class="w"> </span><span class="n">config</span><span class="o">.</span><span class="n">vm</span><span class="o">.</span><span class="n">provider</span><span class="w"> </span><span class="ss">:virtualbox</span><span class="w"> </span><span class="k">do</span><span class="w"> </span><span class="o">|</span><span class="n">vb</span><span class="o">|</span> <span class="w"> </span><span class="c1"># See http://www.virtualbox.org/manual/ch08.html for additional options.</span> <span class="w"> </span><span class="n">vb</span><span class="o">.</span><span class="n">customize</span><span class="w"> </span><span class="o">[</span><span class="s1">'modifyvm'</span><span class="p">,</span><span class="w"> </span><span class="ss">:id</span><span class="p">,</span><span class="w"> </span><span class="s1">'--memory'</span><span class="p">,</span><span class="w"> </span><span class="s1">'768'</span><span class="o">]</span> <span class="w"> </span><span class="n">vb</span><span class="o">.</span><span class="n">customize</span><span class="w"> </span><span class="o">[</span><span class="s1">'modifyvm'</span><span class="p">,</span><span class="w"> </span><span class="ss">:id</span><span class="p">,</span><span class="w"> </span><span class="s1">'--cpus'</span><span class="p">,</span><span class="w"> </span><span class="s1">'2'</span><span class="o">]</span> <span class="w"> </span><span class="k">end</span> <span class="k">end</span> </pre></div> </div> <dl><dt>Change the editor used for git commit messages?</dt> <dd><div class="mw-highlight mw-highlight-lang-bash mw-content-ltr" dir="ltr"><pre><span></span>git<span class="w"> </span>config<span class="w"> </span>--global<span class="w"> </span>core.editor<span class="w"> </span><span class="s2">"vim"</span> </pre></div></dd></dl> <dl><dt>Setup a custom hostname?</dt> <dd>Go to <a href="https://wikitech.wikimedia.org/wiki/Help:Horizon_FAQ" class="extiw" title="wikitech:Help:Horizon FAQ">Horizon</a>, choose <a class="external text" href="https://horizon.wikimedia.org/project/proxy/">Web Proxies</a>, and enter a DNS hostname, say <hostname></dd></dl> <p>View your new wiki at "http://<hostname>/wiki/" </p> <dl><dt>Make the custom hostname point to homepage of my vagrant role instead of wiki homepage?</dt> <dd>Create a local.yaml file in the /vagrant/puppet/hieradata directory. In it, add:</dd></dl> <div class="mw-highlight mw-highlight-lang-bash mw-content-ltr" dir="ltr"><pre><span></span><rolename>::vhost_name:<hostname> role::mediawiki::hostname:<span class="w"> </span>localhost </pre></div> <p>Run <code>vagrant provision</code>. </p> <dl><dt>Run a branch of MediaWiki other than master?</dt> <dd>Set the <code style="background-color: transparent; border:none; padding: 0px 0px; font-family:sans-serif;" class="inline-syntax mw-highlight mw-highlight-lang-php mw-content-ltr" dir="ltr"><span class="nx">mediawiki</span><span class="o">::</span><span class="na">branch</span></code> key in <code>puppet/hieradata/local.yaml</code>. You can create the file if it doesn't exist.</dd></dl> <div class="mw-highlight mw-highlight-lang-bash mw-content-ltr" dir="ltr"><pre><span></span>mediawiki::branch:<span class="w"> </span><span class="s2">"wmf/1.24/wmf18"</span> </pre></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r6651107"><div role="note" class="note note-info">This change has to be made BEFORE running <style data-mw-deduplicate="TemplateStyles:r4665741">.mw-parser-output .template-kbd{background:#EEEEEE;padding-left:0.4em;padding-right:0.4em}.mw-parser-output .template-kbd.spacing{letter-spacing:0.1em;padding-left:0.5em}</style><kbd class="template-kbd spacing">vagrant up</kbd> for the first time. If you decide you want to do it later, make the change, destroy your current VM with <code>vagrant destroy -f</code>, delete your existing mediawiki checkout and finally build a new VM with <code>vagrant up</code>.</div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r6651107"><div role="note" class="note note-info">Vagrant is designed to run with the master branch, and may not work perfectly, or at all with older versions of core and/or extensions<sup id="cite_ref-5" class="reference"><a href="#cite_note-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup>.</div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r6651107"><div role="note" class="note note-info">For the MediaWiki 1.35 release branch, it requires some modification to adjust PHP version requirements that are currently not met. See <a href="/wiki/Topic:W05qhsn58ztktod8" title="Topic:W05qhsn58ztktod8">Topic:W05qhsn58ztktod8</a> for instructions.</div> <div class="mw-heading mw-heading2 ext-discussiontools-init-section"><h2 id="Advanced_usage" data-mw-thread-id="h-Advanced_usage"><span data-mw-comment-start="" id="h-Advanced_usage"></span>Advanced usage<span data-mw-comment-end="h-Advanced_usage"></span></h2><!--__DTELLIPSISBUTTON__{"threadItem":{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Advanced_usage","replies":["h-MediaWiki_settings-Advanced_usage","h-Vagrant_flags-Advanced_usage","h-Job_queue-Advanced_usage","h-Additional_storage_space-Advanced_usage"]}}--></div> <p><span class="anchor" id="mw-settings"></span> </p> <div class="mw-heading mw-heading3"><h3 id="MediaWiki_settings" data-mw-thread-id="h-MediaWiki_settings-Advanced_usage"><span data-mw-comment-start="" id="h-MediaWiki_settings-Advanced_usage"></span>MediaWiki settings<span data-mw-comment-end="h-MediaWiki_settings-Advanced_usage"></span></h3></div> <p>As an alternative to managing all MediaWiki settings in a single, large <a href="/wiki/Special:MyLanguage/Manual:LocalSettings.php" title="Special:MyLanguage/Manual:LocalSettings.php">LocalSettings.php</a><span style="display:none"><a href="/wiki/Manual:LocalSettings.php" title="Manual:LocalSettings.php"> </a></span> file, consider grouping your configurations by component or theme, and creating a separate PHP file in <code>settings.d/</code> for each group. This makes it quite easy to keep your settings organized, to temporarily disable specific configurations, and to share settings with others. </p><p>MediaWiki will automatically load any PHP files in <code>settings.d/</code> in lexical order. You can control the order in which your configurations are set by adopting the habit of adding a two-digit prefix to each file name. </p><p>For example: </p> <pre style="background-color: #efefef; border: 0; display: inline-block; font-family: Consolas, monaco, monospace; margin: 0.4em 0 1em; padding: 0.2em 0.6em;"> settings.d/ ├── 10-RunFirst.php ├── 20-SomeExtension.php └── 99-RunLast.php </pre> <p>Note that the settings files in <code>settings.d/puppet-managed</code> are automatically created and destroyed in response to your <a href="https://en.wikipedia.org/wiki/Puppet_(software)" class="extiw" title="w:Puppet (software)">Puppet</a> configuration. Don't put your custom settings there, because Puppet will erase or override them. Keep your custom settings files in <code>settings.d/</code> instead. </p> <div class="mw-heading mw-heading3"><h3 id="Vagrant_flags" data-mw-thread-id="h-Vagrant_flags-Advanced_usage"><span data-mw-comment-start="" id="h-Vagrant_flags-Advanced_usage"></span>Vagrant flags<span data-mw-comment-end="h-Vagrant_flags-Advanced_usage"></span></h3></div> <p><code>vagrant config --list</code> display a list of all current Vagrant flags. </p><p>After the initial <code>./setup.sh</code>, in your vagrant directory, you can then set one of the vagrant flags that appears in the config list, e.g. <code>vagrant config nfs_shares no</code> </p> <div class="mw-heading mw-heading3"><h3 id="Job_queue" data-mw-thread-id="h-Job_queue-Advanced_usage"><span data-mw-comment-start="" id="h-Job_queue-Advanced_usage"></span>Job queue<span data-mw-comment-end="h-Job_queue-Advanced_usage"></span></h3></div> <p>If you're testing something that needs to churn the <a href="/wiki/Job_queue" class="mw-redirect" title="Job queue">job queue</a>, you may need to increase the number of job runners. Currently this is not available through LocalSettings.php, but must be set in the config file for the job runner. </p> <ol><li>Open <code>puppet/modules/mediawiki/templates/jobrunner.json.erb</code></li> <li>Change the value for the <code>runners</code> key from <code>1</code> to the desired value (say, <code>4</code>)</li> <li>Re-provision with <code>vagrant --provision</code></li> <li>Beware this will be a difference from the git master in your code</li></ol> <p>See <a href="#Adjust_CPU">instructions above for adjusting CPU core count</a> appropriately (highly recommended for CPU-bound task such as video transcoding). </p> <div class="mw-heading mw-heading3"><h3 id="Additional_storage_space" data-mw-thread-id="h-Additional_storage_space-Advanced_usage"><span data-mw-comment-start="" id="h-Additional_storage_space-Advanced_usage"></span>Additional storage space<span data-mw-comment-end="h-Additional_storage_space-Advanced_usage"></span></h3></div> <p>By default, there is relatively little free space on the root partition within the VM. If you plan to test uploading and processing of large image and video files, this may be insufficient. </p><p>Manual steps: </p> <ul><li>Shut down the VM (<code>vagrant halt</code>)</li> <li>Open VirtualBox Manager</li> <li>Select the VM and go into Settings <ul><li>Under Storage, select "Controller: SATA" and click the "Add hard disk" icon.</li> <li>Select the default disk image type.</li> <li>Name the disk 'VagrantImageSpace' or similar, and give it enough space (say, 80GB) -- by default the file will start small and expand to actual usage, so give as much space as you might need</li> <li>Close out the dialogs and restart the VM (<code>vagrant up</code>)</li></ul></li> <li>Run <code>vagrant ssh</code> to get a shell inside the terminal <ul><li>Run <code>sudo fdisk /dev/sdb</code> to set up new partitions...</li> <li>Type <code>n</code>, <code>p</code>, <code>1</code>, and hit (enter) twice for default size</li> <li>Type <code>w</code> to save the partition table</li></ul></li> <li>Run <code>sudo mke2fs /dev/sdb1</code> to create the filesystem</li> <li>Run <code>sudo vi /etc/fstab</code> to edit the mounts list <ul><li>Add line at end: <code>/dev/sdb1 /srv/images ext4 errors=remount-ro 0 2</code></li> <li>save out</li></ul></li> <li>Run <code>sudo mount /srv/images</code> to mount the filesystem</li> <li>Run <code>sudo chown www-data:www-data /srv/images</code> to set the file permissions</li> <li>Exit the shell <code>exit</code></li> <li>Reboot the VM (<code>vagrant halt; vagrant up</code>)</li></ul> <div class="mw-heading mw-heading2 ext-discussiontools-init-section"><h2 id="Authoring_roles" data-mw-thread-id="h-Authoring_roles"><span data-mw-comment-start="" id="h-Authoring_roles"></span>Authoring roles<span data-mw-comment-end="h-Authoring_roles"></span></h2><!--__DTELLIPSISBUTTON__{"threadItem":{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Authoring_roles","replies":[]}}--></div> <p>The virtual machine created by MediaWiki-Vagrant resembles Wikimedia's production environment in key respects, and it uses the same tool—<a href="https://en.wikipedia.org/wiki/Puppet_(software)" class="extiw" title="w:Puppet (software)">Puppet</a>—that Wikimedia's technical operations team uses to manage production servers and <a href="https://wikitech.wikimedia.org/wiki/Portal:Cloud_VPS" class="extiw" title="wikitech:Portal:Cloud VPS">Wikimedia Cloud VPS</a> instances. Puppet is a configuration management tool that provides a domain-specific language for expressing software configurations in a declarative fashion. Files containing Puppet code are called 'manifests'. When Puppet runs, it interprets the manifests you feed it and configures the machine accordingly. A Vagrant role is a set of Puppet manifests. </p><p>MediaWiki-Vagrant's Puppet codebase contains abstractions that make it easy to automate the configuration of MediaWiki extensions and related software. If you are a developer working on a software project that relates to MediaWiki, you are encouraged to submit a patch with a Puppet role for your project. Adding a Vagrant role for your project makes it easy for other developers to check out your work. Using a managed virtual machine as a development sandbox for your project reduces the chance of "works-on-my-machine" errors that often result from geographically remote developers working in incompatible environments. </p><p>The easiest way to get started with custom roles is to look at how existing roles are implemented in <code>puppet/modules/role/manifests/*.pp</code>. These roles depend on Puppet modules in <code>puppet/modules</code> (usually, <code>foo::bar { ... }</code> translates to a call to <code>puppet/modules/foo/manifests/bar.pp</code>) and use files and templates from the other <code>puppet/modules/role/*/rolename/</code> directories. The Puppet code is generally well-documented and contains examples that demonstrate its proper usage. </p><p>Some of the more useful puppet modules are: </p> <ul><li><a href="https://phabricator.wikimedia.org/diffusion/MWVA/browse/master/puppet/modules/mediawiki/manifests/extension.pp" class="extiw" title="phab:diffusion/MWVA/browse/master/puppet/modules/mediawiki/manifests/extension.pp">mediawiki::extension</a> - install and configure an extension (<a href="https://phabricator.wikimedia.org/diffusion/MWVA/browse/master/puppet/modules/role/manifests/templatedata.pp;08fabdb0f168c7b68826e7d8480170b41a39db8c" class="extiw" title="phab:diffusion/MWVA/browse/master/puppet/modules/role/manifests/templatedata.pp;08fabdb0f168c7b68826e7d8480170b41a39db8c">example</a>)</li> <li><a href="https://phabricator.wikimedia.org/diffusion/MWVA/browse/master/puppet/modules/mediawiki/manifests/import/text.pp" class="extiw" title="phab:diffusion/MWVA/browse/master/puppet/modules/mediawiki/manifests/import/text.pp">mediawiki::import::text</a> - create a documentation or test page on the wiki (example: <a href="https://phabricator.wikimedia.org/diffusion/MWVA/browse/master/puppet/modules/role/manifests/buggy.pp;08fabdb0f168c7b68826e7d8480170b41a39db8c" class="extiw" title="phab:diffusion/MWVA/browse/master/puppet/modules/role/manifests/buggy.pp;08fabdb0f168c7b68826e7d8480170b41a39db8c">declaration</a>, <a href="https://phabricator.wikimedia.org/diffusion/MWVA/browse/master/puppet/modules/role/files/buggy/VagrantRoleBuggy.wiki;08fabdb0f168c7b68826e7d8480170b41a39db8c" class="extiw" title="phab:diffusion/MWVA/browse/master/puppet/modules/role/files/buggy/VagrantRoleBuggy.wiki;08fabdb0f168c7b68826e7d8480170b41a39db8c">page</a>)</li> <li><a href="https://phabricator.wikimedia.org/diffusion/MWVA/browse/master/puppet/modules/mediawiki/manifests/import/dump.pp" class="extiw" title="phab:diffusion/MWVA/browse/master/puppet/modules/mediawiki/manifests/import/dump.pp">mediawiki::import::dump</a> - import a wiki dump (<a href="https://phabricator.wikimedia.org/diffusion/MWVA/browse/master/puppet/modules/role/manifests/gwtoolset.pp;08fabdb0f168c7b68826e7d8480170b41a39db8c" class="extiw" title="phab:diffusion/MWVA/browse/master/puppet/modules/role/manifests/gwtoolset.pp;08fabdb0f168c7b68826e7d8480170b41a39db8c">example</a>)</li> <li><a href="https://phabricator.wikimedia.org/diffusion/MWVA/browse/master/puppet/modules/wmflib/lib/puppet/parser/functions/require_package.rb" class="extiw" title="phab:diffusion/MWVA/browse/master/puppet/modules/wmflib/lib/puppet/parser/functions/require package.rb">require_package</a> - install a system package (<a href="https://phabricator.wikimedia.org/diffusion/MWVA/browse/master/puppet/modules/role/manifests/pagedtiffhandler.pp;08fabdb0f168c7b68826e7d8480170b41a39db8c" class="extiw" title="phab:diffusion/MWVA/browse/master/puppet/modules/role/manifests/pagedtiffhandler.pp;08fabdb0f168c7b68826e7d8480170b41a39db8c">example</a>)</li> <li><a rel="nofollow" class="external text" href="https://puppet.com/docs/puppet/7/types/exec.html">exec</a> - execute a shell command (<a href="https://phabricator.wikimedia.org/diffusion/MWVA/browse/master/puppet/modules/role/manifests/confirmedit.pp;08fabdb0f168c7b68826e7d8480170b41a39db8c" class="extiw" title="phab:diffusion/MWVA/browse/master/puppet/modules/role/manifests/confirmedit.pp;08fabdb0f168c7b68826e7d8480170b41a39db8c">example</a>)</li></ul> <div class="mw-heading mw-heading2 ext-discussiontools-init-section"><h2 id="Setting_up_an_instance_on_Cloud_VPS" data-mw-thread-id="h-Setting_up_an_instance_on_Cloud_VPS"><span data-mw-comment-start="" id="h-Setting_up_an_instance_on_Cloud_VPS"></span>Setting up an instance on Cloud VPS<span data-mw-comment-end="h-Setting_up_an_instance_on_Cloud_VPS"></span></h2><!--__DTELLIPSISBUTTON__{"threadItem":{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Setting_up_an_instance_on_Cloud_VPS","replies":[]}}--></div> <p>You can use <a href="https://wikitech.wikimedia.org/wiki/Help:MediaWiki-Vagrant_in_Cloud_VPS" class="extiw" title="wikitech:Help:MediaWiki-Vagrant in Cloud VPS">MediaWiki-Vagrant in Cloud VPS</a> to install MediaWiki on a <a href="https://wikitech.wikimedia.org/wiki/Help:Instances" class="extiw" title="wikitech:Help:Instances"> Wikimedia Cloud VPS instance</a> and enable MediaWiki-Vagrant roles in it. </p> <div class="mw-heading mw-heading2 ext-discussiontools-init-section"><h2 id="Bugs" data-mw-thread-id="h-Bugs"><span data-mw-comment-start="" id="h-Bugs"></span>Bugs<span data-mw-comment-end="h-Bugs"></span></h2><!--__DTELLIPSISBUTTON__{"threadItem":{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Bugs","replies":[]}}--></div> <p>If you spot a bug in MediaWiki-Vagrant, please report it. First, make sure the bug is not a known Vagrant or VirtualBox bug by searching the <a rel="nofollow" class="external text" href="https://github.com/hashicorp/vagrant/issues">Vagrant issue tracker on GitHub</a> and the <a rel="nofollow" class="external text" href="https://www.virtualbox.org/wiki/Bugtracker">VirtualBox bugtracker</a>. If it is not, go ahead and <a class="external text" href="https://phabricator.wikimedia.org/maniphest/task/edit/form/43/?projects=MediaWiki-Vagrant">submit a bug report</a> to <a href="/wiki/Special:MyLanguage/Phabricator" title="Special:MyLanguage/Phabricator">Wikimedia Phabricator</a>. Clearly describe the issue and include steps to reproduce, whenever possible. </p> <div class="mw-heading mw-heading2 ext-discussiontools-init-section"><h2 id="Links" data-mw-thread-id="h-Links"><span data-mw-comment-start="" id="h-Links"></span>Links<span data-mw-comment-end="h-Links"></span></h2><!--__DTELLIPSISBUTTON__{"threadItem":{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Links","replies":[]}}--></div> <ul><li><a rel="nofollow" class="external text" href="https://www.openhub.net/p/mediawiki-vagrant">Project page on Ohloh</a></li> <li><a rel="nofollow" class="external text" href="https://github.com/wikimedia/mediawiki-vagrant">MediaWiki-Vagrant on GitHub</a></li> <li><a href="https://phabricator.wikimedia.org/project/view/627/" class="extiw" title="phab:project/view/627/">Issue tracker on Phabricator</a></li> <li><a rel="nofollow" class="external text" href="https://www.youtube.com/watch?v=I66xR-fq2O8">Watch</a> 2014-11-25 <a href="/wiki/Special:MyLanguage/Wikimedia_Technical_Talks" title="Special:MyLanguage/Wikimedia Technical Talks">Tech talk</a> on "What is New With MediaWiki Vagrant".</li> <li><a rel="nofollow" class="external text" href="https://gist.github.com/JeroenDeDauw/bf61ebcc1ecfd338183cd61de55c7910">Bash commands needed for quick start on Ubuntu</a></li> <li><a href="/wiki/MediaWiki-Vagrant/OS_upgrade" title="MediaWiki-Vagrant/OS upgrade">OS upgrade</a></li></ul> <div class="mw-heading mw-heading2 ext-discussiontools-init-section"><h2 id="Notes" data-mw-thread-id="h-Notes"><span data-mw-comment-start="" id="h-Notes"></span>Notes<span data-mw-comment-end="h-Notes"></span></h2><!--__DTELLIPSISBUTTON__{"threadItem":{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Notes","replies":[]}}--></div> <div class="mw-references-wrap"><ol class="references"> <li id="cite_note-fedora-1"><span class="mw-cite-backlink"><a href="#cite_ref-fedora_1-0">↑</a></span> <span class="reference-text"> If you are on Fedora, do <b>not</b> follow Oracle's instructions. Instead, enable the <a rel="nofollow" class="external text" href="https://rpmfusion.org/">RPMfusion</a> repositories (e.g. via Apper's configuration), then run <code>sudo dnf install VirtualBox VirtualBox-kmodsrc akmod-VirtualBox kmod-VirtualBox</code> (Note: Case-sensitive, and sometimes version-sensitive! If you don't find the package, search in <a rel="nofollow" class="external text" href="https://apps.kde.org/discover/">Discover</a> instead.) Alternatively you can <a rel="nofollow" class="external text" href="http://www.if-not-true-then-false.com/2010/install-virtualbox-with-yum-on-fedora-centos-red-hat-rhel/">follow this guide</a>. You may get an error about your kernel being too recent. If you do, install <code>akmods-VirtualBox</code>, and run <code>sudo akmods</code> to make sure the module builds.</span> </li> <li id="cite_note-2"><span class="mw-cite-backlink"><a href="#cite_ref-2">↑</a></span> <span class="reference-text">On Fedora, you can run <code>sudo dnf install vagrant</code>.</span> </li> <li id="cite_note-3"><span class="mw-cite-backlink"><a href="#cite_ref-3">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://github.com/hashicorp/vagrant/issues/10576#issuecomment-452793401">https://github.com/hashicorp/vagrant/issues/10576#issuecomment-452793401</a></span> </li> <li id="cite_note-4"><span class="mw-cite-backlink"><a href="#cite_ref-4">↑</a></span> <span class="reference-text"> <a rel="nofollow" class="external free" href="https://peshmerge.io/how-to-speed-up-vagrant-on-windows-10-using-nfs/">https://peshmerge.io/how-to-speed-up-vagrant-on-windows-10-using-nfs/</a></span> </li> <li id="cite_note-5"><span class="mw-cite-backlink"><a href="#cite_ref-5">↑</a></span> <span class="reference-text"><a href="https://phabricator.wikimedia.org/T58048" class="extiw" title="phab:T58048">Vagrant dependent on MediaWiki 1.21+</a></span> </li> </ol></div> <!-- NewPP limit report Parsed by mw‐web.eqiad.main‐565d46677b‐sgj52 Cached time: 20241128121017 Cache expiry: 2592000 Reduced expiry: false Complications: [show‐toc] DiscussionTools time usage: 0.044 seconds CPU time usage: 0.369 seconds Real time usage: 1.072 seconds Preprocessor visited node count: 2914/1000000 Post‐expand include size: 13690/2097152 bytes Template argument size: 7350/2097152 bytes Highest expansion depth: 13/100 Expensive parser function count: 43/500 Unstrip recursion depth: 0/20 Unstrip post‐expand size: 46490/5000000 bytes Lua time usage: 0.014/10.000 seconds Lua memory usage: 1180268/52428800 bytes Number of Wikibase entities loaded: 0/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 744.473 1 -total 4.27% 31.766 6 Template:Ll 3.97% 29.557 8 Template:Note 3.03% 22.557 8 Template:Pagelang 2.24% 16.668 2 Template:Dir 2.05% 15.270 4 Template:Key_press 1.98% 14.717 12 Template:Translatable 1.66% 12.337 1 Template:Ptag 1.33% 9.915 1 Template:Irc 1.21% 9.028 2 Template:Anchor --> <!-- Saved in parser cache with key mediawikiwiki:pcache:116892:|#|:idhash:canonical and timestamp 20241128121017 and revision id 6753678. Rendering was triggered because: page-view --> </div><!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?type=1x1&useformat=desktop" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">Retrieved from "<a dir="ltr" href="https://www.mediawiki.org/w/index.php?title=MediaWiki-Vagrant&oldid=6753678">https://www.mediawiki.org/w/index.php?title=MediaWiki-Vagrant&oldid=6753678</a>"</div></div> <div id="catlinks" class="catlinks" data-mw="interface"><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="/wiki/Special:Categories" title="Special:Categories">Categories</a>: <ul><li><a href="/wiki/Category:MediaWiki-Vagrant" title="Category:MediaWiki-Vagrant">MediaWiki-Vagrant</a></li><li><a href="/wiki/Category:Development_environments" title="Category:Development environments">Development environments</a></li></ul></div></div> </div> </main> </div> <div class="mw-footer-container"> <footer id="footer" class="mw-footer" > <ul id="footer-info"> <li id="footer-info-lastmod"> This page was last edited on 13 September 2024, at 23:28.</li> <li id="footer-info-copyright">Text is available under the <a rel="nofollow" class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-ShareAlike License</a>; additional terms may apply. Text in <a class="external text" href="https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents">the Help: namespace</a> is available under the <a rel="nofollow" class="external text" href="https://creativecommons.org/publicdomain/zero/1.0/">Creative Commons CC0 License</a>. By using this site, you agree to the <a class="external text" href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use">Terms of Use</a> and <a class="external text" href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">Privacy Policy</a>.</li> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">Privacy policy</a></li> <li id="footer-places-about"><a href="/wiki/Project:About">About mediawiki.org</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Project:General_disclaimer">Disclaimers</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://www.mediawiki.org/wiki/Special:MyLanguage/Code_of_Conduct">Code of Conduct</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">Developers</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/www.mediawiki.org">Statistics</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Cookie statement</a></li> <li id="footer-places-mobileview"><a href="//m.mediawiki.org/w/index.php?title=MediaWiki-Vagrant&mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Mobile view</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-copyrightico"><a href="https://wikimediafoundation.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/static/images/footer/wikimedia-button.svg" width="84" height="29" alt="Wikimedia Foundation" loading="lazy"></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/w/resources/assets/poweredby_mediawiki.svg" alt="Powered by MediaWiki" width="88" height="31" loading="lazy"></a></li> </ul> </footer> </div> </div> </div> <div class="vector-settings" id="p-dock-bottom"> <ul></ul> </div><script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.codfw.main-7bc9588894-f2rkz","wgBackendResponseTime":136,"wgDiscussionToolsPageThreads":[{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-System_requirements","replies":[]},{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Quick_start","replies":[{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-Windows_Subsystem_for_Linux_(WSL)-Quick_start","replies":[]},{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-Troubleshooting_startup-Quick_start","replies":[{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-Any_host-Troubleshooting_startup","replies":[]},{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-Windows-specific-Troubleshooting_startup","replies":[]},{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-Mac-specific-Troubleshooting_startup","replies":[]},{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-Debian_and_Ubuntu-Troubleshooting_startup","replies":[]},{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-Fedora-Troubleshooting_startup","replies":[]}]}]},{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Basic_usage","replies":[{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-Updating-Basic_usage","replies":[]}]},{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Using_roles","replies":[{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-Troubleshooting_specific_roles-Using_roles","replies":[{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-centralauth-Troubleshooting_specific_roles","replies":[]},{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-wikidata-Troubleshooting_specific_roles","replies":[]}]},{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-How_to_import_a_Wikidata_dump-Using_roles","replies":[]}]},{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Additional_suggestions","replies":[{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-Speeding_up_MediaWiki_on_Windows-Additional_suggestions","replies":[]},{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-Local_MediaWiki_core_copy-Additional_suggestions","replies":[]},{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-Update_cloned_repos-Additional_suggestions","replies":[]},{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-Vagrant_reload-Additional_suggestions","replies":[]},{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-When_to_enable_roles-Additional_suggestions","replies":[]},{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-Vagrant_behind_proxy-Additional_suggestions","replies":[]},{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-MediaWiki-Vagrant_prep-Additional_suggestions","replies":[]}]},{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Debugging","replies":[{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-Vagrant-Debugging","replies":[]},{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-Provisioning-Debugging","replies":[]},{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-PHP-Debugging","replies":[{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-Chrome-PHP","replies":[]},{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-Firefox-PHP","replies":[]},{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-CLI-PHP","replies":[]},{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-Log_files-PHP","replies":[]}]},{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-Running_and_debugging_unit_tests-Debugging","replies":[]},{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-Running_browser_tests-Debugging","replies":[]}]},{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Pushing_commits","replies":[{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-Gerrit-Pushing_commits","replies":[]}]},{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Troubleshooting","replies":[]},{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Advanced_usage","replies":[{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-MediaWiki_settings-Advanced_usage","replies":[]},{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-Vagrant_flags-Advanced_usage","replies":[]},{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-Job_queue-Advanced_usage","replies":[]},{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-Additional_storage_space-Advanced_usage","replies":[]}]},{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Authoring_roles","replies":[]},{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Setting_up_an_instance_on_Cloud_VPS","replies":[]},{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Bugs","replies":[]},{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Links","replies":[]},{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Notes","replies":[]}],"wgPageParseReport":{"discussiontools":{"limitreport-timeusage":"0.044"},"limitreport":{"cputime":"0.369","walltime":"1.072","ppvisitednodes":{"value":2914,"limit":1000000},"postexpandincludesize":{"value":13690,"limit":2097152},"templateargumentsize":{"value":7350,"limit":2097152},"expansiondepth":{"value":13,"limit":100},"expensivefunctioncount":{"value":43,"limit":500},"unstrip-depth":{"value":0,"limit":20},"unstrip-size":{"value":46490,"limit":5000000},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 744.473 1 -total"," 4.27% 31.766 6 Template:Ll"," 3.97% 29.557 8 Template:Note"," 3.03% 22.557 8 Template:Pagelang"," 2.24% 16.668 2 Template:Dir"," 2.05% 15.270 4 Template:Key_press"," 1.98% 14.717 12 Template:Translatable"," 1.66% 12.337 1 Template:Ptag"," 1.33% 9.915 1 Template:Irc"," 1.21% 9.028 2 Template:Anchor"]},"scribunto":{"limitreport-timeusage":{"value":"0.014","limit":"10.000"},"limitreport-memusage":{"value":1180268,"limit":52428800}},"cachereport":{"origin":"mw-web.eqiad.main-565d46677b-sgj52","timestamp":"20241128121017","ttl":2592000,"transientcontent":false}}});});</script> <script type="application/ld+json">{"@context":"https:\/\/schema.org","@type":"Article","name":"MediaWiki-Vagrant","url":"https:\/\/www.mediawiki.org\/wiki\/MediaWiki-Vagrant","sameAs":"http:\/\/www.wikidata.org\/entity\/Q21839573","mainEntity":"http:\/\/www.wikidata.org\/entity\/Q21839573","author":{"@type":"Organization","name":"Contributors to Wikimedia projects"},"publisher":{"@type":"Organization","name":"Wikimedia Foundation, Inc.","logo":{"@type":"ImageObject","url":"https:\/\/www.wikimedia.org\/static\/images\/wmf-hor-googpub.png"}},"datePublished":"2013-03-10T10:48:36Z","dateModified":"2024-09-13T23:28:08Z","image":"https:\/\/upload.wikimedia.org\/wikipedia\/commons\/c\/c0\/MediaWiki_Vagrant.svg","headline":"A portable MediaWiki development environment"}</script> </body> </html>