Earlier today I did a backup and restore on a Wordpress website. After the restore was successful, I noticed I could no longer access or edit my posts/pages in the Wordpress Dashboard. And I noticed CiviCRM throwing this error:

Initialization Error

[callback] => Array
[0] => CRM_Core_Error
[1] => simpleHandler

[code] => -24
[message] => DB Error: connect failed
[mode] => 16
[debug_info] => [nativecode=Access denied for user 'user'@'localhost' (using password: YES)]
[type] => DB_Error
[user_info] => [nativecode=Access denied for user 'user'@'localhost' (using password: YES)]
[to_string] => [db_error: message="DB Error: connect failed" code=-24 mode=callback callback=CRM_Core_Error::simpleHandler prefix="" info=" [nativecode=Access denied for user 'user'@'localhost' (using password: YES)]"]

I've since tried reverting to the website instance that existed prior to the restore, when Civi was still working perfectly, and the same error still exists. I've disabled Civi and have regained the ability to edit posts/pages, but Civi remains broken.

1 Answer 1


The failure you're seeing is because the MySQL credentials are no good. These are set in the civicrm.settings.php file. Did you possibly restore a backup that didn't include the civicrm.settings.php file that was in place when it was working?

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.