Notice: Undefined variable: alreadyInstalled in /var/www/vhosts/casem-acmse.org/subdomains/test/httpdocs/wp-content/plugins/civicrm/civicrm/install/index.php on line 274

Luckily this was on my sandbox site. I forgot that I was no longer logged in and tried to run:


Now it wants to reinstall CiviCRM.

May I suggest that someone fix this before it happens on a live site.

Update 1: Looks like I forgot to copy back the civicrm.settings.php file. After changing the version in civicrm_domain back to 4.7.16, I ran it again and it died in 4.17.17.mysql.tpl trying to add the card_type.

ALTER TABLE civicrm_financial_trxn ADD card_type INT( 10 ) UNSIGNED NULL DEFAULT NULL COMMENT 'FK to accept_creditcard option group values' AFTER payment_instrument_id, ADD pan_truncation INT UNSIGNED NULL COMMENT 'Last 4 digits of credit card.' AFTER check_number;

After adding the card+type manually with no errors, Civicrm refuses to continue.

A copy of civicrm.settings.php could reside in ../uploads/civicrm. Then part one of the upgrade process would be to copy this file and stick in ../uploads/civicrm then copy it back as part one of the install if it exists?

Either that or dump the information in the wp_options table in WordPress and either reload them each time or recreate the file as part of the upgrade.

Given that I'm not emotionally attached to this sandbox database I'm going to get another one

1 Answer 1


It's not completely clear the whole history of what happened to the instance, but it appears that you managed to run the upgrade script twice, and it choked the second time because the fields had already been inserted on the first run of the upgrade.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.