I wasted hours of searching Google back and forth, and found no solution: CiviCRM is set up as an internal only CRM system for an organisation (i.e. IP address - so far, so good. Now I took the server with me to work on CiviCRM, so I changed the IP address to accordingly.

I've changed Apaches httpd.conf, and Apache runs without issues. Drupal seems to come up fine, but whenever I want to access CiviCRM via the website answers with

a) the former IP address ( in the header of the result page,

b) "Access denied - you are not authorized to access this page."

I deleted the content of all drupal cache tables, I deleted the content of the "templates_c" directory - no success :-(

Please, can someone point me into the right direction?



  • 1
    Did you change the url (or IP in your case) in both the sites/default/civicrm.settings.php and settings.php files?
    – Paul-Tahoe
    Jan 22 '16 at 19:38
  • Yes, both $base_url (for Drupal) and CIVICRM_UF_BASEURL (for CiviCRM) point to ""
    – Cpt. Jumbo
    Jan 23 '16 at 15:45
  • Not to beat a dead horse, but if you haven't search through both those files for your old ip address, you should. It may appear other things like CIVICRM_TEMPLATE_COMPILEDIR and civicrm_root.
    – Paul-Tahoe
    Jan 23 '16 at 16:56
  • A work around might be to put a cheap router between your server and the work network. That way you can have the same IP address.
    – Paul-Tahoe
    Jan 23 '16 at 16:59
  • What you're trying to do isn't really isn't' much different from creating a test env minus the whole copying of db and code trees. There are lots of guides out there on all the things you need to do.
    – Paul-Tahoe
    Jan 23 '16 at 17:01

Setting up a new database isn't necessary. For folks who encounter similar issues in the future: after checking your BASE_URL setting in civicrm.settings.php, delete your templates_c folder (found here), clear all CiviCRM caches, and rebuild your menus. Details on the latter two items are available here.


The answer is hidden deep in the database. I tried to install Drupal again (just the program), and the same message came up. When I then created a new database, everything works as expected.

So be warned that you will need to setup a new database if you plan to move the server to a new location!

  • 1
    Did you try "Cleanup Caches" at civicrm/admin/setting/updateConfigBackend?reset=1 ? Apr 26 '16 at 2:50
  • 4
    "... you will need to setup a new database if you plan to move the server to a new location!" - That's definitively not true - we moved all our projects 3-4 dozen from one data center to another 2y ago and new IPs all around - not saying it's easy but it definitively takes some getting used to and practice moving Drupal/CiviCRM projects around. May 25 '16 at 23:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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