I am updating CiviCRM from 4.7.27 to 4.7.31 on WordPress 4.9.4. Other than CiviCRM, everything is up to date.

I've thoroughly Googled the problem, and have tried three times to do the update. But the "Your database has already been upgraded to CiviCRM 4.7.27" problem persists. I've followed the relevant portions of Upgrading CiviCRM for WordPress for current versions of WordPress and CiviCRM.

In particular, in response to problems other people have had, I've:

  • Completely deleted my /wp-content/plugins/civicrm folder via FTP (I didn't just rename it).
  • Downloaded a fresh copy of CiviCRM 4.7.31, unzipped it locally, and uploaded the civicrm folder to /wp-content/plugins. I confirmed that the remote copy of civicrm.php references version 4.7.31 in the header.
  • Deleted the files in /wp-content/uploads/civicrm/templates_c.
  • Cleared the browser cache (I'm using Chrome).
  • Searched the site files for a rogue civicrm plugin directory. There is none.

All of this in addition to all the other relevant steps in the Upgrading wiki article. (We're not using localization files.)

Nothing works, and I continue to be haunted by "Your database has already been upgraded to CiviCRM 4.7.27" when I run the upgrade script.

What could I be missing? What is causing the problem?


  • Digging into the upgrade code and database, the civicrm-version.php file has the 'version' element of the array set to '4.7.31'. And the version field of the only row in the civicrm_domain table is currently '4.7.27'. Those appear to be the source values used by the getUpgradeVersions() function to check whether to upgrade. But I'm not seeing how those two values could be the same in order to get the error message that the system is already at version 4.7.27.. Commented Mar 30, 2018 at 1:29
  • Can you check civicrm.settings.php to get exact path of civicrm folder Commented Mar 30, 2018 at 16:35
  • Here's the definition of $civicrm_root: $civicrm_root = '/home/<domain>/<domain>/wp-content/plugins/civicrm/civicrm/'; I think that is correct, and the path to templates_c is as well. Commented Mar 30, 2018 at 18:33
  • Is it possible you have a renamed folder with the old codebase in your directories somewhere?
    – petednz - fuzion
    Commented Apr 3, 2018 at 19:15
  • @petednz - Thanks, but no. See my answer below. Commented Apr 4, 2018 at 21:27

1 Answer 1


Huge thanks to @PradeepNayak for your help! The problem wasn't with the paths in civicrm.settings.php, but that suggestion led us to look at our configuration. Turns out that we had some confusion between a development and staging server, so were, in fact, not updating the right instance. In essence, the version number from the database was right, but it was looking in the wrong place for the files version.

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.