1. 8.5.x core/includes/bootstrap.inc DRUPAL_ROOT
  2. 8.0.x core/includes/bootstrap.inc DRUPAL_ROOT
  3. 8.1.x core/includes/bootstrap.inc DRUPAL_ROOT
  4. 8.2.x core/includes/bootstrap.inc DRUPAL_ROOT
  5. 8.3.x core/includes/bootstrap.inc DRUPAL_ROOT
  6. 8.4.x core/includes/bootstrap.inc DRUPAL_ROOT
  7. 8.6.x core/includes/bootstrap.inc DRUPAL_ROOT
  8. 7.x modules/statistics/statistics.php DRUPAL_ROOT
  9. 7.x modules/simpletest/tests/https.php DRUPAL_ROOT
  10. 7.x cron.php DRUPAL_ROOT
  11. 7.x authorize.php DRUPAL_ROOT
  12. 7.x index.php DRUPAL_ROOT
  13. 7.x xmlrpc.php DRUPAL_ROOT
  14. 7.x modules/simpletest/tests/http.php DRUPAL_ROOT
  15. 7.x update.php DRUPAL_ROOT
  16. 7.x install.php DRUPAL_ROOT

Defines the root directory of the Drupal installation.

146 uses of DRUPAL_ROOT
aggregator_test_feed in modules/aggregator/tests/aggregator_test.module
Page callback. Generates a test feed and simulates last-modified and etags.
authorize.php in ./authorize.php
Administrative script for running authorized file operations.
authorize_get_filetransfer in includes/authorize.inc
Gets a FileTransfer class for a specific transfer method and settings.
authorize_run_operation in includes/authorize.inc
Runs the operation specified in $_SESSION['authorize_operation'].
BatchPercentagesUnitTestCase::setUp in modules/simpletest/tests/batch.test
Sets up unit test environment.

... See full list


./install.php, line 11
Initiates a browser-based installation of Drupal.


define('DRUPAL_ROOT', getcwd());


dimsh’s picture

what about

define('DRUPAL_ROOT', dirname(__FILE__));


getcwd() !!, it looks like it relays on the directory set by the web server, well, Apache will do it, will all other do?

thedavidmeister’s picture

Please open an issue against core if you want to suggest/request changes. Nothing in the the API docs discussion threads will be directly actioned.