Answers.Body: <p>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.</p>
  <p>So just now, I again dropped all the civi tables from the WP db, <strong>renamed the civicrm folder</strong> within wp-content/uploads and again activated CiviCRM 5.57.2 which (finally) worked.</p>
  <p>Disabling WP_DEBUG now and getting on with my day. :)</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-02-02T17:03:42.440Z
Answers.LastActivityDate: 2023-02-02T17:03:42.440Z
Answers.UserDisplayName: Prónay
Body: <p>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 &quot;There has been a critical error on this website&quot; 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.)</p>
  <p>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.<em>2</em> 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.</p>
  <p>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.</p>
  <p>Closest thread I could find was <a href="https://civicrm.stackexchange.com/questions/40811/migrated-wp-site-critical-error">this one</a>, 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.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-02-01T04:00:15.383Z
Comments.Text: 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.
Comments.UserDisplayName: Prónay
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-02-01T08:48:56.033Z
Comments.Text: 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?
Comments.UserDisplayName: Aidan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-02-02T02:28:08.437Z
Comments.Text: 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.
Comments.UserDisplayName: Prónay
Tags: <wordpress><migration>
Title: Migrated WP site to new domain; activating Civi = critical error in WP
ThreadText: # Migrated WP site to new domain; activating Civi = critical error in WP
  
  (Asked by: username_0 on 2023-02-01)
  
  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](https://civicrm.stackexchange.com/questions/40811/migrated-wp-site-critical-error), 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.
  
  **Tags:** wordpress, migration
  
  > **Comments:**
  > **username_0**: 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.  
  > **username_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?  
  > **username_0**: Hi username_1. 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.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2023-02-02. Score: 1
  
  Enabling WP\_DEBUG was helpful (thanks username_1). 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. :)
  
  
  ---
  
  