I have been attempting to move a civi install to a new site with little success. I know I have managed this before with another site, so I am especially mystified.

I have reviewed the the guide at https://docs.civicrm.org/sysadmin/en/latest/misc/switch-servers/ trying both to move civi with the files and just putting the old database into the new installation. Before I started, I upgraded the Civi installation on the old server to 5.27.4. It seemed to go fine and I can use that version fine.

Both sites are using wordpress 5.4.2–en_CA, PHP 7.3.x, MariaDB, but with a minor version difference. Since I am not getting DB errors, but Class errors, I have not dwelt on the slight db version difference and the db import was entirely error-free every time.

Whether I do a fresh install of Civi and migrate all the tables except the caches or do the full move, the result is the same: a non-working site with the following errors in the apache error log:

[Tue Aug 04 21:54:58.923728 2020] [php7:error] [pid 26708] [client] PHP Fatal error:  Uncaught Error: Call to undefined function set_current_screen() in /var/www/longboatroadrunners.com/wordpress/wp-admin/admin-header.php:31\nStack trace:\n#0 /var/www/longboatroadrunners.com/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/Base.php(273): require_once()\n#1 /var/www/longboatroadrunners.com/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Utils/System.php(200): CRM_Utils_System_Base->theme('<div id="crm-co...', false, false)\n#2 /var/www/longboatroadrunners.com/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(209): CRM_Utils_System::theme('<div id="crm-co...')\n#3 /var/www/longboatroadrunners.com/wordpress/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(922): CRM_Core_Error::handle(Object(DB_Error))\n#4 /var/www/longboatroadrunners.com/wordpress/wp-content/plugins/civicrm/civicrm/packages/DB.php(997): PEAR_Error->__construct('DB Error: unkno...', -1, 16, Array, 'INSERT INTO `ci...')\n#5 /var/www/longboatroadrunners.com/wordpress/wp-content/plugi in /var/www/longboatroadrunners.com/wordpress/wp-admin/admin-header.php on line 31, referer: https://new.longboatroadrunners.com/wp-login.php?redirect_to=https%3A%2F%2Flongboatroadrunners.com%2Fwp-admin%2Fadmin.php%3Fpage%3DCiviCRM&reauth=1
[Tue Aug 04 21:55:06.458222 2020] [php7:error] [pid 25884] [client] PHP Fatal error:  Uncaught CRM_Core_Exception: [0: Transaction integrity error: Expected to find active frame\n\n  thrown in /var/www/longboatroadrunners.com/wordpress/wp-content/plugins/civicrm/civicrm/Civi/Core/Transaction/Manager.php on line 93

Because it's a staging site, the url is slightly different, but I not only tried to compensate for that by editing civicrm.settings.php, I also tried the process from scratch, preserving the original site url and path to see if I just missed something. The result was the same, though it may be that there is still something I am missing.

UPDATE: I did not find an answer. I suspect that although I worked hard to find all the instances of settings that referenced the database, user, password and path and change them to match the new environment, I was still missing something. In the end, I was able to move on by changing the db user, db name, password and all the file paths to match the old site. I should add that symlinks were not good enough. They did work well enough to get me a basic load, but most URLS were wrong because CiviCRM couldn't figure things out with the symlinks and repeated the entire symlink pointer which obviously wasn't going to work in a URL.

I really, really wish there was a way to export and then import all the data into a new CiviCRM site and leave the old site config behind. Maybe I'll take a look at the problem myself at some point. For now, I am too unclear about exactly how things are divided in the tables to have a clear sense of how that might be accomplished.

  • might be worth checking the definers on any triggers/procedures that got copied over if the mariadb user is different? – Parvez Saleh Aug 5 at 9:04
  • That error includes DB Error: unkno...', -1, 16, Array, 'INSERT INTO ci...'` If you can get more detail of that error it would give some clues. – Aidan Aug 6 at 17:41

Your Answer

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

Browse other questions tagged or ask your own question.