Answers.Body: <p>Need to recreate your civicrm.settings.php file - or at least check the DB settings in there. </p>
  
  <p>It's typically created upon install and located in wp-content/plugins/civicrm/civicrm.settings.php </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-17T23:05:26.427Z
Answers.Text: Where is this located?
Answers.UserDisplayName: Jamie Fraser
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-17T23:07:08.920Z
Answers.Text: Updated answer :)
Answers.UserDisplayName: JohnFF
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-17T23:08:49.247Z
Answers.Text: And if its not there... :(
Answers.UserDisplayName: Jamie Fraser
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-17T23:42:10.533Z
Answers.Text: Then run the installer again :) Follow the instructions on installing CiviCRM on WordPress
Answers.UserDisplayName: JohnFF
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-18T15:13:53.810Z
Answers.Text: If it's Civi 4.7.n on WP single instance, then civicrm.settings.php will be in `wp-content/uploads/civicrm`.
Answers.UserDisplayName: Christian Wach
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-18T17:36:02.190Z
Answers.Text: Thanks @ChristianWach that was ideal and fixed the issue!
Answers.UserDisplayName: Jamie Fraser
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-17T22:59:16.763Z
Answers.LastActivityDate: 2016-03-17T23:06:59.060Z
Answers.LastEditDate: 2016-03-17T23:06:59.060Z
Answers.UserDisplayName: JohnFF
Body: <p>Anyone have any idea how I can fix this?
  Just done install and CiviCRM did not load (all OK on wizard) then nothing.
  Removed CiviCRM from the WordPress install and uploaded again (also removed database) but error below appeared.</p>
  
  <p>Have I missed something?</p>
  
  <p>Initialization Error</p>
  
  <p>Array
  (
      [callback] => Array
          (
              [0] => CRM_Core_Error
              [1] => simpleHandler
          )</p>
  
  <pre><code>[code] =&gt; -24
  [message] =&gt; DB Error: connect failed
  [mode] =&gt; 16
  [debug_info] =&gt;  [nativecode=php_network_getaddresses: getaddrinfo failed: Name or service not known]
  [type] =&gt; DB_Error
  [user_info] =&gt;  [nativecode=php_network_getaddresses: getaddrinfo failed: Name or service not known]
  [to_string] =&gt; [db_error: message="DB Error: connect failed" code=-24 mode=callback callback=CRM_Core_Error::simpleHandler prefix="" info=" [nativecode=php_network_getaddresses: getaddrinfo failed: Name or service not known]"]
  </code></pre>
  
  <p>)</p>
  
Tags: <wordpress><database><error>
Title: DB Error: connect failed (code 24)
ThreadText: # DB Error: connect failed (code 24)
  
  (Asked by: username_0 on 2016-03-17)
  
  Anyone have any idea how I can fix this?
  Just done install and CiviCRM did not load (all OK on wizard) then nothing.
  Removed CiviCRM from the WordPress install and uploaded again (also removed database) but error below appeared.
  
  Have I missed something?
  
  Initialization Error
  
  Array
  (
  [callback] => Array
  (
  [0] => CRM\_Core\_Error
  [1] => simpleHandler
  )
  
  ```
  [code] => -24
  [message] => DB Error: connect failed
  [mode] => 16
  [debug_info] =>  [nativecode=php_network_getaddresses: getaddrinfo failed: Name or service not known]
  [type] => DB_Error
  [user_info] =>  [nativecode=php_network_getaddresses: getaddrinfo failed: Name or service not known]
  [to_string] => [db_error: message="DB Error: connect failed" code=-24 mode=callback callback=CRM_Core_Error::simpleHandler prefix="" info=" [nativecode=php_network_getaddresses: getaddrinfo failed: Name or service not known]"]
  
  ```
  
  )
  
  **Tags:** wordpress, database, error
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-03-17. Score: 2 | Accepted answer
  
  Need to recreate your civicrm.settings.php file - or at least check the DB settings in there.
  
  It's typically created upon install and located in wp-content/plugins/civicrm/civicrm.settings.php
  
  > **Comments:**
  > **username_0**: Where is this located?  
  > **username_1**: Updated answer :)  
  > **username_0**: And if its not there... :(  
  > **username_1**: Then run the installer again :) Follow the instructions on installing CiviCRM on WordPress  
  > **username_2**: If it's Civi 4.7.n on WP single instance, then civicrm.settings.php will be in `wp-content/uploads/civicrm`.  
  > **username_0**: Thanks @username_2 that was ideal and fixed the issue!  
  
  ---
  
  