1. 8.2.x sites/default/default.settings.php
  2. 8.0.x sites/default/default.settings.php
  3. 8.1.x sites/default/default.settings.php
  4. 8.3.x sites/default/default.settings.php
  5. 6.x sites/default/default.settings.php
  6. 7.x sites/default/default.settings.php

Drupal site-specific configuration file.

IMPORTANT NOTE: This file may have been set to read-only by the Drupal installation program. If you make changes to this file, be sure to protect it again after making your modifications. Failure to remove write permissions to this file is a security risk.

In order to use the selection rules below the multisite aliasing file named sites/sites.php must be present. Its optional settings will be loaded, and the aliases in the array $sites will override the default directory rules below. See sites/example.sites.php for more information about aliases.

The configuration directory will be discovered by stripping the website's hostname from left to right and pathname from right to left. The first configuration file found will be used and any others will be ignored. If no other configuration file is found then the default configuration file at 'sites/default' will be used.

For example, for a fictitious site installed at https://www.drupal.org:8080/mysite/test/, the 'settings.php' file is searched for in the following directories:

  • sites/default

Note that if you are installing on a non-standard port number, prefix the hostname with that number. For example, https://www.drupal.org:8080/mysite/test/ could be loaded from sites/8080.www.drupal.org.mysite.test/.

In addition to customizing application settings through variables in settings.php, you can create a services.yml file in the same directory to register custom, site-specific service definitions and/or swap out default implementations with custom ones.

See also

example.sites.php

\Drupal\Core\DrupalKernel::getSitePath()

File

