0

I am attempting to install CiviCRM 5.33.1 on a fresh WordPress 5.6 install. Installation and activation go fine, and I get to the installer page at /wp-admin/options-general.php?page=civicrm-install.

The reason for this new install is that we need to partition CiviCRM to a subdomain on the same shared server as our main site. So I edited the CiviCRM Database setting to use the same DSN as is in our current civicrm.settings.php file, which looks like this:

mysql://[DB user]:[password]]@[server]:[port]/[DB name]

(The CiviCRM database is separate from the main WordPress database on our main site.)

Then I click Apply. The page redirects to /wp-admin/admin.php?page-CiviCRM&q-cificrm&reset=1, which has the title CiviCRM Installed, but then immediately displays the message Sorry, you are not allowed to access this page. That sounds like a permissions problem, but CiviCRM, nor the civicrm folder in wp-content/uploads, isn't installed, contrary to the title of the page.

I can't imagine that it's a problem with the Civi DB DSN, since I copied it directly from the current installation. Or could it be? But how can I figure out what the problem is?

Thanks!

1

I think you need to add an extra step or two. See https://docs.civicrm.org/sysadmin/en/latest/misc/switch-servers/ for more details

  • Deactivate old version and backup a copy of the CiviCRM database from the old install

  • Do your install in the new location and then activate with a new (empty database)

  • Rename the old Civi database as temp, restore the old database, rename the restored database as the new Civi database (and set up user as it was before).

  • Rename temp back to old Civi Database and reactivate old install so that it continues to work.

  • If you have changed to a subdomain you may need to edit some other resource settings.

I think the reason you need to take this approach is because of the settings stored in the database. I did quite a lot of trial and error to work it out in my environment (some odd things happened with my hosted server and subdomains.

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.