0

I'm having trouble moving a Wordpress/CiviCRM install to a subdomain: from domain-name.com to sub.domain-name.com. What follows is the procedure I'm using (culled from forum articles Wordpress, and CiviCRM docs)--please advise where I'm going wrong. Any help would be greatly appreciated.

P.S. there are many permutations of the following steps and I've tried many of them. I do know that using PHPMyAdmin to export/import is not advised because Foreign Keys data is lost.

I dumped the original CiviCRM 4.6.9 database using SSH:

mysqldump --no-create-db=true -h db111111111.db.1and1.com -udbo111111111 -pPassword db111111111 > exportedDatabases/db111111111.sql

I also dumped the original CiviCRM 4.6.9 without the domain and cache tables:

mysqldump -h db111111111.db.1and1.com -udbo111111111 -pPassword --no-create-db=true --ignore-table=db111111111.civicrm_domain --ignore-table=db111111111.civicrm_acl_cache --ignore-table=db111111111.civicrm_acl_contact_cache --ignore-table=db111111111.civicrm_cache --ignore-table=db111111111.civicrm_group_contact_cache db111111111 > exportedDatabases/db111111111-nocache.sql

I created a fresh WP site at sub.domain-name.com using same username and password as original.

I used PHPMyAdmin to create a fresh database db999999999 with the same password as db111111111.

I created a fresh install of CiviCRM 4.6.9 closely following CiviCRM install procedure for Wordpress and using db999999999:

http://wiki.civicrm.org/confluence/display/CRMDOC/Installing+CiviCRM+for+WordPress

The new CiviCRM 4.6.9 functions.

I uninstalled the native modules to match the original install.

I deactivated the new CiviCRM 4.6.9 plugin.

I dumped the new CiviCRM 4.6.9 db999999999 using SSH:

mysqldump --no-create-db=true -h db999999999.db.1and1.com -udbo999999999 -pPassword db999999999 > exportedDatabases/db999999999.sql

I also dumped the new CiviCRM 4.6.9 domain and cache tables:

mysqldump --no-create-db=true -h db999999999.db.1and1.com -udbo999999999 -pPassword db999999999 civicrm_domain civicrm_acl_cache civicrm_acl_contact_cache civicrm_cache civicrm_group_contact_cache > exportedDatabases/db999999999-5TABLES.sql

I used PHPMyAdmin to DROP all tables in db999999999.

I re-imported db999999999-5TABLES.sql into db999999999 using:

mysql -h db999999999.db.1and1.com -udbo999999999 -pPassword db999999999 < exportedDatabases/db999999999-5TABLES.sql

I used a text editor to modify all instances of '111111111' to '999999999' in db111111111-nocache.sql

I imported db111111111-nocache.sql into db999999999 using:

mysql -h db999999999.db.1and1.com -udbo999999999 -pPassword db999999999 < exportedDatabases/db111111111-nocache.sql

I deleted all files/folders in .../templates_c/*

There were no error messages until I (re)activated the CiviCRM 4.6.9 plugin when I get the cryptic error:

"DB Error: no such field"

Running the following did not change anything:

sub.domain-name.com/wp-admin/admin.php?page=CiviCRM&q=civicrm/admin/setting/updateConfigBackend&reset=1

sub.domain-name.com/wp-admin/admin.php?page=CiviCRM&q=civicrm/admin/setting/path?reset=1

sub.domain-name.com/wp-admin/admin.php?page=CiviCRM&q=civicrm/menu/rebuild&reset=1

Any help would be greatly appreciated.

1

The instructions for moving an installation should work even though you are only changing the base_url: see http://wiki.civicrm.org/confluence/display/CRMDOC/Moving+an+Existing+Installation+to+a+New+Server+or+Location.

We tend to truncate tables rather than exclude on backup and migrate so that the structure is migrated.

You may be able to check the mysql log (see my.cnf for its location) for the specific table.field that is missing, if you want to try to fix the database you are currently working on. Wild guess: it is custom field, which are stored in the civicrm_value* tables, and defined in the civicrm_custom_field and civicrm_custom_group tables.

  • Thanks Joe, but given my limited skill-set (no MySQL and no PHP experience) and the time I've spent on this already (I've already gone through your link and many others with a fine-tooth comb), I think I'm better off spending the next 80 hours re-importing the raw csv data (from BCM) and fudging the lost relationship histories with dummy mailings :( I'm afraid that CiviCRM is too fragile and finniky for our purposes and that ultimately, I'll look for a more robust, friendlier, and better supported solution. – Chris Nov 21 '15 at 20:56
0

The Wiki page http://wiki.civicrm.org/confluence/display/CRMDOC/Moving+an+Existing+Installation+to+a+New+Server+or+Location is tried and true--we have migrated many sites using this.

You can also use phpMyAdmin to export/import--it preserves all foreign key and index data of course--your claim otherwise is a mistaken.

Your error of a missing field often means the CiviCRM version differs--try running the upgrader on your migrated site.

You can also consider hiring a consultant for this one-time job.

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.