sites/default/default.settings.php
View source
  1. <?php
  2. /**
  3. * @file
  4. * Drupal site-specific configuration file.
  5. *
  6. * IMPORTANT NOTE:
  7. * This file may have been set to read-only by the Drupal installation program.
  8. * If you make changes to this file, be sure to protect it again after making
  9. * your modifications. Failure to remove write permissions to this file is a
  10. * security risk.
  11. *
  12. * In order to use the selection rules below the multisite aliasing file named
  13. * sites/sites.php must be present. Its optional settings will be loaded, and
  14. * the aliases in the array $sites will override the default directory rules
  15. * below. See sites/example.sites.php for more information about aliases.
  16. *
  17. * The configuration directory will be discovered by stripping the website's
  18. * hostname from left to right and pathname from right to left. The first
  19. * configuration file found will be used and any others will be ignored. If no
  20. * other configuration file is found then the default configuration file at
  21. * 'sites/default' will be used.
  22. *
  23. * For example, for a fictitious site installed at
  24. * https://www.drupal.org:8080/mysite/test/, the 'settings.php' file is searched
  25. * for in the following directories:
  26. *
  27. * - sites/8080.www.drupal.org.mysite.test
  28. * - sites/www.drupal.org.mysite.test
  29. * - sites/drupal.org.mysite.test
  30. * - sites/org.mysite.test
  31. *
  32. * - sites/8080.www.drupal.org.mysite
  33. * - sites/www.drupal.org.mysite
  34. * - sites/drupal.org.mysite
  35. * - sites/org.mysite
  36. *
  37. * - sites/8080.www.drupal.org
  38. * - sites/www.drupal.org
  39. * - sites/drupal.org
  40. * - sites/org
  41. *
  42. * - sites/default
  43. *
  44. * Note that if you are installing on a non-standard port number, prefix the
  45. * hostname with that number. For example,
  46. * https://www.drupal.org:8080/mysite/test/ could be loaded from
  47. * sites/8080.www.drupal.org.mysite.test/.
  48. *
  49. * @see example.sites.php
  50. * @see \Drupal\Core\DrupalKernel::getSitePath()
  51. *
  52. * In addition to customizing application settings through variables in
  53. * settings.php, you can create a services.yml file in the same directory to
  54. * register custom, site-specific service definitions and/or swap out default
  55. * implementations with custom ones.
  56. */
  57. /**
  58. * Database settings:
  59. *
  60. * The $databases array specifies the database connection or
  61. * connections that Drupal may use. Drupal is able to connect
  62. * to multiple databases, including multiple types of databases,
  63. * during the same request.
  64. *
  65. * One example of the simplest connection array is shown below. To use the
  66. * sample settings, copy and uncomment the code below between the @code and
  67. * @endcode lines and paste it after the $databases declaration. You will need
  68. * to replace the database username and password and possibly the host and port
  69. * with the appropriate credentials for your database system.
  70. *
  71. * The next section describes how to customize the $databases array for more
  72. * specific needs.
  73. *
  74. * @code
  75. * $databases['default']['default'] = array (
  76. * 'database' => 'databasename',
  77. * 'username' => 'sqlusername',
  78. * 'password' => 'sqlpassword',
  79. * 'host' => 'localhost',
  80. * 'port' => '3306',
  81. * 'driver' => 'mysql',
  82. * 'prefix' => '',
  83. * 'collation' => 'utf8mb4_general_ci',
  84. * );
  85. * @endcode
  86. */
  87. $databases = array();
  88. /**
  89. * Customizing database settings.
  90. *
  91. * Many of the values of the $databases array can be customized for your
  92. * particular database system. Refer to the sample in the section above as a
  93. * starting point.
  94. *
  95. * The "driver" property indicates what Drupal database driver the
  96. * connection should use. This is usually the same as the name of the
  97. * database type, such as mysql or sqlite, but not always. The other
  98. * properties will vary depending on the driver. For SQLite, you must
  99. * specify a database file name in a directory that is writable by the
  100. * webserver. For most other drivers, you must specify a
  101. * username, password, host, and database name.
  102. *
  103. * Transaction support is enabled by default for all drivers that support it,
  104. * including MySQL. To explicitly disable it, set the 'transactions' key to
  105. * FALSE.
  106. * Note that some configurations of MySQL, such as the MyISAM engine, don't
  107. * support it and will proceed silently even if enabled. If you experience
  108. * transaction related crashes with such configuration, set the 'transactions'
  109. * key to FALSE.
  110. *
  111. * For each database, you may optionally specify multiple "target" databases.
  112. * A target database allows Drupal to try to send certain queries to a
  113. * different database if it can but fall back to the default connection if not.
  114. * That is useful for primary/replica replication, as Drupal may try to connect
  115. * to a replica server when appropriate and if one is not available will simply
  116. * fall back to the single primary server (The terms primary/replica are
  117. * traditionally referred to as master/slave in database server documentation).
  118. *
  119. * The general format for the $databases array is as follows:
  120. * @code
  121. * $databases['default']['default'] = $info_array;
  122. * $databases['default']['replica'][] = $info_array;
  123. * $databases['default']['replica'][] = $info_array;
  124. * $databases['extra']['default'] = $info_array;
  125. * @endcode
  126. *
  127. * In the above example, $info_array is an array of settings described above.
  128. * The first line sets a "default" database that has one primary database
  129. * (the second level default). The second and third lines create an array
  130. * of potential replica databases. Drupal will select one at random for a given
  131. * request as needed. The fourth line creates a new database with a name of
  132. * "extra".
  133. *
  134. * You can optionally set prefixes for some or all database table names
  135. * by using the 'prefix' setting. If a prefix is specified, the table
  136. * name will be prepended with its value. Be sure to use valid database
  137. * characters only, usually alphanumeric and underscore. If no prefixes
  138. * are desired, leave it as an empty string ''.
  139. *
  140. * To have all database names prefixed, set 'prefix' as a string:
  141. * @code
  142. * 'prefix' => 'main_',
  143. * @endcode
  144. *
  145. * Per-table prefixes are deprecated as of Drupal 8.2, and will be removed in
  146. * Drupal 9.0. After that, only a single prefix for all tables will be
  147. * supported.
  148. *
  149. * To provide prefixes for specific tables, set 'prefix' as an array.
  150. * The array's keys are the table names and the values are the prefixes.
  151. * The 'default' element is mandatory and holds the prefix for any tables
  152. * not specified elsewhere in the array. Example:
  153. * @code
  154. * 'prefix' => array(
  155. * 'default' => 'main_',
  156. * 'users' => 'shared_',
  157. * 'sessions' => 'shared_',
  158. * 'role' => 'shared_',
  159. * 'authmap' => 'shared_',
  160. * ),
  161. * @endcode
  162. * You can also use a reference to a schema/database as a prefix. This may be
  163. * useful if your Drupal installation exists in a schema that is not the default
  164. * or you want to access several databases from the same code base at the same
  165. * time.
  166. * Example:
  167. * @code
  168. * 'prefix' => array(
  169. * 'default' => 'main.',
  170. * 'users' => 'shared.',
  171. * 'sessions' => 'shared.',
  172. * 'role' => 'shared.',
  173. * 'authmap' => 'shared.',
  174. * );
  175. * @endcode
  176. * NOTE: MySQL and SQLite's definition of a schema is a database.
  177. *
  178. * Advanced users can add or override initial commands to execute when
  179. * connecting to the database server, as well as PDO connection settings. For
  180. * example, to enable MySQL SELECT queries to exceed the max_join_size system
  181. * variable, and to reduce the database connection timeout to 5 seconds:
  182. * @code
  183. * $databases['default']['default'] = array(
  184. * 'init_commands' => array(
  185. * 'big_selects' => 'SET SQL_BIG_SELECTS=1',
  186. * ),
  187. * 'pdo' => array(
  188. * PDO::ATTR_TIMEOUT => 5,
  189. * ),
  190. * );
  191. * @endcode
  192. *
  193. * WARNING: The above defaults are designed for database portability. Changing
  194. * them may cause unexpected behavior, including potential data loss. See
  195. * https://www.drupal.org/developing/api/database/configuration for more
  196. * information on these defaults and the potential issues.
  197. *
  198. * More details can be found in the constructor methods for each driver:
  199. * - \Drupal\Core\Database\Driver\mysql\Connection::__construct()
  200. * - \Drupal\Core\Database\Driver\pgsql\Connection::__construct()
  201. * - \Drupal\Core\Database\Driver\sqlite\Connection::__construct()
  202. *
  203. * Sample Database configuration format for PostgreSQL (pgsql):
  204. * @code
  205. * $databases['default']['default'] = array(
  206. * 'driver' => 'pgsql',
  207. * 'database' => 'databasename',
  208. * 'username' => 'sqlusername',
  209. * 'password' => 'sqlpassword',
  210. * 'host' => 'localhost',
  211. * 'prefix' => '',
  212. * );
  213. * @endcode
  214. *
  215. * Sample Database configuration format for SQLite (sqlite):
  216. * @code
  217. * $databases['default']['default'] = array(
  218. * 'driver' => 'sqlite',
  219. * 'database' => '/path/to/databasefilename',
  220. * );
  221. * @endcode
  222. */
  223. /**
  224. * Location of the site configuration files.
  225. *
  226. * The $config_directories array specifies the location of file system
  227. * directories used for configuration data. On install, the "sync" directory is
  228. * created. This is used for configuration imports. The "active" directory is
  229. * not created by default since the default storage for active configuration is
  230. * the database rather than the file system. (This can be changed. See "Active
  231. * configuration settings" below).
  232. *
  233. * The default location for the "sync" directory is inside a randomly-named
  234. * directory in the public files path. The setting below allows you to override
  235. * the "sync" location.
  236. *
  237. * If you use files for the "active" configuration, you can tell the
  238. * Configuration system where this directory is located by adding an entry with
  239. * array key CONFIG_ACTIVE_DIRECTORY.
  240. *
  241. * Example:
  242. * @code
  243. * $config_directories = array(
  244. * CONFIG_SYNC_DIRECTORY => '/directory/outside/webroot',
  245. * );
  246. * @endcode
  247. */
  248. $config_directories = array();
  249. /**
  250. * Settings:
  251. *
  252. * $settings contains environment-specific configuration, such as the files
  253. * directory and reverse proxy address, and temporary configuration, such as
  254. * security overrides.
  255. *
  256. * @see \Drupal\Core\Site\Settings::get()
  257. */
  258. /**
  259. * The active installation profile.
  260. *
  261. * Changing this after installation is not recommended as it changes which
  262. * directories are scanned during extension discovery. If this is set prior to
  263. * installation this value will be rewritten according to the profile selected
  264. * by the user.
  265. *
  266. * @see install_select_profile()
  267. *
  268. * @deprecated in Drupal 8.3.0 and will be removed before Drupal 9.0.0. The
  269. * install profile is written to the core.extension configuration. If a
  270. * service requires the install profile use the 'install_profile' container
  271. * parameter. Functional code can use \Drupal::installProfile().
  272. */
  273. # $settings['install_profile'] = '';
  274. /**
  275. * Salt for one-time login links, cancel links, form tokens, etc.
  276. *
  277. * This variable will be set to a random value by the installer. All one-time
  278. * login links will be invalidated if the value is changed. Note that if your
  279. * site is deployed on a cluster of web servers, you must ensure that this
  280. * variable has the same value on each server.
  281. *
  282. * For enhanced security, you may set this variable to the contents of a file
  283. * outside your document root; you should also ensure that this file is not
  284. * stored with backups of your database.
  285. *
  286. * Example:
  287. * @code
  288. * $settings['hash_salt'] = file_get_contents('/home/example/salt.txt');
  289. * @endcode
  290. */
  291. $settings['hash_salt'] = '';
  292. /**
  293. * Deployment identifier.
  294. *
  295. * Drupal's dependency injection container will be automatically invalidated and
  296. * rebuilt when the Drupal core version changes. When updating contributed or
  297. * custom code that changes the container, changing this identifier will also
  298. * allow the container to be invalidated as soon as code is deployed.
  299. */
  300. # $settings['deployment_identifier'] = \Drupal::VERSION;
  301. /**
  302. * Access control for update.php script.
  303. *
  304. * If you are updating your Drupal installation using the update.php script but
  305. * are not logged in using either an account with the "Administer software
  306. * updates" permission or the site maintenance account (the account that was
  307. * created during installation), you will need to modify the access check
  308. * statement below. Change the FALSE to a TRUE to disable the access check.
  309. * After finishing the upgrade, be sure to open this file again and change the
  310. * TRUE back to a FALSE!
  311. */
  312. $settings['update_free_access'] = FALSE;
  313. /**
  314. * External access proxy settings:
  315. *
  316. * If your site must access the Internet via a web proxy then you can enter the
  317. * proxy settings here. Set the full URL of the proxy, including the port, in
  318. * variables:
  319. * - $settings['http_client_config']['proxy']['http']: The proxy URL for HTTP
  320. * requests.
  321. * - $settings['http_client_config']['proxy']['https']: The proxy URL for HTTPS
  322. * requests.
  323. * You can pass in the user name and password for basic authentication in the
  324. * URLs in these settings.
  325. *
  326. * You can also define an array of host names that can be accessed directly,
  327. * bypassing the proxy, in $settings['http_client_config']['proxy']['no'].
  328. */
  329. # $settings['http_client_config']['proxy']['http'] = 'http://proxy_user:proxy_pass@example.com:8080';
  330. # $settings['http_client_config']['proxy']['https'] = 'http://proxy_user:proxy_pass@example.com:8080';
  331. # $settings['http_client_config']['proxy']['no'] = ['127.0.0.1', 'localhost'];
  332. /**
  333. * Reverse Proxy Configuration:
  334. *
  335. * Reverse proxy servers are often used to enhance the performance
  336. * of heavily visited sites and may also provide other site caching,
  337. * security, or encryption benefits. In an environment where Drupal
  338. * is behind a reverse proxy, the real IP address of the client should
  339. * be determined such that the correct client IP address is available
  340. * to Drupal's logging, statistics, and access management systems. In
  341. * the most simple scenario, the proxy server will add an
  342. * X-Forwarded-For header to the request that contains the client IP
  343. * address. However, HTTP headers are vulnerable to spoofing, where a
  344. * malicious client could bypass restrictions by setting the
  345. * X-Forwarded-For header directly. Therefore, Drupal's proxy
  346. * configuration requires the IP addresses of all remote proxies to be
  347. * specified in $settings['reverse_proxy_addresses'] to work correctly.
  348. *
  349. * Enable this setting to get Drupal to determine the client IP from
  350. * the X-Forwarded-For header (or $settings['reverse_proxy_header'] if set).
  351. * If you are unsure about this setting, do not have a reverse proxy,
  352. * or Drupal operates in a shared hosting environment, this setting
  353. * should remain commented out.
  354. *
  355. * In order for this setting to be used you must specify every possible
  356. * reverse proxy IP address in $settings['reverse_proxy_addresses'].
  357. * If a complete list of reverse proxies is not available in your
  358. * environment (for example, if you use a CDN) you may set the
  359. * $_SERVER['REMOTE_ADDR'] variable directly in settings.php.
  360. * Be aware, however, that it is likely that this would allow IP
  361. * address spoofing unless more advanced precautions are taken.
  362. */
  363. # $settings['reverse_proxy'] = TRUE;
  364. /**
  365. * Specify every reverse proxy IP address in your environment.
  366. * This setting is required if $settings['reverse_proxy'] is TRUE.
  367. */
  368. # $settings['reverse_proxy_addresses'] = array('a.b.c.d', ...);
  369. /**
  370. * Set this value if your proxy server sends the client IP in a header
  371. * other than X-Forwarded-For.
  372. */
  373. # $settings['reverse_proxy_header'] = 'X_CLUSTER_CLIENT_IP';
  374. /**
  375. * Set this value if your proxy server sends the client protocol in a header
  376. * other than X-Forwarded-Proto.
  377. */
  378. # $settings['reverse_proxy_proto_header'] = 'X_FORWARDED_PROTO';
  379. /**
  380. * Set this value if your proxy server sends the client protocol in a header
  381. * other than X-Forwarded-Host.
  382. */
  383. # $settings['reverse_proxy_host_header'] = 'X_FORWARDED_HOST';
  384. /**
  385. * Set this value if your proxy server sends the client protocol in a header
  386. * other than X-Forwarded-Port.
  387. */
  388. # $settings['reverse_proxy_port_header'] = 'X_FORWARDED_PORT';
  389. /**
  390. * Set this value if your proxy server sends the client protocol in a header
  391. * other than Forwarded.
  392. */
  393. # $settings['reverse_proxy_forwarded_header'] = 'FORWARDED';
  394. /**
  395. * Page caching:
  396. *
  397. * By default, Drupal sends a "Vary: Cookie" HTTP header for anonymous page
  398. * views. This tells a HTTP proxy that it may return a page from its local
  399. * cache without contacting the web server, if the user sends the same Cookie
  400. * header as the user who originally requested the cached page. Without "Vary:
  401. * Cookie", authenticated users would also be served the anonymous page from
  402. * the cache. If the site has mostly anonymous users except a few known
  403. * editors/administrators, the Vary header can be omitted. This allows for
  404. * better caching in HTTP proxies (including reverse proxies), i.e. even if
  405. * clients send different cookies, they still get content served from the cache.
  406. * However, authenticated users should access the site directly (i.e. not use an
  407. * HTTP proxy, and bypass the reverse proxy if one is used) in order to avoid
  408. * getting cached pages from the proxy.
  409. */
  410. # $settings['omit_vary_cookie'] = TRUE;
  411. /**
  412. * Cache TTL for client error (4xx) responses.
  413. *
  414. * Items cached per-URL tend to result in a large number of cache items, and
  415. * this can be problematic on 404 pages which by their nature are unbounded. A
  416. * fixed TTL can be set for these items, defaulting to one hour, so that cache
  417. * backends which do not support LRU can purge older entries. To disable caching
  418. * of client error responses set the value to 0. Currently applies only to
  419. * page_cache module.
  420. */
  421. # $settings['cache_ttl_4xx'] = 3600;
  422. /**
  423. * Class Loader.
  424. *
  425. * If the APC extension is detected, the Symfony APC class loader is used for
  426. * performance reasons. Detection can be prevented by setting
  427. * class_loader_auto_detect to false, as in the example below.
  428. */
  429. # $settings['class_loader_auto_detect'] = FALSE;
  430. /*
  431. * If the APC extension is not detected, either because APC is missing or
  432. * because auto-detection has been disabled, auto-loading falls back to
  433. * Composer's ClassLoader, which is good for development as it does not break
  434. * when code is moved in the file system. You can also decorate the base class
  435. * loader with another cached solution than the Symfony APC class loader, as
  436. * all production sites should have a cached class loader of some sort enabled.
  437. *
  438. * To do so, you may decorate and replace the local $class_loader variable. For
  439. * example, to use Symfony's APC class loader without automatic detection,
  440. * uncomment the code below.
  441. */
  442. /*
  443. if ($settings['hash_salt']) {
  444. $prefix = 'drupal.' . hash('sha256', 'drupal.' . $settings['hash_salt']);
  445. $apc_loader = new \Symfony\Component\ClassLoader\ApcClassLoader($prefix, $class_loader);
  446. unset($prefix);
  447. $class_loader->unregister();
  448. $apc_loader->register();
  449. $class_loader = $apc_loader;
  450. }
  451. */
  452. /**
  453. * Authorized file system operations:
  454. *
  455. * The Update Manager module included with Drupal provides a mechanism for
  456. * site administrators to securely install missing updates for the site
  457. * directly through the web user interface. On securely-configured servers,
  458. * the Update manager will require the administrator to provide SSH or FTP
  459. * credentials before allowing the installation to proceed; this allows the
  460. * site to update the new files as the user who owns all the Drupal files,
  461. * instead of as the user the webserver is running as. On servers where the
  462. * webserver user is itself the owner of the Drupal files, the administrator
  463. * will not be prompted for SSH or FTP credentials (note that these server
  464. * setups are common on shared hosting, but are inherently insecure).
  465. *
  466. * Some sites might wish to disable the above functionality, and only update
  467. * the code directly via SSH or FTP themselves. This setting completely
  468. * disables all functionality related to these authorized file operations.
  469. *
  470. * @see https://www.drupal.org/node/244924
  471. *
  472. * Remove the leading hash signs to disable.
  473. */
  474. # $settings['allow_authorize_operations'] = FALSE;
  475. /**
  476. * Default mode for directories and files written by Drupal.
  477. *
  478. * Value should be in PHP Octal Notation, with leading zero.
  479. */
  480. # $settings['file_chmod_directory'] = 0775;
  481. # $settings['file_chmod_file'] = 0664;
  482. /**
  483. * Public file base URL:
  484. *
  485. * An alternative base URL to be used for serving public files. This must
  486. * include any leading directory path.
  487. *
  488. * A different value from the domain used by Drupal to be used for accessing
  489. * public files. This can be used for a simple CDN integration, or to improve
  490. * security by serving user-uploaded files from a different domain or subdomain
  491. * pointing to the same server. Do not include a trailing slash.
  492. */
  493. # $settings['file_public_base_url'] = 'http://downloads.example.com/files';
  494. /**
  495. * Public file path:
  496. *
  497. * A local file system path where public files will be stored. This directory
  498. * must exist and be writable by Drupal. This directory must be relative to
  499. * the Drupal installation directory and be accessible over the web.
  500. */
  501. # $settings['file_public_path'] = 'sites/default/files';
  502. /**
  503. * Private file path:
  504. *
  505. * A local file system path where private files will be stored. This directory
  506. * must be absolute, outside of the Drupal installation directory and not
  507. * accessible over the web.
  508. *
  509. * Note: Caches need to be cleared when this value is changed to make the
  510. * private:// stream wrapper available to the system.
  511. *
  512. * See https://www.drupal.org/documentation/modules/file for more information
  513. * about securing private files.
  514. */
  515. # $settings['file_private_path'] = '';
  516. /**
  517. * Session write interval:
  518. *
  519. * Set the minimum interval between each session write to database.
  520. * For performance reasons it defaults to 180.
  521. */
  522. # $settings['session_write_interval'] = 180;
  523. /**
  524. * String overrides:
  525. *
  526. * To override specific strings on your site with or without enabling the Locale
  527. * module, add an entry to this list. This functionality allows you to change
  528. * a small number of your site's default English language interface strings.
  529. *
  530. * Remove the leading hash signs to enable.
  531. *
  532. * The "en" part of the variable name, is dynamic and can be any langcode of
  533. * any added language. (eg locale_custom_strings_de for german).
  534. */
  535. # $settings['locale_custom_strings_en'][''] = array(
  536. # 'forum' => 'Discussion board',
  537. # '@count min' => '@count minutes',
  538. # );
  539. /**
  540. * A custom theme for the offline page:
  541. *
  542. * This applies when the site is explicitly set to maintenance mode through the
  543. * administration page or when the database is inactive due to an error.
  544. * The template file should also be copied into the theme. It is located inside
  545. * 'core/modules/system/templates/maintenance-page.html.twig'.
  546. *
  547. * Note: This setting does not apply to installation and update pages.
  548. */
  549. # $settings['maintenance_theme'] = 'bartik';
  550. /**
  551. * PHP settings:
  552. *
  553. * To see what PHP settings are possible, including whether they can be set at
  554. * runtime (by using ini_set()), read the PHP documentation:
  555. * http://php.net/manual/ini.list.php
  556. * See \Drupal\Core\DrupalKernel::bootEnvironment() for required runtime
  557. * settings and the .htaccess file for non-runtime settings.
  558. * Settings defined there should not be duplicated here so as to avoid conflict
  559. * issues.
  560. */
  561. /**
  562. * If you encounter a situation where users post a large amount of text, and
  563. * the result is stripped out upon viewing but can still be edited, Drupal's
  564. * output filter may not have sufficient memory to process it. If you
  565. * experience this issue, you may wish to uncomment the following two lines
  566. * and increase the limits of these variables. For more information, see
  567. * http://php.net/manual/pcre.configuration.php.
  568. */
  569. # ini_set('pcre.backtrack_limit', 200000);
  570. # ini_set('pcre.recursion_limit', 200000);
  571. /**
  572. * Active configuration settings.
  573. *
  574. * By default, the active configuration is stored in the database in the
  575. * {config} table. To use a different storage mechanism for the active
  576. * configuration, do the following prior to installing:
  577. * - Create an "active" directory and declare its path in $config_directories
  578. * as explained under the 'Location of the site configuration files' section
  579. * above in this file. To enhance security, you can declare a path that is
  580. * outside your document root.
  581. * - Override the 'bootstrap_config_storage' setting here. It must be set to a
  582. * callable that returns an object that implements
  583. * \Drupal\Core\Config\StorageInterface.
  584. * - Override the service definition 'config.storage.active'. Put this
  585. * override in a services.yml file in the same directory as settings.php
  586. * (definitions in this file will override service definition defaults).
  587. */
  588. # $settings['bootstrap_config_storage'] = array('Drupal\Core\Config\BootstrapConfigStorageFactory', 'getFileStorage');
  589. /**
  590. * Configuration overrides.
  591. *
  592. * To globally override specific configuration values for this site,
  593. * set them here. You usually don't need to use this feature. This is
  594. * useful in a configuration file for a vhost or directory, rather than
  595. * the default settings.php.
  596. *
  597. * Note that any values you provide in these variable overrides will not be
  598. * viewable from the Drupal administration interface. The administration
  599. * interface displays the values stored in configuration so that you can stage
  600. * changes to other environments that don't have the overrides.
  601. *
  602. * There are particular configuration values that are risky to override. For
  603. * example, overriding the list of installed modules in 'core.extension' is not
  604. * supported as module install or uninstall has not occurred. Other examples
  605. * include field storage configuration, because it has effects on database
  606. * structure, and 'core.menu.static_menu_link_overrides' since this is cached in
  607. * a way that is not config override aware. Also, note that changing
  608. * configuration values in settings.php will not fire any of the configuration
  609. * change events.
  610. */
  611. # $config['system.site']['name'] = 'My Drupal site';
  612. # $config['system.theme']['default'] = 'stark';
  613. # $config['user.settings']['anonymous'] = 'Visitor';
  614. /**
  615. * Fast 404 pages:
  616. *
  617. * Drupal can generate fully themed 404 pages. However, some of these responses
  618. * are for images or other resource files that are not displayed to the user.
  619. * This can waste bandwidth, and also generate server load.
  620. *
  621. * The options below return a simple, fast 404 page for URLs matching a
  622. * specific pattern:
  623. * - $config['system.performance']['fast_404']['exclude_paths']: A regular
  624. * expression to match paths to exclude, such as images generated by image
  625. * styles, or dynamically-resized images. The default pattern provided below
  626. * also excludes the private file system. If you need to add more paths, you
  627. * can add '|path' to the expression.
  628. * - $config['system.performance']['fast_404']['paths']: A regular expression to
  629. * match paths that should return a simple 404 page, rather than the fully
  630. * themed 404 page. If you don't have any aliases ending in htm or html you
  631. * can add '|s?html?' to the expression.
  632. * - $config['system.performance']['fast_404']['html']: The html to return for
  633. * simple 404 pages.
  634. *
  635. * Remove the leading hash signs if you would like to alter this functionality.
  636. */
  637. # $config['system.performance']['fast_404']['exclude_paths'] = '/\/(?:styles)|(?:system\/files)\//';
  638. # $config['system.performance']['fast_404']['paths'] = '/\.(?:txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i';
  639. # $config['system.performance']['fast_404']['html'] = '<!DOCTYPE html><html><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>The requested URL "@path" was not found on this server.</p></body></html>';
  640. /**
  641. * Load services definition file.
  642. */
  643. $settings['container_yamls'][] = $app_root . '/' . $site_path . '/services.yml';
  644. /**
  645. * Override the default service container class.
  646. *
  647. * This is useful for example to trace the service container for performance
  648. * tracking purposes, for testing a service container with an error condition or
  649. * to test a service container that throws an exception.
  650. */
  651. # $settings['container_base_class'] = '\Drupal\Core\DependencyInjection\Container';
  652. /**
  653. * Override the default yaml parser class.
  654. *
  655. * Provide a fully qualified class name here if you would like to provide an
  656. * alternate implementation YAML parser. The class must implement the
  657. * \Drupal\Component\Serialization\SerializationInterface interface.
  658. */
  659. # $settings['yaml_parser_class'] = NULL;
  660. /**
  661. * Trusted host configuration.
  662. *
  663. * Drupal core can use the Symfony trusted host mechanism to prevent HTTP Host
  664. * header spoofing.
  665. *
  666. * To enable the trusted host mechanism, you enable your allowable hosts
  667. * in $settings['trusted_host_patterns']. This should be an array of regular
  668. * expression patterns, without delimiters, representing the hosts you would
  669. * like to allow.
  670. *
  671. * For example:
  672. * @code
  673. * $settings['trusted_host_patterns'] = array(
  674. * '^www\.example\.com$',
  675. * );
  676. * @endcode
  677. * will allow the site to only run from www.example.com.
  678. *
  679. * If you are running multisite, or if you are running your site from
  680. * different domain names (eg, you don't redirect http://www.example.com to
  681. * http://example.com), you should specify all of the host patterns that are
  682. * allowed by your site.
  683. *
  684. * For example:
  685. * @code
  686. * $settings['trusted_host_patterns'] = array(
  687. * '^example\.com$',
  688. * '^.+\.example\.com$',
  689. * '^example\.org$',
  690. * '^.+\.example\.org$',
  691. * );
  692. * @endcode
  693. * will allow the site to run off of all variants of example.com and
  694. * example.org, with all subdomains included.
  695. */
  696. /**
  697. * The default list of directories that will be ignored by Drupal's file API.
  698. *
  699. * By default ignore node_modules and bower_components folders to avoid issues
  700. * with common frontend tools and recursive scanning of directories looking for
  701. * extensions.
  702. *
  703. * @see file_scan_directory()
  704. * @see \Drupal\Core\Extension\ExtensionDiscovery::scanDirectory()
  705. */
  706. $settings['file_scan_ignore_directories'] = [
  707. 'node_modules',
  708. 'bower_components',
  709. ];
  710. /**
  711. * Load local development override configuration, if available.
  712. *
  713. * Use settings.local.php to override variables on secondary (staging,
  714. * development, etc) installations of this site. Typically used to disable
  715. * caching, JavaScript/CSS compression, re-routing of outgoing emails, and
  716. * other things that should not happen on development and testing sites.
  717. *
  718. * Keep this code block at the end of this file to take full effect.
  719. */
  720. #
  721. # if (file_exists($app_root . '/' . $site_path . '/settings.local.php')) {
  722. # include $app_root . '/' . $site_path . '/settings.local.php';
  723. # }