running CiviCRM WordPress 4.7.7

Any ideas what normalize your directory structure means?

Given it knows where the database is and both the website and the backend are working I am unsure where this is coming from. It only appears in the error_log.

[error] [client] PHP Fatal error:
Uncaught exception 'Exception' with message 'Failed to locate civicrm.settings.php. Please boot with settingsFile, search, or CIVICRM_SETTINGS; or normalize your directory structure.' in /../wp-content/plugins/civicrm/civicrm/civicrm.config.php:125

Stack trace:

  1. /../wp-content/plugins/civicrm/civicrm/civicrm.config.php(413): Civi\Cv\Bootstrap->boot()
  2. /../wp-content/plugins/civicrm/civicrm/extern/open.php(2): require_once('/var/www/vhosts...')
  3. {main}\n thrown in /../wp-content/plugins/civicrm/civicrm/civicrm.config.php on line 125

Update 1: civicrm_config.php - getCivicrmSettingsPhp Added error_log to display the options parameter and got the following:

[dynamicSettingsFile] => /../wp-content/plugins/civicrm/settings_location.php\n
[prefetch] => 1\n
[settingsFile] => \n
[search] => 1\n
[cmsType] => \n
[httpHost] => casem-acmse.org\n)\n

Shouldn't the file referred to in dynamicSettingsFile be civicrm_settings.php?

  • This is still occurring in 4.7.11
    – Codedogs
    Sep 10, 2016 at 1:50

3 Answers 3


This is related to Word Press Install Missing civicrm.settings.php; dashboard unavailable; no menus

I suspect that the culprit is the userFrameworkResourceURL I would tray the overrides mentioned in the above thread

  • I added an update to my original post. Shouldn't the file referred to in dynamicSettingsFile be civicrm_settings.php? I was under the impression settings_location.php was deprecated prior to 4.4.4
    – Codedogs
    Jun 3, 2016 at 3:11

I was having the same error message. Using Codedogs' change didn't work for me, not sure why. In my case, I simply hardcoded the 'settingsFile' as follows:

'settingsFile' => /home/user/domains/domain.com/public_html/wp-content/uploads/civicrm/civicrm.settings.php',

Hope this helps someone!

  • Thanks for your answer. Could you edit this to make it clear which file you edited? That will help future visitors to this post. Jul 27, 2016 at 8:14
  • The reason it did not work is that your civicrm.settings.php file is located in the uploads folder. Mine is located in the plugins/civicrm folder which is what dirname(__DIR__) evaluates to.
    – Codedogs
    Jul 28, 2016 at 14:03

The following edit corrects the problem: /../wp-content/plugins/civicrm/civicrm_config.php

 public static function singleton() {
    if (self::$singleton === NULL) {
      self::$singleton = new Bootstrap(array(
        'dynamicSettingsFile' => dirname(__DIR__) . '/settings_location.php',
        'env' => 'CIVICRM_SETTINGS',
        'prefetch' => TRUE,
        'settingsFile' => dirname(__DIR__) . '/civicrm.settings.php', <=== CHANGE THIS LINE
        'search' => TRUE,
        'cmsType' => NULL,
        'httpHost' => array_key_exists('HTTP_HOST', $_SERVER) ? $_SERVER['HTTP_HOST'] : '',
    return self::$singleton;
  • This error still occurs in 4.7.10. I had to propagate the above fix to make CRON not run go away.
    – Codedogs
    Aug 17, 2016 at 19:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.