Upgrade error with more than 10000 contacts using cli command line

Your software
My Mautic version is: 2.16.3
My PHP version is:7.3

Your problem
My problem is: I want to upgrade mautic 2.16.3 to mautic 3 via console cli.

I have more than 10K contacts and getting the error message of
"===== STARTING MAUTIC 3 UPGRADE AT 2020-07-23 00:48:24… =====
Installed Mautic version: 2.16.3
PHP version: 7.3.14-1~deb10u1
OS: Linux
Upgrade type: CLI

Doing pre-upgrade checks…
One or more warnings occurred during pre-upgrade checks, please run this script with the --ignore-warnings flag to continue:

  • You have 10000 or more contacts in your system. We recommend upgrading by using the CLI (command line) for the best performance and stability.

Steps I have tried to fix the problem: I couldnt resolve the problem with the commands:
php --ignore-warnings upgrade_v3.php
php upgrade_v3.php

Appreciate your help.
Baris Kiremitci

try writing this:
sudo php upgrade_v3.php --ignore-warnings

Dear mikew,
Thank you for your answer.
Not it is working.
Best

@yourrfriend thanks for posting here. What @mikew mentioned should indeed work (sudo shouldn’t even be necessary in most cases). You could also try php upgrade_v3.php -i, which does the same as --ignore-warnings but might work for you.

If you are really stuck, you could open upgrade_v3.php in your file editor and remove line 750 (marked below). This will prevent the script from stopping regardless of whether you are running it with or without the --ignore-warnings flag. The script will remove itself after the upgrade anyway, so you can safely edit it without introducing security risks.

@dennisameling thank you for your answer. i did with the --ignore-warnings. Upgrade process went smoothly without any error and it took very short time with more than 2M contacts and lots of custom fields.
Appreciate your help.

2 Likes

That’s great to hear! Thanks for reporting back! :rocket: