0

Successfully migrated WP 6.1.1 site to a new domain. Same a2 hosting environment, different shared hosting account and different domain. WordPress migration went without a hitch. But CiviCRM 5.57.1 (which worked fine on the original site) caused WP to spit out "There has been a critical error on this website" every time Civi was activated. Soon as I change the civicrm folder name in plugins, Civi is deactivated and WP works again. (Can easily reproduce this part.)

Same thing happens when all other WP plugins are disabled. Decided to try a fresh start, so backed up the Civi database before dropping all Civi tables from our WP database. Then uploaded and expanded a new copy of 5.57.2 and tried to do a clean install. Same result. Attempting to activate the new CiviCRM instantly throws a critical error, and WP is dead until civicrm folder gets renamed yet again.

Running php 8.1 -- haven't tried changing php version yet. It's moot given that 7.4 seems to be on its deathbed. Tried changing themes to 2023, but no luck.

Closest thread I could find was this one, but it didn't entail a fresh install with no Civi tables in the db. So I'm hoping one of the devs might nudge me toward some productive troubleshooting. When something changes, I'll come back and report. And when this is fixed, I'll describe the solution in detail so others can learn something from my comedy of errors, or at least enjoy a laugh at my expense.

3
  • All server requirements noted in the WP installation document appear to be met. And no obvious configuration differences between the a2 shared hosting server where Civi was working and the a2 shared hosting server where it breaks WordPress.
    – Prónay
    Feb 1, 2023 at 4:00
  • 1
    Is there anything in the CiviCRM log? Do you get any mails to the WP admin address? Have you tried enabling WP_DEBUG? Is Civi in the same db as WP or separate? Have you updated CIVICRM_DSN, CIVICRM_UF_DSN and paths, urls in civicrm.settings.php?
    – Aidan
    Feb 1, 2023 at 8:48
  • Hi Aidan. No CiviCRM log, as Civi installation never got beyond the plugin activation. No emails went to the WP admin despite the error message telling me to check that inbox. Haven't enabled WP_DEBUG yet -- planning to do so when returning to active troubleshooting on Sunday. Civi tables and WP tables were part of the same db on original site, but as noted, no Civi tables appeared after these clean install attempts. And of course, no paths/urls to update as we still don't have Civi installed.
    – Prónay
    Feb 2, 2023 at 2:28

1 Answer 1

1

Enabling WP_DEBUG was helpful (thanks Aidan). Looks like there was something in the wp-content/uploads/civicrm folder that caused a fatal error whenever I tried to activate Civi within wp-admin/plugins.php ... though I'd ferreted out and replaced all outdated instances of the original domain within uploads/civicrm, the fatal error persisted.

So just now, I again dropped all the civi tables from the WP db, renamed the civicrm folder within wp-content/uploads and again activated CiviCRM 5.57.2 which (finally) worked.

Disabling WP_DEBUG now and getting on with my day. :)

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.