Where is the localsettings php file
Additionally, you can create a MySQL user, who is restricted to only the database used by the wiki and provide this user's credentials in LocalSettings. Also you can configure your database server to only accept connections from localhost - this should prevent access from outside in case of leaked credentials. See also Manual:Securing database passwords for a method to move the sensitive parts of LocalSettings. When you edit LocalSettings. Changing a setting usually means changing the value of a PHP variable.
Your changes will take effect immediately after saving the file again on the server: There is no need to manually "restart" anything. Anyway, in some cases you may need to clear your browser's cache to actually see the changes you made. Within LocalSettings. These lines enable the according extension in the wiki. Those extensions may require setting the values of more variables in LocalSettings. This prevents admins from accidentally adding new information after this tag. PHP works fine without a closing tag.
If you have a wiki on a MediaWiki wiki farm you may not have write-access perhaps not even read-access to the file LocalSettings. The wiki farm company may or may not be willing to make changes you desire. Perhaps it wants to keep most settings the same on all wikis of the wiki farm.
See the configuration settings index and the comments included in the settings files for help on what all the variables do. A short listing of the most important variables, as well as the most requested features, is listed below. Since MediaWiki 1.
The DefaultSettings. This name gets included many times throughout the system, such as via MediaWiki:Pagetitle. For instance, the Wikipedia tagline "From Wikipedia, the free encyclopedia" makes use of this setting. Some translations of interface are ready for inflection of site name. While users can switch the language they see in their preferences , this variable sets the default language that all anonymous users and most registered users see.
This setting should correspond to the Apache settings , especially if you are using Apache's rewrite rules. When the wiki is accessed from either the localhost where it runs, from an intranet or from the internet, email notifications and a few other computed messages would be usually delivered with the different URLs.
Learn more. How to force reload of configuration after modifying LocalSettings. Asked 9 months ago. Active 9 months ago. Viewed times. I need to reload configuration after modifying LocalSettings. How is it possible? Kind regards. Improve this question. To set 'pretty' URL paths for actions other than plain page views, add to this array.
How many days user must be idle before he is considered inactive. Additional email parameters, will be passed as the last argument to mail call. Which feed types should we provide by default? This can include 'rss', 'atom', neither, or both. List of Ajax-callable functions. Extensions acting as Ajax callbacks must register here Deprecated: officially since 1. Enable previewing licences via AJAX. Enable AJAX check for file overwrite, pre-upload. Allow for upload to be copied from an URL.
Allow anonymous cross origin requests. This should be disabled for intranet sites sites behind a firewall. Since 1. Whether to allow inline image pointing to other websites. If the above is false, you can specify an exception here.
Deprecated: since 1. Allow Java archive uploads. Deprecated: This feature is under development, don't assume this flag's existence or function outside of MediaWiki. Allow schema updates. Enable slow parser functions. Allow style-related user-preferences?
This has a small performance impact. Enable dates like 'May 12' instead of '12 May', if the default date format is 'dmy or mdy'. Internal name of virus scanner. Set the timeout for the API help text cache. If set to 0, caching disabled Definition at line of file DefaultSettings. API format module extensions. This is recommended for most wikis. API Query list module extensions.
The maximum size in bytes of an API result. The maximum number of uncached diffs that can be retrieved in one API request. API Query meta module extensions. API module extensions. API Query prop module extensions. Defaults to no icon. Method used to determine if a page in a content namespace should be counted as a valid article. Redirect pages will never be counted as valid articles. The URL path for primary article page views.
Robot policies per article. Versioning for authentication tokens. Configure AuthManager. Elements are: preauth: Array keys ignored of specifications for PreAuthenticationProviders primaryauth: Array keys ignored of specifications for PrimaryAuthenticationProviders secondaryauth: Array keys ignored of specifications for SecondaryAuthenticationProviders Since 1.
Local customization should generally set this variable from scratch to the desired configuration. Number of seconds before autoblock entries expire.
This can be used to limit privileges of new accounts. When left at 0, all registered accounts will pass. Number of edits an account requires before it is autoconfirmed. Passing both this AND the time requirement is needed.
Switch controlling legacy case-insensitive classloading. Array mapping class names to filenames, for autoloading. Put user rights log entries for autopromotion in recent changes? A list of available rights, in addition to the ones defined by the core. For extensions only. Set this to true to allow blocked users to edit their own user talk page. If true, blocked users will not be allowed to login. If false, the normal database will be used Since 1.
Break out of framesets. Override ability of certains browsers to attempt to autodetect dataformats in pages. Directory for caching data in the local filesystem.
Should not be accessible from the web. Set this to current time to invalidate all prior cached pages. Allow client-side caching of pages. Overwrite the caching key prefix with custom value. A list of cookies that vary the cache for use by extensions Definition at line of file DefaultSettings. Canonical namespace names. Also, since Talk namespaces need to directly mirror their associated content namespaces, the values for those are ignored in favor of the subject namespace's setting.
Set this to false to avoid forcing the first letter of links to capitals. Warning may break links! Links appearing with a capital at the beginning of a sentence will not go to the same place as links in the middle of a sentence using a lowercase initial. Restriction levels that can be used with cascading protection. Specify how category names should be sorted, when listed on a category page.
A sorting scheme is also known as a collation. Available values are: uppercase: Converts the category name to upper case, and sorts by that. Sorts by binary value of the string. This is a compromise collation which sorts all languages in a mediocre way.
However, it is better than "uppercase". Paging limit for categories. List of proxy servers to purge on changes; default port is Use IP addresses. Central ID lookup provider to use by default. This is a flag to determine whether or not to check file extensions on upload. Warning Setting this to false is insecure for public wikis. If true, removes by substituting templates in signatures.
For colorized maintenance script output, is your terminal background dark? We can also compress text stored in the 'text' table. Not used for much in a default install. How to react if a plain text version of a non-text Content object is requested using ContentHandler::getContentText : 'ignore': return null 'fail': throw an MWException 'serialize': serialize to default format Since 1.
Default cookie lifetime, in seconds. Setting to 0 makes all cookies session-only. This can mitigates some classes of XSS attack. The SameSite cookie attribute used for login cookies. Whether the "secure" flag should be set on the cookie. Whether to set a cookie when a user is autoblocked.
Whether to set a cookie when a logged-out user is blocked. Proxy to use for copy upload requests. A list of domains copy uploads can come from. Enable copy uploads from Special:Upload. False means fallback to default. On Special:Unusedimages, consider images "used", if they are put into a category. Default false is not to count those as used. The maximum time critical sections are allowed to stay open. This limit is ignored in command-line mode. Controls Content-Security-Policy header [Experimental].
If an array, can have parameters: 'default-src' If true or array of additional urls will set a default-src directive, which limits what places things can load from. If false or not set, will send a default-src directive allowing all sources. If disabled and 'unsafeFallback' is on, then all inline scripts will be allowed [default true]. False means omit. Use another resizing converter, e. This avoids unexpected stale or responses due to replication lag.
Separate password for maintenance tasks. Leave as null to use the default. Separate username for maintenance tasks. Whether to use compression in DB connection. Default group to use when getting database connections. Will be used as default query group in ILoadBalancer::getConnection. Timezone to use in the error log. Current wiki database schema name. Current wiki database name. Database user's password. Current wiki database table name prefix. Database host name or IP address.
If this is zero for any given server, no normal query traffic will be sent to it. It will be excluded from lag checks in maintenance scripts. The only way it can receive traffic is if groupLoads is used. A query may belong to several groups, the most specific group defined here is used. MySQL table options to use during installation or update. Database type. Database username. Send debug data to an HTML comment in the output.
Write SQL queries to the debug log. Filename for debug logging. Map of string log group names to log destinations. Prefix for debug log lines. If true, instead of redirecting, show a page with a link to the redirect destination.
Display the new debugging toolbar. The place to put new revisions, false to put them in the local text table. Part of a URL, e. Default variant code, if false, the default will be the language code. Default robot policy. Default skin, for new users and anonymous visitors.
Registered users may change this to any one of the other available skins in their preferences. What directory to place deleted uploads in. Revisions will be archived in batches of at most this size, one batch per job. Default given to sysops. Path to the GNU diff utility. Path to the GNU diff3 utility.
If the file doesn't exist, edit conflicts will fall back to the old behavior no merging. Specify the difference engine to use. Default value for chmoding of new directories. Set this to true if you want to disable this cookie check. Disabled variants array of language variant conversion. URL's containing a local interwiki prefix or a non-canonical special page name are still hard redirected regardless of this setting. Disable the internal MySQL-based search, to allow it to be implemented by an extension instead.
Whether to enable language variant conversion. Disable output compression enabled by default if zlib is available Definition at line of file DefaultSettings. Disable all query pages if miser mode is on, not just some. Mapping each special page name to an run mode like 'periodical' if a cronjob is set up.
If you've disabled search semi-permanently, this also disables updates to the table. If you ever re-enable, be sure to rebuild the search table.
Set this to true to disable the full text search feature. Whether to enable language variant conversion for links. Shell to use when getting djvu metadata. While this works, it is recommended that you. Display user edit counts in various prominent places. This prevents those pages from being displayed in a frame or iframe.
This can be used to allow framing within a trusted domain. This is insecure if there is a page on the same domain which allows framing of arbitrary URLs. This opens up the wiki to XSS attacks and thus full compromise of local user accounts.
Private wikis behind a corporate firewall are especially vulnerable. This is not recommended. Require email authentication before sending mail to an email address. Should editors be required to have a validated e-mail address before being allowed to edit? Site admin email address. Enable deferred upload tasks that use the job queue. Note If you use suhosin, this setting is incompatible with suhosin. If set to null, try to auto-detect whether a scaler is available that can rotate. Whether to enable bot passwords.
If sending e-mail on your server doesn't work, you might want to disable this. If the image matches one of the regular expression fragments, the image will be displayed.
Set this to true to enable the on-wiki allow list MediaWiki :External image whitelist Or false to disable it Since 1. Flag to enable partial blocks against performing certain actions.
Stability: unstable Temporary feature flag, to be removed before the release of 1. Enable interwiki transcluding. If true, searches for IP addresses will be redirected to that IP's contributions page. If on, the sidebar navigation links are cached for users with the current language set. This can save a touch of load on a busy site by shaving off extra message lookups.
Set to true to enable the Special Mute page. Allow users to upload files. Set to true to enable user-to-user e-mail. This can potentially be abused, as it's hard to track. Set to true to enable user-to-user e-mail mutelist. Allow sending of e-mail notifications with the editor's address as sender. Send a generic mail instead of a personalised mail for each user. This always uses UTC as the time zone, and doesn't include the username.
Maximum number of users to mail at once when using impersonal mail. Should match the limit on your mail server. Potentially send notification mails on minor edits to pages. This is enabled by default. If this is false, users will never be notified on minor edits. Allow sending of e-mail notifications with the editor's address in "Reply-To". Use real name instead of username in e-mail "from" field. Allow users to enable email notification "enotif" when someone edits their user talk page.
Allow users to enable email notification "enotif" on watchlist changes. Path to exiftool binary. Used for lossless ICC profile swapping. Number of edits the user must have before becoming "experienced". Number of days the user must exist before becoming "experienced". Whether to allow exporting the entire wiki into a single file.
If set to false, disables the full-history option on Special:Export. Return distinct author list when not returning full history Definition at line of file DefaultSettings. Whether to allow the "export all pages in namespace" option. On some big sites things could get bogged down by very very long pages.
In other words, last resort safety net. Default login cookie lifetime, in seconds. The URL path of the extensions directory. Add information about an installed extension, keyed by its type. The 'name', 'path' and 'author' keys are required. Filesystem extensions directory. Extension messages files. Variables defined in extensions will override conflicting variables defined in the core. Name of the external diff engine to use. Path to an external diff executable Definition at line of file DefaultSettings.
Set a default target for external links, e. An array of external MySQL servers. External stores allow including content from non database sources following URL links. Same as above, but for namespaces with gender distinction. List of additional interwiki prefixes that should be treated as interlanguage links i. Notes: This will not do anything unless the prefixes are defined in the interwiki map. The display text for these custom interlanguage links will be fetched from the system message "interlanguage-link-xyz" where xyz is the prefix in this array.
A friendly name for each site, used for tooltip text, may optionally be placed in the system message "interlanguage-link-sitename-xyz" where xyz is the prefix in this array. Additional namespaces. Warning Once you delete a namespace, the pages in that namespace will no longer be accessible. If you rename it, then you can access them through the new namespace name. The URL path of the shortcut icon.
If you would like to allow additional formats, add the wgFileExtensions variable to the bottom of the file like so:. Note: Any website that accepts content from users is adopting a certain level of risk! Be sure that you are aware of the implications of allowing user uploads and take the appropriate steps to mitigate these dangers. This allows your wiki to automatically configure access to content in Wikimedia Commons.
These can be incorporated into your own pages. One commonly requested piece of information is how to change the logo in the upper-left corner of the page to something relevant to your site. Now you have the image on your wiki server. Change the path of wgLogo to reflect the image name:. To receive administrative emails, including bug reports, include your email after the wgEmergencyContact variable. You will also want to configure the wgPasswordSender email to point to an actual email address, so that users can respond to the email if they have problems.
You should now know how to configure some common settings located within the LocalSettings. There are many, many configuration settings available for MediaWiki that are not present in LocalSettings. The file is well-commented. More information on specific variables can be found here. Common Configuration Settings Conclusion.
0コメント