MAUTIC update error

Your software
My PHP version is : 7.4.30
My MySQL/MariaDB version is 10.3.34: MySQL/MariaDB version

Updating/Installing Errors
I am trying to Updating
Upgrading via : Web and Command Line

These errors are showing in the installer : via Web the upgrade stop to “Clearing Application Cache”
Instead, via the Command line, it stops after it asks me to write " php bin/console mautic:update:apply --finish " and the issue I have is under the Database update.

These errors are showing in the Mautic log : I don’t know because I restore the backup.

Your problem
My problem is : That I have 403 error if I try to open the Mautic installation, and the installation doesn’t finish correclty.

Steps I have tried to fix the problem : no one


From which version of Mautic to which other version of Mautic do you upgrade?

It is not the same to update to 4.40 from a 3.x than from a 4.x for example.


I’m trying to update from 4.1.0 to 4.4.0


I understand that the update process you perform via SSH is first an update:find and then an update:apply, correct?

sudo -u www-data php /var/www/html/mautic/bin/console mautic:update:find

and then

sudo -u www-data php /var/www/html/mautic/bin/console mautic:update:apply


Thank you for your reply.
Sorry, but I don’t have understood…
My Mautic URL is
When I installed it with Installatron from cPanel, it need to be installed into a subfolder. After the installation, I migrated it to the main folder.
Could be this the reason for the update issue?

To do the update from the Command Line I have followed this guide, using the cPanel Terminal, Updating at command line | Mautic.
Can I use the command strings you have written before in the cPanel Terminal?

How many PHP resources (for example memory limit and max_execution_time) do I need to set for the update and to use MAUTIC without problems?

Thank you

How did you install it for first time?

Did you use install it using an app called “Softaculous” in cPanel, or download / installed from zip, or use composer install via terminal?

I have installed it using “Installatron” in cPanel, similar to “Softaculous”.

It probably will need to be updated via Installatron.

On Installatron site, Mautic package shown to be updated to 4.4.0

However, Mautic is ending the zip installation soon and from 5.0+ onward it will be composer installed. I don’t know if Installatron or Softaculous will continue to offer Mautic as a package since not all host offer terminal access to their clients.

You might want to prepare about switching over to composer installed Mautic soon or at least read up about it.

Ok, but from the 3.3.1 version, I have updated Mautic via Web from the notification message system.
I will try to update using your string from the cPanel Terminal

Now, cPanel shows me that the Mautic version installed is 3.3.1 without any update messages, but if I enter into Mautic I can see that the installed version is 4.1.0.
I think because I have moved Mautic from the subfolder to the main folder.
Well, I cannot update from Installatron.

Terminal in cPanel return me a message “bash: sudo: command not found”

That because your mautic path isn’t the standard default path.

Let me be sure I understood this correctly.

You first installed Mautic v3 using cPanel Installatron then moved the Mautic installation to a different folder (from sub-folder to root folder?) then upgrade it later to 4+ using the Mautic web updater from notification center?

yeah, I doubt that you will be able to update it with cPanel Installatron anymore since you have move it to a new location and use the Mautic updater to v4+

If it was me … again that is ME … I would probably backup everything including export backup database to SQL and then zip up the root folder to same a copy.

Then empty out the root folder and grab a composer.json to edit the path to fit your cPanel folder structure and do a brand new install from composer. Import the database back in the new installation database also if you have done theme etc then you would need to restore those themes from backup as well too.

Mautic does not offer support on shared hostings but I have successfully run composer installed Mautic on cPanel and other shared hosting with modified composer.json.

If you are good with backup and want to give this a try. I can probably help you modify your composer.json to give it a shot and see how it works out for you.

1 Like


I have done a database zip backup.
But, I don’t know where I can find and edit the composer.json file…

I take no responsibility for this. I do plan on releasing a guide on installing composer Mautic on shared host but I am still testing it and waiting for some of the reported bugs to be fixed before writing the guide.

However, here a run down to get composer installed Mautic on cPanel.

  1. Go to your cPanel built in terminal
  2. Type this command$: composer --version
    (need to be at least version 2 or higher)
  3. CD to your /public_html/ folder
  4. Type this command$: composer create-project mautic/recommended-project:^4.0 --no-interaction --no-install
  5. A new folder /recommended-project/ will be created in /public_html/. Go to that folder and grab the file “composer.json” to move it to the /public_html/ folder. After moving composer.json file, you can delete the /recommended-project/ folder
  6. Edit the composer.json file with your favorite editor.

You will need to change some paths in the composer.json file for cPanel file structure and use absolute file pathname in it. On mine, I had to change few lines between line 90 to 112 or so. cPanel web-root path usually being with /home then /your username here/ and ends with /public_html

Basically, you are renaming all the “docroot” in composer.json to “/home/username/public_html”. It’‘’ be easier to do a search and replace all from docroot → /home/username/public_html

It will end up looking like this below

"autoload": {
    "psr-4": {
      "MauticPlugin\\": "/home/username/public_html/plugins/"
  "extra": {
    "mautic-scaffold": {
      "locations": {
        "web-root": "/home/username/public_html/"
    "installer-paths": {
      "/home/username/public_html/app": [
      "/home/username/public_html/plugins/{$name}": [
      "/home/username/public_html/themes/{$name}": [
  1. Save composer.json (it still should be in your /public_html/ folder and your prompt in terminal is in that directory)
  2. Type this command$: composer install --no-interaction

Go to your home URL and complete Mautic installation from there. It will be a brand new install so you will need to restore your database from backup, your local.php and all your themes.

You will probably have to edit the local.php and fix all the file path in it as well too.

Do this at your own risk.

1 Like