# Unable to Upgrade Mautic version 5.0.4 to 5.1

**URL:** <https://forum.mautic.org/t/unable-to-upgrade-mautic-version-5-0-4-to-5-1/32900>\
**Category:** Mautic 5 Install/Upgrade Support\
**Created:** [July 26, 2024, 6:24pm UTC](https://forum.mautic.org/t/unable-to-upgrade-mautic-version-5-0-4-to-5-1/32900 "2024-07-26T18:24:43Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![sunbpo](https://avatars.discourse-cdn.com/v4/letter/s/b3f665/32.png) [@sunbpo](https://forum.mautic.org/u/sunbpo)\
**Post date:** [July 26, 2024, 6:24pm UTC](https://forum.mautic.org/t/unable-to-upgrade-mautic-version-5-0-4-to-5-1/32900/1 "2024-07-26T18:24:43Z")

</div>

**Your software**  
My Mautic version is:5.0.4  
My PHP version is: 8.1.28  
My Database type and version is:10.11.7-MariaDB

**Your problem**  
My problem is: I am updating to new version using UI and terminal using this documentation [How to update Mautic — Mautic Documentation 0.1 documentation](https://docs.mautic.org/en/5.x/getting_started/how_to_update_mautic.html)  
but on the finish step, DB is unable to retrieve changes

These errors are showing in the log:

Steps I have tried to fix the problem:

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [July 28, 2024, 5:43am UTC](https://forum.mautic.org/t/unable-to-upgrade-mautic-version-5-0-4-to-5-1/32900/2 "2024-07-28T05:43:10Z")

</div>

Could you please share the error message / screenshot you have?

---

<div class="post-metadata">

**Author:** ![sunbpo](https://avatars.discourse-cdn.com/v4/letter/s/b3f665/32.png) [@sunbpo](https://forum.mautic.org/u/sunbpo)\
**Post date:** [July 29, 2024, 3:37am UTC](https://forum.mautic.org/t/unable-to-upgrade-mautic-version-5-0-4-to-5-1/32900/3 "2024-07-29T03:37:58Z")

</div>

Here is the error message:

root@cyberpanel-vnic:~# cd /home/mautic.sunbposolutions.in/public\_html/root@cyberpanel-vnic:/home/mautic.sunbposolutions.in/public\_html# /usr/local/lsws/lsphp81/bin/php bin/console mautic:update:apply  
Are you sure you wish to update Mautic to the latest version? y  
Step 6 [-----\>----------------------] Removing deleted files

IMPORTANT: Run the same command again with --finish. For example ‘php bin/console mautic:update:apply --finish’  
root@cyberpanel-vnic:/home/mautic.sunbposolutions.in/public\_html# /usr/local/lsws/lsphp81/bin/php bin/console mautic:update:apply --finish  
Step 1 [\>---------------------------] Migrating database schema…

An error occurred while updating the database. Check log for more details.

---

<div class="post-metadata">

**Author:** ![email-buddy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/email-buddy/32/12401_2.png) [@email-buddy](https://forum.mautic.org/u/email-buddy)\
**Post date:** [July 29, 2024, 11:49am UTC](https://forum.mautic.org/t/unable-to-upgrade-mautic-version-5-0-4-to-5-1/32900/4 "2024-07-29T11:49:09Z")

</div>

I’m not sure if this is the right place to post this, but I’ve been searching the forum for over an hour and can’t find a straightforward way to create a new post. I apologize to the original poster for adding my question here, but I’m really lost.

I’ve just installed the new version of the software, and as a first-time user, I’m running into some issues. Everything seems to be installed correctly, but I’m using a VPS server instead of a dedicated server. I’ve set it up under a subdomain, and while sending and tracking emails works fine, I’m having trouble with the Campaign Builder. Every time I try to create an email, I get the error message: “Your request could not be processed, please try again.” The logs don’t seem to provide any clues.

I’ve reinstalled the software three times now and keep facing the same issue. The software is behind a basic firewall, and I can’t find any documentation about specific port requirements. Can anyone help me out? I’m getting really frustrated with this and am about to give up on it, even though it came highly recommended. Thanks in advance for any assistance!

---

<div class="post-metadata">

**Author:** ![sunbpo](https://avatars.discourse-cdn.com/v4/letter/s/b3f665/32.png) [@sunbpo](https://forum.mautic.org/u/sunbpo)\
**Post date:** [July 29, 2024, 5:43pm UTC](https://forum.mautic.org/t/unable-to-upgrade-mautic-version-5-0-4-to-5-1/32900/5 "2024-07-29T17:43:31Z")

</div>

> [@sunbpo](#):
>
> Here is the error message:
> 
> root@cyberpanel-vnic:~# cd /home/mautic.sunbposolutions.in/public\_html/root@cyberpanel-vnic:/home/mautic.sunbposolutions.in/public\_html# /usr/local/lsws/lsphp81/bin/php bin/console mautic:update:apply  
> Are you sure you wish to update Mautic to the latest version? y  
> Step 6 [-----\>----------------------] Removing deleted files
> 
> IMPORTANT: Run the same command again with --finish. For example ‘php bin/console mautic:update:apply --finish’  
> root@cyberpanel-vnic:/home/mautic.sunbposolutions.in/public\_html# /usr/local/lsws/lsphp81/bin/php bin/console mautic:update:apply --finish  
> Step 1 [\>---------------------------] Migrating database schema…
> 
> An error occurred while updating the database. Check log for more details.

Hi Joeyk  
Here is the error message:

root@cyberpanel-vnic:~# cd /home/mautic.sunbposolutions.in/public\_html/root@cyberpanel-vnic:/home/mautic.sunbposolutions.in/public\_html# /usr/local/lsws/lsphp81/bin/php bin/console mautic:update:apply  
Are you sure you wish to update Mautic to the latest version? y  
Step 6 [-----\>----------------------] Removing deleted files

IMPORTANT: Run the same command again with --finish. For example ‘php bin/console mautic:update:apply --finish’  
root@cyberpanel-vnic:/home/mautic.sunbposolutions.in/public\_html# /usr/local/lsws/lsphp81/bin/php bin/console mautic:update:apply --finish  
Step 1 [\>---------------------------] Migrating database schema…

An error occurred while updating the database. Check log for more details.

---

<div class="post-metadata">

**Author:** ![mzagmajster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mzagmajster/32/687_2.png) [@mzagmajster](https://forum.mautic.org/u/mzagmajster)\
**Post date:** [July 29, 2024, 6:25pm UTC](https://forum.mautic.org/t/unable-to-upgrade-mautic-version-5-0-4-to-5-1/32900/6 "2024-07-29T18:25:06Z")

</div>

Hi I suspect migration files are causing problems,

I would run

```auto
php bin/console doctrine:migrations:migrate

```

to execute each migration separately and see which migration file is causing problems.

When you have that you can investigate why update is failing.

---

<div class="post-metadata">

**Author:** ![aetienne.mha](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/aetienne.mha/32/12824_2.png) [@aetienne.mha](https://forum.mautic.org/u/aetienne.mha)\
**Post date:** [August 14, 2024, 4:15pm UTC](https://forum.mautic.org/t/unable-to-upgrade-mautic-version-5-0-4-to-5-1/32900/7 "2024-08-14T16:15:21Z")

</div>

Updating from 5.0.4 does not work due to differences in the database tables from the additional tables and seemingly columns

The instructions within this link is null & void, going from 5.0.4 to 5.1.0. Copying the local.php file generates an error 500 message and having to go through it line by line to find where the issue is, is long winded.

Is there effective way to update from 5.0.4 which includes database changes?

---

<div class="post-metadata">

**Author:** ![mzagmajster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mzagmajster/32/687_2.png) [@mzagmajster](https://forum.mautic.org/u/mzagmajster)\
**Post date:** [August 14, 2024, 4:43pm UTC](https://forum.mautic.org/t/unable-to-upgrade-mautic-version-5-0-4-to-5-1/32900/8 "2024-08-14T16:43:40Z")

</div>

When you execute the migrations like I suggested above once the command fails, you will see exactly which file (migration it failed at).

So you do not have to check every migration, just the one it failed.

As for local.php if you have issues, copy local.php from a clean mautic test instance, after you issue mautic:install command, copy it to your real instance, login to mautic and then got to Configuration \> Save & Close, this will repopulate local.php with default values.

You should get rid of errors to some degree. After that you go and you set all the config. values via web UI.

---

<div class="post-metadata">

**Author:** ![lucas\_petrasek](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/lucas_petrasek/32/13495_2.png) [@lucas\_petrasek](https://forum.mautic.org/u/lucas_petrasek)\
**Post date:** [January 7, 2025, 10:36pm UTC](https://forum.mautic.org/t/unable-to-upgrade-mautic-version-5-0-4-to-5-1/32900/9 "2025-01-07T22:36:17Z")

</div>

Hi there, same thing happens to me - have you been able to find a solution?

---

<div class="post-metadata">

**Author:** ![sunbpo](https://avatars.discourse-cdn.com/v4/letter/s/b3f665/32.png) [@sunbpo](https://forum.mautic.org/u/sunbpo)\
**Post date:** [January 7, 2025, 11:18pm UTC](https://forum.mautic.org/t/unable-to-upgrade-mautic-version-5-0-4-to-5-1/32900/10 "2025-01-07T23:18:04Z")

</div>

Dear Lucas,

Thank you for reaching out and sharing your experience. Unfortunately, I have not yet found a solution to the issue we are facing. I believe that collaborating on this matter could be beneficial for both of us. If you have any additional insights or suggestions, I would be eager to discuss them further.

Looking forward to your thoughts.

Best regards,  
Ramesh

---

<div class="post-metadata">

**Author:** ![lucas\_petrasek](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/lucas_petrasek/32/13495_2.png) [@lucas\_petrasek](https://forum.mautic.org/u/lucas_petrasek)\
**Post date:** [January 8, 2025, 7:52am UTC](https://forum.mautic.org/t/unable-to-upgrade-mautic-version-5-0-4-to-5-1/32900/11 "2025-01-08T07:52:18Z")

</div>

Hi Ramesh, that sounds like a great idea - do you have a Discord, Whatsapp, or any platform we could connect through?

Thanks,  
Lucas

---

<div class="post-metadata">

**Author:** ![lucas\_petrasek](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/lucas_petrasek/32/13495_2.png) [@lucas\_petrasek](https://forum.mautic.org/u/lucas_petrasek)\
**Post date:** [January 8, 2025, 6:30pm UTC](https://forum.mautic.org/t/unable-to-upgrade-mautic-version-5-0-4-to-5-1/32900/12 "2025-01-08T18:30:32Z")

</div>

Hi Ramesh,

Just to let you know, I was able to solve this issue - it was caused by CDN, when I disabled it, it started working perfectly. I wish you a good luck!🙂

Best regards,  
Lucas Petrasek

---

<div class="post-metadata">

**Author:** ![sdesergi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/sdesergi/32/13691_2.png) [@sdesergi](https://forum.mautic.org/u/sdesergi)\
**Post date:** [January 21, 2025, 4:35pm UTC](https://forum.mautic.org/t/unable-to-upgrade-mautic-version-5-0-4-to-5-1/32900/13 "2025-01-21T16:35:01Z")

</div>

Hi,

@sunbpo

I do have the same problem. I have just [posted my case](https://forum.mautic.org/t/i-need-help-in-updating-to-5-2-1/34723/3) in more detail. The PHP error I got was as follows:

```auto
Creation of dynamic property Mautic\\Middleware\\MiddlewareBuilder::$specs is deprecated in /path/to/mautic/app/middlewares/MiddlewareBuilder.php on line 24＇

```

with the following referers:

/path/to/mautic/s/dashboard  
/path/to/mautic/s/login  
/path/to/mautic/s/update  
/path/to/mautic/s/config/edit  
…

@lucas_petrasek

I also use a CDN but I haven’t seen any affectation about it. Could you indicate what was the cause of the problem in your case? Thanks.

I hope this helps with the resolution of the problem
