Answers.Body: <p>Have managed to upgrade to 4.6.9 now. For anyone else who might be doing this perhaps these steps might help:</p>
  
  <ol>
  <li>Ran the following. </li>
  </ol>
  
  <p>ALTER TABLE <code>civicrm_custom_field</code>
    ADD COLUMN <code>in_selector</code> tinyint(4) DEFAULT '0' COMMENT 'Should the multi-record custom field values be displayed in tab table listing';
  UPDATE civicrm_custom_field cf
    LEFT JOIN civicrm_custom_group cg
      ON cf.custom_group_id = cg.id
    SET cf.in_selector = 1
    WHERE cg.is_multiple = 1 AND cf.html_type != 'TextArea';
  ALTER TABLE <code>civicrm_custom_group</code>
   CHANGE COLUMN <code>style</code> <code>style</code> varchar(15) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Visual relationship between this form and its parent.';</p>
  
  <ol start="2">
  <li>*** Above good and restarted upgrade, it did things and then stopped with following error:
  Error: Upgrade DB to 4.5.alpha1: SQL]
  Error Field Error Value
  Type    DB_Error
  Code    -1
  Message DB Error: unknown error
  Mode    16
  UserInfo    ALTER TABLE <code>civicrm_custom_field</code> ADD COLUMN <code>in_selector</code> tinyint(4) DEFAULT '0' COMMENT 'Should the multi-record custom field values be displayed in tab table listing' [nativecode=1060 ** Duplicate column name 'in_selector']
  DebugInfo   ALTER TABLE <code>civicrm_custom_field</code> ADD COLUMN <code>in_selector</code> tinyint(4) DEFAULT '0' COMMENT 'Should the multi-record custom field values be displayed in tab table listing' [nativecode=1060 ** Duplicate column name 'in_selector']</li>
  </ol>
  
  <p>Commented out code look for CRM-13992 in file /wp-content/plugins/civicrm/civicrm/CRM/Upgrade/Incremental/sql/4.5.alpha1.mysql.tpl</p>
  
  <ol start="3">
  <li><p>*** Restarted upgrade and got following error:
  Error: Upgrade DB to 4.5.alpha1: SQL]
  Error Field Error Value
  Type    DB_Error
  Code    -1
  Message DB Error: unknown error
  Mode    16
  UserInfo    ALTER TABLE <code>civicrm_contact</code> ADD COLUMN <code>formal_title</code> varchar(64) COMMENT 'Formal (academic or similar) title in front of name. (Prof., Dr. etc.)' AFTER <code>suffix_id</code> [nativecode=1060 ** Duplicate column name 'formal_title']
  DebugInfo   ALTER TABLE <code>civicrm_contact</code> ADD COLUMN <code>formal_title</code> varchar(64) COMMENT 'Formal (academic or similar) title in front of name. (Prof., Dr. etc.)' AFTER <code>suffix_id</code> [nativecode=1060 ** Duplicate column name 'formal_title']</p></li>
  <li><p><strong>* Commented out code and restarted upgrade. Failed a couple of times with duplicates or column not available (previously dropped) so just took this code out of the SQL and restarted upgrade.
  *</strong> It continued upgrading until the following error was encountered</p></li>
  </ol>
  
  <p>Error: Upgrade DB to 4.6.alpha7]
  Error Field Error Value
  Type    DB_Error
  Code    -1
  Message DB Error: unknown error
  Mode    16
  UserInfo    ALTER TABLE civicrm_mailing_abtest ADD COLUMN <code>created_id</code> int unsigned COMMENT 'FK to Contact ID', ADD COLUMN <code>created_date</code> datetime COMMENT 'When was this item created', ADD COLUMN <code>testing_criteria</code> varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, ADD COLUMN <code>winner_criteria</code> varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, ADD CONSTRAINT FK_civicrm_mailing_abtest_created_id FOREIGN KEY (<code>created_id</code>) REFERENCES <code>civicrm_contact</code>(<code>id</code>) ON DELETE SET NULL [nativecode=1060 ** Duplicate column name 'created_id']
  DebugInfo   ALTER TABLE civicrm_mailing_abtest ADD COLUMN <code>created_id</code> int unsigned COMMENT 'FK to Contact ID', ADD COLUMN <code>created_date</code> datetime COMMENT 'When was this item created', ADD COLUMN <code>testing_criteria</code> varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, ADD COLUMN <code>winner_criteria</code> varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, ADD CONSTRAINT FK_civicrm_mailing_abtest_created_id FOREIGN KEY (<code>created_id</code>) REFERENCES <code>civicrm_contact</code>(<code>id</code>) ON DELETE SET NULL [nativecode=1060 ** Duplicate column name 'created_id']</p>
  
  <p>*** File location for above error shown below:
  //wp-content/plugins/civicrm/civicrm/CRM/Upgrade/Incremental/sql/4.6.alpha7.mysql.tpl</p>
  
  <ol start="5">
  <li>Comment out all the code for above and restarted upgrade again.
  [Error: Upgrade DB to 4.6.alpha7]
  Error Field Error Value
  Type    DB_Error
  Code    -19
  Message DB Error: no such field
  Mode    16
  UserInfo    UPDATE civicrm_mailing_abtest SET testing_criteria = 'subject' WHERE testing_criteria_id = 1 [nativecode=1054 ** Unknown column 'testing_criteria_id' in 'where clause']
  DebugInfo   UPDATE civicrm_mailing_abtest SET testing_criteria = 'subject' WHERE testing_criteria_id = 1 [nativecode=1054 ** Unknown column 'testing_criteria_id' in 'where clause']</li>
  </ol>
  
  <p>Found code in upgrade directories and after careful checking commented out relevant pieces as already in place. Restarted and </p>
  
  <p><strong>* Worked and displayed successful upgrade to 4.6.9 screen.
  <em></strong> However, clicked on CiviCRM icon in Wordpress and it displayed an empty screen.
  <strong></em> Do the following:
  <em></strong> 1. Delete files with cached settings. In Wordpress as follows:
      /wp-content/plugins/files/civicrm/templates_c/</em>
      /wp-content/plugins/files/civicrm/ConfigAndLog/Config.IDS.ini</p>
  
  <p>*** 2. Enter the following URL in your browser to review and update directory paths and base URLs. See CiviCRM Menu: Administer >> System Settings >> Cleanup Caches and Update Paths
  (Reference: <a href="https://wiki.civicrm.org/confluence/display/CRMDOC/Moving+an+Existing+Installation+to+a+New+Server+or+Location" rel="nofollow">https://wiki.civicrm.org/confluence/display/CRMDOC/Moving+an+Existing+Installation+to+a+New+Server+or+Location</a>)
  For Wordpress sites: 
  http:///wp-admin/admin.php?page=CiviCRM&amp;q=civicrm/admin/setting/updateConfigBackend&amp;reset=1</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-16T07:33:15.273Z
Answers.LastActivityDate: 2016-08-16T07:33:15.273Z
Answers.UserDisplayName: Garry Hyman
Answers.Body: <p>I hope you have backups?</p>
  
  <p>It's often better to do such a big upgrade in parts.
  Go from 4.4.5 to 4.4.21.
  Then go to 4.6.20 (4.5 can be skipped, have done upgrades from 4.4 to 4.6 quite often).
  Then go to 4.7.10.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-14T09:46:20.257Z
Answers.Text: I would also recommend that you test your backups on a development server before upgrading the live site.
Answers.UserDisplayName: William Mortada
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-14T12:41:00.427Z
Answers.Text: Thanks  for tips. Yes restored from my backup twice now successfully. Did upgrade in dev server with success although I may have done an incremental upgrade a year or two back to the then current version. Might see if I can find the incremental versions and try and progress one by one. This is the first time in almost 5 years I have had an issue like this one.
Answers.UserDisplayName: Garry Hyman
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-14T05:47:12.297Z
Answers.LastActivityDate: 2016-08-14T05:47:12.297Z
Answers.UserDisplayName: Catorghans
Body: <p>CiviCRM Upgrade Wordpress 4.4.5 to 4.7.10 DB Error: no such field.</p>
  
  <p>Site shows at bottom of screens: Powered by CiviCRM 4.4.5</p>
  
  <p>Trying to upgrade to 4.7.10 and after pressing Upgrade button CiviCRM just hangs with no action. Log file found shows the errors below:</p>
  
  <pre><code>Aug 14 10:05:12  [info] $Fatal Error Details = Array
  (
      [callback] =&gt; Array
          (
              [0] =&gt; CRM_Core_Error
              [1] =&gt; handle
          )
  
      [code] =&gt; -19
      [message] =&gt; DB Error: no such field
      [mode] =&gt; 16
      [debug_info] =&gt; SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_field.label as civicrm_custom_field_label, civicrm_custom_field.column_name as civicrm_custom_field_column_name, civicrm_custom_field.data_type as civicrm_custom_field_data_type, civicrm_custom_field.html_type as civicrm_custom_field_html_type, civicrm_custom_field.default_value as civicrm_custom_field_default_value, civicrm_custom_field.attributes as civicrm_custom_field_attributes, civicrm_custom_field.is_required as civicrm_custom_field_is_required, civicrm_custom_field.is_view as civicrm_custom_field_is_view, civicrm_custom_field.help_pre as civicrm_custom_field_help_pre, civicrm_custom_field.help_post as civicrm_custom_field_help_post, civicrm_custom_field.options_per_line as civicrm_custom_field_options_per_line, civicrm_custom_field.start_date_years as civicrm_custom_field_start_date_years, civicrm_custom_field.end_date_years as civicrm_custom_field_end_date_years, civicrm_custom_field.date_format as civicrm_custom_field_date_format, civicrm_custom_field.time_format as civicrm_custom_field_time_format, civicrm_custom_field.option_group_id as civicrm_custom_field_option_group_id, civicrm_custom_field.in_selector as civicrm_custom_field_in_selector, civicrm_custom_group.id as civicrm_custom_group_id, civicrm_custom_group.name as civicrm_custom_group_name, civicrm_custom_group.table_name as civicrm_custom_group_table_name, civicrm_custom_group.title as civicrm_custom_group_title, civicrm_custom_group.help_pre as civicrm_custom_group_help_pre, civicrm_custom_group.help_post as civicrm_custom_group_help_post, civicrm_custom_group.collapse_display as civicrm_custom_group_collapse_display, civicrm_custom_group.style as civicrm_custom_group_style, civicrm_custom_group.is_multiple as civicrm_custom_group_is_multiple, civicrm_custom_group.extends as civicrm_custom_group_extends, civicrm_custom_group.extends_entity_column_id as civicrm_custom_group_extends_entity_column_id, civicrm_custom_group.extends_entity_column_value as civicrm_custom_group_extends_entity_column_value, civicrm_custom_group.max_multiple as civicrm_custom_group_max_multiple 
  FROM     civicrm_custom_group
  LEFT JOIN civicrm_custom_field ON (civicrm_custom_field.custom_group_id = civicrm_custom_group.id)
  
  WHERE civicrm_custom_group.is_active = 1
    AND civicrm_custom_field.is_active = 1
    AND civicrm_custom_group.extends IN ('Individual', 'Contact')
  AND civicrm_custom_group.extends_entity_column_value IS NULL AND  ( 1 )  
  ORDER BY civicrm_custom_group.weight,
           civicrm_custom_group.title,
           civicrm_custom_field.weight,
           civicrm_custom_field.label
   [nativecode=1054 ** Unknown column 'civicrm_custom_field.in_selector' in 'field list']
      [type] =&gt; DB_Error
      [user_info] =&gt; SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_field.label as civicrm_custom_field_label, civicrm_custom_field.column_name as civicrm_custom_field_column_name, civicrm_custom_field.data_type as civicrm_custom_field_data_type, civicrm_custom_field.html_type as civicrm_custom_field_html_type, civicrm_custom_field.default_value as civicrm_custom_field_default_value, civicrm_custom_field.attributes as civicrm_custom_field_attributes, civicrm_custom_field.is_required as civicrm_custom_field_is_required, civicrm_custom_field.is_view as civicrm_custom_field_is_view, civicrm_custom_field.help_pre as civicrm_custom_field_help_pre, civicrm_custom_field.help_post as civicrm_custom_field_help_post, civicrm_custom_field.options_per_line as civicrm_custom_field_options_per_line, civicrm_custom_field.start_date_years as civicrm_custom_field_start_date_years, civicrm_custom_field.end_date_years as civicrm_custom_field_end_date_years, civicrm_custom_field.date_format as civicrm_custom_field_date_format, civicrm_custom_field.time_format as civicrm_custom_field_time_format, civicrm_custom_field.option_group_id as civicrm_custom_field_option_group_id, civicrm_custom_field.in_selector as civicrm_custom_field_in_selector, civicrm_custom_group.id as civicrm_custom_group_id, civicrm_custom_group.name as civicrm_custom_group_name, civicrm_custom_group.table_name as civicrm_custom_group_table_name, civicrm_custom_group.title as civicrm_custom_group_title, civicrm_custom_group.help_pre as civicrm_custom_group_help_pre, civicrm_custom_group.help_post as civicrm_custom_group_help_post, civicrm_custom_group.collapse_display as civicrm_custom_group_collapse_display, civicrm_custom_group.style as civicrm_custom_group_style, civicrm_custom_group.is_multiple as civicrm_custom_group_is_multiple, civicrm_custom_group.extends as civicrm_custom_group_extends, civicrm_custom_group.extends_entity_column_id as civicrm_custom_group_extends_entity_column_id, civicrm_custom_group.extends_entity_column_value as civicrm_custom_group_extends_entity_column_value, civicrm_custom_group.max_multiple as civicrm_custom_group_max_multiple 
  FROM     civicrm_custom_group
  LEFT JOIN civicrm_custom_field ON (civicrm_custom_field.custom_group_id = civicrm_custom_group.id)
  
  WHERE civicrm_custom_group.is_active = 1
    AND civicrm_custom_field.is_active = 1
    AND civicrm_custom_group.extends IN ('Individual', 'Contact')
  AND civicrm_custom_group.extends_entity_column_value IS NULL AND  ( 1 )  
  ORDER BY civicrm_custom_group.weight,
           civicrm_custom_group.title,
           civicrm_custom_field.weight,
           civicrm_custom_field.label
   [nativecode=1054 ** Unknown column 'civicrm_custom_field.in_selector' in 'field list']
      [to_string] =&gt; [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_field.label as civicrm_custom_field_label, civicrm_custom_field.column_name as civicrm_custom_field_column_name, civicrm_custom_field.data_type as civicrm_custom_field_data_type, civicrm_custom_field.html_type as civicrm_custom_field_html_type, civicrm_custom_field.default_value as civicrm_custom_field_default_value, civicrm_custom_field.attributes as civicrm_custom_field_attributes, civicrm_custom_field.is_required as civicrm_custom_field_is_required, civicrm_custom_field.is_view as civicrm_custom_field_is_view, civicrm_custom_field.help_pre as civicrm_custom_field_help_pre, civicrm_custom_field.help_post as civicrm_custom_field_help_post, civicrm_custom_field.options_per_line as civicrm_custom_field_options_per_line, civicrm_custom_field.start_date_years as civicrm_custom_field_start_date_years, civicrm_custom_field.end_date_years as civicrm_custom_field_end_date_years, civicrm_custom_field.date_format as civicrm_custom_field_date_format, civicrm_custom_field.time_format as civicrm_custom_field_time_format, civicrm_custom_field.option_group_id as civicrm_custom_field_option_group_id, civicrm_custom_field.in_selector as civicrm_custom_field_in_selector, civicrm_custom_group.id as civicrm_custom_group_id, civicrm_custom_group.name as civicrm_custom_group_name, civicrm_custom_group.table_name as civicrm_custom_group_table_name, civicrm_custom_group.title as civicrm_custom_group_title, civicrm_custom_group.help_pre as civicrm_custom_group_help_pre, civicrm_custom_group.help_post as civicrm_custom_group_help_post, civicrm_custom_group.collapse_display as civicrm_custom_group_collapse_display, civicrm_custom_group.style as civicrm_custom_group_style, civicrm_custom_group.is_multiple as civicrm_custom_group_is_multiple, civicrm_custom_group.extends as civicrm_custom_group_extends, civicrm_custom_group.extends_entity_column_id as civicrm_custom_group_extends_entity_column_id, civicrm_custom_group.extends_entity_column_value as civicrm_custom_group_extends_entity_column_value, civicrm_custom_group.max_multiple as civicrm_custom_group_max_multiple 
  FROM     civicrm_custom_group
  LEFT JOIN civicrm_custom_field ON (civicrm_custom_field.custom_group_id = civicrm_custom_group.id)
  
  WHERE civicrm_custom_group.is_active = 1
    AND civicrm_custom_field.is_active = 1
    AND civicrm_custom_group.extends IN ('Individual', 'Contact')
  AND civicrm_custom_group.extends_entity_column_value IS NULL AND  ( 1 )  
  ORDER BY civicrm_custom_group.weight,
           civicrm_custom_group.title,
           civicrm_custom_field.weight,
           civicrm_custom_field.label
   [nativecode=1054 ** Unknown column 'civicrm_custom_field.in_selector' in 'field list']"]
  )
  
  Aug 14 10:05:12  [info] $backTrace = #0 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(227): CRM_Core_Error::backtrace("backTrace", TRUE)
  #1 [internal function](): CRM_Core_Error::handle(Object(DB_Error))
  #2 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(DB_Error))
  #3 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/packages/DB.php(976): PEAR_Error-&gt;PEAR_Error("DB Error: no such field", -19, 16, (Array:2), "SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_fie...")
  #4 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(564): DB_Error-&gt;DB_Error(-19, 16, (Array:2), "SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_fie...")
  #5 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1905): PEAR-&gt;raiseError(NULL, -19, NULL, NULL, "SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_fie...", "DB_Error", TRUE)
  #6 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/packages/DB/mysql.php(895): DB_common-&gt;raiseError(-19, NULL, NULL, NULL, "1054 ** Unknown column 'civicrm_custom_field.in_selector' in 'field list'")
  #7 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/packages/DB/mysql.php(328): DB_mysql-&gt;mysqlRaiseError()
  #8 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1216): DB_mysql-&gt;simpleQuery("SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_fie...")
  #9 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2438): DB_common-&gt;query("SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_fie...")
  #10 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(1627): DB_DataObject-&gt;_query("SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_fie...")
  #11 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(344): DB_DataObject-&gt;query("SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_fie...")
  #12 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(1265): CRM_Core_DAO-&gt;query("SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_fie...", TRUE)
  #13 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/CustomGroup.php(526): CRM_Core_DAO::executeQuery("SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_fie...", (Array:0))
  #14 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/CRM/Dedupe/Finder.php(285): CRM_Core_BAO_CustomGroup::getTree("Individual", NULL, NULL, -1)
  #15 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/UFMatch.php(208): CRM_Dedupe_Finder::formatParams((Array:2), "Individual")
  #16 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/UFMatch.php(118): CRM_Core_BAO_UFMatch::synchronizeUFMatch(Object(WP_User), 2, "garry.hyman@gmail.com", "WordPress", NULL, "Individual", FALSE)
  #17 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/includes/civicrm.users.php(177): CRM_Core_BAO_UFMatch::synchronize(Object(WP_User), TRUE, "WordPress", "Individual")
  #18 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm.php(1210): CiviCRM_For_WordPress_Users-&gt;sync_user(Object(WP_User))
  #19 [internal function](): CiviCRM_For_WordPress-&gt;invoke("")
  #20 /home/cremorne/www/www/prodwp/wp-includes/plugin.php(525): call_user_func_array((Array:2), (Array:1))
  #21 /home/cremorne/www/www/prodwp/wp-admin/admin.php(236): do_action("toplevel_page_CiviCRM")
  #22 {main}
  </code></pre>
  
  <p>Help Please?</p>
  
Tags: <wordpress><upgrade><database>
Title: CiviCRM Upgrade Wordpress 4.4.5 to 4.7.10 DB Error: no such field
ThreadText: # CiviCRM Upgrade Wordpress 4.4.5 to 4.7.10 DB Error: no such field
  
  (Asked by: username_0 on 2016-08-14)
  
  CiviCRM Upgrade Wordpress 4.4.5 to 4.7.10 DB Error: no such field.
  
  Site shows at bottom of screens: Powered by CiviCRM 4.4.5
  
  Trying to upgrade to 4.7.10 and after pressing Upgrade button CiviCRM just hangs with no action. Log file found shows the errors below:
  
  ```
  Aug 14 10:05:12  [info] $Fatal Error Details = Array
  (
      [callback] => Array
          (
              [0] => CRM_Core_Error
              [1] => handle
          )
  
      [code] => -19
      [message] => DB Error: no such field
      [mode] => 16
      [debug_info] => SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_field.label as civicrm_custom_field_label, civicrm_custom_field.column_name as civicrm_custom_field_column_name, civicrm_custom_field.data_type as civicrm_custom_field_data_type, civicrm_custom_field.html_type as civicrm_custom_field_html_type, civicrm_custom_field.default_value as civicrm_custom_field_default_value, civicrm_custom_field.attributes as civicrm_custom_field_attributes, civicrm_custom_field.is_required as civicrm_custom_field_is_required, civicrm_custom_field.is_view as civicrm_custom_field_is_view, civicrm_custom_field.help_pre as civicrm_custom_field_help_pre, civicrm_custom_field.help_post as civicrm_custom_field_help_post, civicrm_custom_field.options_per_line as civicrm_custom_field_options_per_line, civicrm_custom_field.start_date_years as civicrm_custom_field_start_date_years, civicrm_custom_field.end_date_years as civicrm_custom_field_end_date_years, civicrm_custom_field.date_format as civicrm_custom_field_date_format, civicrm_custom_field.time_format as civicrm_custom_field_time_format, civicrm_custom_field.option_group_id as civicrm_custom_field_option_group_id, civicrm_custom_field.in_selector as civicrm_custom_field_in_selector, civicrm_custom_group.id as civicrm_custom_group_id, civicrm_custom_group.name as civicrm_custom_group_name, civicrm_custom_group.table_name as civicrm_custom_group_table_name, civicrm_custom_group.title as civicrm_custom_group_title, civicrm_custom_group.help_pre as civicrm_custom_group_help_pre, civicrm_custom_group.help_post as civicrm_custom_group_help_post, civicrm_custom_group.collapse_display as civicrm_custom_group_collapse_display, civicrm_custom_group.style as civicrm_custom_group_style, civicrm_custom_group.is_multiple as civicrm_custom_group_is_multiple, civicrm_custom_group.extends as civicrm_custom_group_extends, civicrm_custom_group.extends_entity_column_id as civicrm_custom_group_extends_entity_column_id, civicrm_custom_group.extends_entity_column_value as civicrm_custom_group_extends_entity_column_value, civicrm_custom_group.max_multiple as civicrm_custom_group_max_multiple 
  FROM     civicrm_custom_group
  LEFT JOIN civicrm_custom_field ON (civicrm_custom_field.custom_group_id = civicrm_custom_group.id)
  
  WHERE civicrm_custom_group.is_active = 1
    AND civicrm_custom_field.is_active = 1
    AND civicrm_custom_group.extends IN ('Individual', 'Contact')
  AND civicrm_custom_group.extends_entity_column_value IS NULL AND  ( 1 )  
  ORDER BY civicrm_custom_group.weight,
           civicrm_custom_group.title,
           civicrm_custom_field.weight,
           civicrm_custom_field.label
   [nativecode=1054 ** Unknown column 'civicrm_custom_field.in_selector' in 'field list']
      [type] => DB_Error
      [user_info] => SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_field.label as civicrm_custom_field_label, civicrm_custom_field.column_name as civicrm_custom_field_column_name, civicrm_custom_field.data_type as civicrm_custom_field_data_type, civicrm_custom_field.html_type as civicrm_custom_field_html_type, civicrm_custom_field.default_value as civicrm_custom_field_default_value, civicrm_custom_field.attributes as civicrm_custom_field_attributes, civicrm_custom_field.is_required as civicrm_custom_field_is_required, civicrm_custom_field.is_view as civicrm_custom_field_is_view, civicrm_custom_field.help_pre as civicrm_custom_field_help_pre, civicrm_custom_field.help_post as civicrm_custom_field_help_post, civicrm_custom_field.options_per_line as civicrm_custom_field_options_per_line, civicrm_custom_field.start_date_years as civicrm_custom_field_start_date_years, civicrm_custom_field.end_date_years as civicrm_custom_field_end_date_years, civicrm_custom_field.date_format as civicrm_custom_field_date_format, civicrm_custom_field.time_format as civicrm_custom_field_time_format, civicrm_custom_field.option_group_id as civicrm_custom_field_option_group_id, civicrm_custom_field.in_selector as civicrm_custom_field_in_selector, civicrm_custom_group.id as civicrm_custom_group_id, civicrm_custom_group.name as civicrm_custom_group_name, civicrm_custom_group.table_name as civicrm_custom_group_table_name, civicrm_custom_group.title as civicrm_custom_group_title, civicrm_custom_group.help_pre as civicrm_custom_group_help_pre, civicrm_custom_group.help_post as civicrm_custom_group_help_post, civicrm_custom_group.collapse_display as civicrm_custom_group_collapse_display, civicrm_custom_group.style as civicrm_custom_group_style, civicrm_custom_group.is_multiple as civicrm_custom_group_is_multiple, civicrm_custom_group.extends as civicrm_custom_group_extends, civicrm_custom_group.extends_entity_column_id as civicrm_custom_group_extends_entity_column_id, civicrm_custom_group.extends_entity_column_value as civicrm_custom_group_extends_entity_column_value, civicrm_custom_group.max_multiple as civicrm_custom_group_max_multiple 
  FROM     civicrm_custom_group
  LEFT JOIN civicrm_custom_field ON (civicrm_custom_field.custom_group_id = civicrm_custom_group.id)
  
  WHERE civicrm_custom_group.is_active = 1
    AND civicrm_custom_field.is_active = 1
    AND civicrm_custom_group.extends IN ('Individual', 'Contact')
  AND civicrm_custom_group.extends_entity_column_value IS NULL AND  ( 1 )  
  ORDER BY civicrm_custom_group.weight,
           civicrm_custom_group.title,
           civicrm_custom_field.weight,
           civicrm_custom_field.label
   [nativecode=1054 ** Unknown column 'civicrm_custom_field.in_selector' in 'field list']
      [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_field.label as civicrm_custom_field_label, civicrm_custom_field.column_name as civicrm_custom_field_column_name, civicrm_custom_field.data_type as civicrm_custom_field_data_type, civicrm_custom_field.html_type as civicrm_custom_field_html_type, civicrm_custom_field.default_value as civicrm_custom_field_default_value, civicrm_custom_field.attributes as civicrm_custom_field_attributes, civicrm_custom_field.is_required as civicrm_custom_field_is_required, civicrm_custom_field.is_view as civicrm_custom_field_is_view, civicrm_custom_field.help_pre as civicrm_custom_field_help_pre, civicrm_custom_field.help_post as civicrm_custom_field_help_post, civicrm_custom_field.options_per_line as civicrm_custom_field_options_per_line, civicrm_custom_field.start_date_years as civicrm_custom_field_start_date_years, civicrm_custom_field.end_date_years as civicrm_custom_field_end_date_years, civicrm_custom_field.date_format as civicrm_custom_field_date_format, civicrm_custom_field.time_format as civicrm_custom_field_time_format, civicrm_custom_field.option_group_id as civicrm_custom_field_option_group_id, civicrm_custom_field.in_selector as civicrm_custom_field_in_selector, civicrm_custom_group.id as civicrm_custom_group_id, civicrm_custom_group.name as civicrm_custom_group_name, civicrm_custom_group.table_name as civicrm_custom_group_table_name, civicrm_custom_group.title as civicrm_custom_group_title, civicrm_custom_group.help_pre as civicrm_custom_group_help_pre, civicrm_custom_group.help_post as civicrm_custom_group_help_post, civicrm_custom_group.collapse_display as civicrm_custom_group_collapse_display, civicrm_custom_group.style as civicrm_custom_group_style, civicrm_custom_group.is_multiple as civicrm_custom_group_is_multiple, civicrm_custom_group.extends as civicrm_custom_group_extends, civicrm_custom_group.extends_entity_column_id as civicrm_custom_group_extends_entity_column_id, civicrm_custom_group.extends_entity_column_value as civicrm_custom_group_extends_entity_column_value, civicrm_custom_group.max_multiple as civicrm_custom_group_max_multiple 
  FROM     civicrm_custom_group
  LEFT JOIN civicrm_custom_field ON (civicrm_custom_field.custom_group_id = civicrm_custom_group.id)
  
  WHERE civicrm_custom_group.is_active = 1
    AND civicrm_custom_field.is_active = 1
    AND civicrm_custom_group.extends IN ('Individual', 'Contact')
  AND civicrm_custom_group.extends_entity_column_value IS NULL AND  ( 1 )  
  ORDER BY civicrm_custom_group.weight,
           civicrm_custom_group.title,
           civicrm_custom_field.weight,
           civicrm_custom_field.label
   [nativecode=1054 ** Unknown column 'civicrm_custom_field.in_selector' in 'field list']"]
  )
  
  Aug 14 10:05:12  [info] $backTrace = #0 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(227): CRM_Core_Error::backtrace("backTrace", TRUE)
  #1 [internal function](): CRM_Core_Error::handle(Object(DB_Error))
  #2 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(DB_Error))
  #3 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/packages/DB.php(976): PEAR_Error->PEAR_Error("DB Error: no such field", -19, 16, (Array:2), "SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_fie...")
  #4 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(564): DB_Error->DB_Error(-19, 16, (Array:2), "SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_fie...")
  #5 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1905): PEAR->raiseError(NULL, -19, NULL, NULL, "SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_fie...", "DB_Error", TRUE)
  #6 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/packages/DB/mysql.php(895): DB_common->raiseError(-19, NULL, NULL, NULL, "1054 ** Unknown column 'civicrm_custom_field.in_selector' in 'field list'")
  #7 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/packages/DB/mysql.php(328): DB_mysql->mysqlRaiseError()
  #8 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1216): DB_mysql->simpleQuery("SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_fie...")
  #9 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2438): DB_common->query("SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_fie...")
  #10 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(1627): DB_DataObject->_query("SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_fie...")
  #11 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(344): DB_DataObject->query("SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_fie...")
  #12 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(1265): CRM_Core_DAO->query("SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_fie...", TRUE)
  #13 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/CustomGroup.php(526): CRM_Core_DAO::executeQuery("SELECT civicrm_custom_field.id as civicrm_custom_field_id, civicrm_custom_fie...", (Array:0))
  #14 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/CRM/Dedupe/Finder.php(285): CRM_Core_BAO_CustomGroup::getTree("Individual", NULL, NULL, -1)
  #15 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/UFMatch.php(208): CRM_Dedupe_Finder::formatParams((Array:2), "Individual")
  #16 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/UFMatch.php(118): CRM_Core_BAO_UFMatch::synchronizeUFMatch(Object(WP_User), 2, "username_0@gmail.com", "WordPress", NULL, "Individual", FALSE)
  #17 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/includes/civicrm.users.php(177): CRM_Core_BAO_UFMatch::synchronize(Object(WP_User), TRUE, "WordPress", "Individual")
  #18 /home/cremorne/www/www/prodwp/wp-content/plugins/civicrm/civicrm.php(1210): CiviCRM_For_WordPress_Users->sync_user(Object(WP_User))
  #19 [internal function](): CiviCRM_For_WordPress->invoke("")
  #20 /home/cremorne/www/www/prodwp/wp-includes/plugin.php(525): call_user_func_array((Array:2), (Array:1))
  #21 /home/cremorne/www/www/prodwp/wp-admin/admin.php(236): do_action("toplevel_page_CiviCRM")
  #22 {main}
  
  ```
  
  Help Please?
  
  **Tags:** wordpress, upgrade, database
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2016-08-16. Score: 2
  
  Have managed to upgrade to 4.6.9 now. For anyone else who might be doing this perhaps these steps might help:
  
  1. Ran the following.
  
  ALTER TABLE `civicrm_custom_field`
  ADD COLUMN `in_selector` tinyint(4) DEFAULT '0' COMMENT 'Should the multi-record custom field values be displayed in tab table listing';
  UPDATE civicrm\_custom\_field cf
  LEFT JOIN civicrm\_custom\_group cg
  ON cf.custom\_group\_id = cg.id
  SET cf.in\_selector = 1
  WHERE cg.is\_multiple = 1 AND cf.html\_type != 'TextArea';
  ALTER TABLE `civicrm_custom_group`
  CHANGE COLUMN `style` `style` varchar(15) COLLATE utf8\_unicode\_ci DEFAULT NULL COMMENT 'Visual relationship between this form and its parent.';
  
  2. \*\*\* Above good and restarted upgrade, it did things and then stopped with following error:
     Error: Upgrade DB to 4.5.alpha1: SQL]
     Error Field Error Value
     Type DB\_Error
     Code -1
     Message DB Error: unknown error
     Mode 16
     UserInfo ALTER TABLE `civicrm_custom_field` ADD COLUMN `in_selector` tinyint(4) DEFAULT '0' COMMENT 'Should the multi-record custom field values be displayed in tab table listing' [nativecode=1060 \*\* Duplicate column name 'in\_selector']
     DebugInfo ALTER TABLE `civicrm_custom_field` ADD COLUMN `in_selector` tinyint(4) DEFAULT '0' COMMENT 'Should the multi-record custom field values be displayed in tab table listing' [nativecode=1060 \*\* Duplicate column name 'in\_selector']
  
  Commented out code look for CRM-13992 in file /wp-content/plugins/civicrm/civicrm/CRM/Upgrade/Incremental/sql/4.5.alpha1.mysql.tpl
  
  3. \*\*\* Restarted upgrade and got following error:
     Error: Upgrade DB to 4.5.alpha1: SQL]
     Error Field Error Value
     Type DB\_Error
     Code -1
     Message DB Error: unknown error
     Mode 16
     UserInfo ALTER TABLE `civicrm_contact` ADD COLUMN `formal_title` varchar(64) COMMENT 'Formal (academic or similar) title in front of name. (Prof., Dr. etc.)' AFTER `suffix_id` [nativecode=1060 \*\* Duplicate column name 'formal\_title']
     DebugInfo ALTER TABLE `civicrm_contact` ADD COLUMN `formal_title` varchar(64) COMMENT 'Formal (academic or similar) title in front of name. (Prof., Dr. etc.)' AFTER `suffix_id` [nativecode=1060 \*\* Duplicate column name 'formal\_title']
  4. **\* Commented out code and restarted upgrade. Failed a couple of times with duplicates or column not available (previously dropped) so just took this code out of the SQL and restarted upgrade.
     \*** It continued upgrading until the following error was encountered
  
  Error: Upgrade DB to 4.6.alpha7]
  Error Field Error Value
  Type DB\_Error
  Code -1
  Message DB Error: unknown error
  Mode 16
  UserInfo ALTER TABLE civicrm\_mailing\_abtest ADD COLUMN `created_id` int unsigned COMMENT 'FK to Contact ID', ADD COLUMN `created_date` datetime COMMENT 'When was this item created', ADD COLUMN `testing_criteria` varchar(32) COLLATE utf8\_unicode\_ci DEFAULT NULL, ADD COLUMN `winner_criteria` varchar(32) COLLATE utf8\_unicode\_ci DEFAULT NULL, ADD CONSTRAINT FK\_civicrm\_mailing\_abtest\_created\_id FOREIGN KEY (`created_id`) REFERENCES `civicrm_contact`(`id`) ON DELETE SET NULL [nativecode=1060 \*\* Duplicate column name 'created\_id']
  DebugInfo ALTER TABLE civicrm\_mailing\_abtest ADD COLUMN `created_id` int unsigned COMMENT 'FK to Contact ID', ADD COLUMN `created_date` datetime COMMENT 'When was this item created', ADD COLUMN `testing_criteria` varchar(32) COLLATE utf8\_unicode\_ci DEFAULT NULL, ADD COLUMN `winner_criteria` varchar(32) COLLATE utf8\_unicode\_ci DEFAULT NULL, ADD CONSTRAINT FK\_civicrm\_mailing\_abtest\_created\_id FOREIGN KEY (`created_id`) REFERENCES `civicrm_contact`(`id`) ON DELETE SET NULL [nativecode=1060 \*\* Duplicate column name 'created\_id']
  
  \*\*\* File location for above error shown below:
  //wp-content/plugins/civicrm/civicrm/CRM/Upgrade/Incremental/sql/4.6.alpha7.mysql.tpl
  
  5. Comment out all the code for above and restarted upgrade again.
     [Error: Upgrade DB to 4.6.alpha7]
     Error Field Error Value
     Type DB\_Error
     Code -19
     Message DB Error: no such field
     Mode 16
     UserInfo UPDATE civicrm\_mailing\_abtest SET testing\_criteria = 'subject' WHERE testing\_criteria\_id = 1 [nativecode=1054 \*\* Unknown column 'testing\_criteria\_id' in 'where clause']
     DebugInfo UPDATE civicrm\_mailing\_abtest SET testing\_criteria = 'subject' WHERE testing\_criteria\_id = 1 [nativecode=1054 \*\* Unknown column 'testing\_criteria\_id' in 'where clause']
  
  Found code in upgrade directories and after careful checking commented out relevant pieces as already in place. Restarted and
  
  **\* Worked and displayed successful upgrade to 4.6.9 screen.** However, clicked on CiviCRM icon in Wordpress and it displayed an empty screen.
   **Do the following:** 1. Delete files with cached settings. In Wordpress as follows:
  /wp-content/plugins/files/civicrm/templates\_c/
  /wp-content/plugins/files/civicrm/ConfigAndLog/Config.IDS.ini
  
  \*\*\* 2. Enter the following URL in your browser to review and update directory paths and base URLs. See CiviCRM Menu: Administer >> System Settings >> Cleanup Caches and Update Paths
  (Reference: <https://wiki.civicrm.org/confluence/display/CRMDOC/Moving+an+Existing+Installation+to+a+New+Server+or+Location>)
  For Wordpress sites:
  http:///wp-admin/admin.php?page=CiviCRM&q=civicrm/admin/setting/updateConfigBackend&reset=1
  
  
  ---
  
  ### Answer by username_1 on 2016-08-14. Score: 1
  
  I hope you have backups?
  
  It's often better to do such a big upgrade in parts.
  Go from 4.4.5 to 4.4.21.
  Then go to 4.6.20 (4.5 can be skipped, have done upgrades from 4.4 to 4.6 quite often).
  Then go to 4.7.10.
  
  > **Comments:**
  > **username_2**: I would also recommend that you test your backups on a development server before upgrading the live site.  
  > **username_0**: Thanks  for tips. Yes restored from my backup twice now successfully. Did upgrade in dev server with success although I may have done an incremental upgrade a year or two back to the then current version. Might see if I can find the incremental versions and try and progress one by one. This is the first time in almost 5 years I have had an issue like this one.  
  
  ---
  
  