This is for anyone having difficulties upgrading.
I spent a LONG time trying to upgrade the Wordpress version 4.4.4 of CiviCRM and had many problems.
I tried upgrading in small steps e.g. 4.4.4 > 4.5 > 4.6 > 4.7 but I could only get as far as 4.4.9.
I tried following the guide to rebuild a fresh database schema and import a data dump, but that failed.
When I used the built in upgrade facility I got errors such as:
civicrm_case DROP FOREIGN KEY
So, here's what I had to do...
- Follow the CiviCRM upgrade guide to BACKUP YOUR DATABASE, upload the latest version of Civi and your settings file.
- Start the upgrade process by going to: admin.php?page=CiviCRM&q=civicrm/upgrade&reset=1
- If the upgrade process throws an error, note which process was being done when the error happened. In my case it looked like this: [Error: Upgrade DB to 4.7.18: SQL]. This tells you which sql file has the error.
- Find the corresponding sql file in civicrm/civicrm/CRM/Upgrade/Incremental/sql/ - in my case above it was: 4.7.18.mysql.sql
- Back on the error page, copy the offending SQL code. In my case it was: ALTER TABLE
civicrm_caseDROP FOREIGN KEY
- Find that line of code in the sql file and comment it out.
- Upload the file
- Revert your database to your previous version and run the updater again
I had to repeat this process when upgrading from 4.4.4 > 4.5.0 and then from 4.6.31 > 4.7.23
I don't know if removing this step in the upgrade has any bad effects on CiviCRM but all seemed to work for me.
Could an expert let me know if this was an ok thing to do?