# Command Line Upgrade Problem when upgrading from 2.16.3 to 3.0

**URL:** <https://forum.mautic.org/t/command-line-upgrade-problem-when-upgrading-from-2-16-3-to-3-0/15360>\
**Category:** Mautic 3 - Install/Upgrade Support\
**Created:** [July 24, 2020, 1:38pm UTC](https://forum.mautic.org/t/command-line-upgrade-problem-when-upgrading-from-2-16-3-to-3-0/15360 "2020-07-24T13:38:45Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mikew/32/5156_2.png) [@mikew](https://forum.mautic.org/u/mikew)\
**Post date:** [July 24, 2020, 1:38pm UTC](https://forum.mautic.org/t/command-line-upgrade-problem-when-upgrading-from-2-16-3-to-3-0/15360/1 "2020-07-24T13:38:45Z")

</div>

**Your software**  
_My PHP version is_ : 7.2  
\*My MariaDB version is: 10.2

**Updating/Installing Errors**  
\*I am: Updating  
\*Upgrading: Command Line

_These errors are showing in the installer_ :  
No errors all looked good at this stage:  
Welcome to Phase 2 of the Mautic 3 upgrade! We’ll continue where we left off.

Moving Mautic 2 files into mautic-2-backup and moving the Mautic 3 files in place, this might take a while… DO NOT ABORT THE SCRIPT!!!

Done!

Updating your config/local.php with new settings that were changed/introduced in Mautic 3…

Done! Your config file has been updated.

Getting the amount of available Mautic 3 database migrations… This might take a while!

Applying Mautic 3 database migrations, 9 migrations in total… This might take a while!

All Mautic 3 migrations applied successfully.

Restoring your user data like custom plugins/themes/media from the Mautic 2 installation. This might take a while… DO NOT ABORT THE SCRIPT!!!

Done! Your user data has been restored. Your Mautic 3 installation is ready. Just one more thing:

Cleaning up installation files that we no longer need…

Cleaned up successfully!

Building cache for Mautic 3…

Done! Cache has been built.

We’re done! Enjoy using Mautic 3 🙂

Don’t forget to update your cron jobs!

Do you want to remove the backup files? We recommend first checking in a browser whether Mautic 3 works as expected. Type “yes” to remove:

no

Ok, we won’t do anything for now. Please note that upgrade\_v3.php will remain (publicly) available until you choose to remove the backup files using this script! Run this script again to be prompted to delete backup files.

_These errors are showing in the Mautic log_ :

2020/07/24 13:29:41 [error] 30135#30135: \*48256 FastCGI sent in stderr: “PHP message: RuntimeException: Unable to write in the “cache” directory (/var/www/mautic/app/…/var/cache/prod). - in file /var/www/mautic/vendor/symfony/http-kernel/Kernel.php - at line 768” while reading response header from upstream, client: ip.ip.ip.ip, server: [mydomain.com](http://mydomain.com), request: “GET / HTTP/2.0”, upstream: “fastcgi://unix:/run/php/php7.2-fpm.sock:”, host: “[mydomain.com](http://mydomain.com)”

_These errors are showing in the upgrade\_log.txt file (located in the root of your Mautic instance when an upgrade has been attempted - ensure you remove or redact any sensitive data such as domain names in the file path)_ :

None

**Your problem**  
_My problem is_ :

The above was my problem. When started looking at the files in the directory I noticed that everything was owned by root.  
ran chown -R www-data:www-data \* and fixed everything

_Steps I have tried to fix the problem_ :

---

<div class="post-metadata">

**Author:** ![codes9](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/codes9/32/682_2.png) [@codes9](https://forum.mautic.org/u/codes9)\
**Post date:** [October 30, 2020, 12:13pm UTC](https://forum.mautic.org/t/command-line-upgrade-problem-when-upgrading-from-2-16-3-to-3-0/15360/2 "2020-10-30T12:13:50Z")

</div>

Sounds like you’ve answered your own question. Is your install working now?

---

<div class="post-metadata">

**Author:** ![mikew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mikew/32/5156_2.png) [@mikew](https://forum.mautic.org/u/mikew)\
**Post date:** [October 30, 2020, 1:44pm UTC](https://forum.mautic.org/t/command-line-upgrade-problem-when-upgrading-from-2-16-3-to-3-0/15360/3 "2020-10-30T13:44:38Z")

</div>

yip it is. and yes I did 🙂 took a while to get there though

---

<div class="post-metadata">

**Author:** ![codes9](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/codes9/32/682_2.png) [@codes9](https://forum.mautic.org/u/codes9)\
**Post date:** [October 30, 2020, 3:22pm UTC](https://forum.mautic.org/t/command-line-upgrade-problem-when-upgrading-from-2-16-3-to-3-0/15360/4 "2020-10-30T15:22:52Z")

</div>

That’s awesome news! 😆

---

<div class="post-metadata">

**Author:** ![demelos](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/demelos/32/5371_2.png) [@demelos](https://forum.mautic.org/u/demelos)\
**Post date:** [March 22, 2023, 9:51pm UTC](https://forum.mautic.org/t/command-line-upgrade-problem-when-upgrading-from-2-16-3-to-3-0/15360/5 "2023-03-22T21:51:45Z")

</div>

I tried to upgrade my mautic version yesterday and during the last step I got an error that DB could not be upgraded. I am able to login and see everything but it not working. My forms stops working, any page with the /s/ url is broken. Any suggestion what I could run to resolve this problems?

---

<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:** [March 22, 2023, 9:55pm UTC](https://forum.mautic.org/t/command-line-upgrade-problem-when-upgrading-from-2-16-3-to-3-0/15360/6 "2023-03-22T21:55:59Z")

</div>

Can you share from which version?

---

<div class="post-metadata">

**Author:** ![demelos](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/demelos/32/5371_2.png) [@demelos](https://forum.mautic.org/u/demelos)\
**Post date:** [March 22, 2023, 10:04pm UTC](https://forum.mautic.org/t/command-line-upgrade-problem-when-upgrading-from-2-16-3-to-3-0/15360/7 "2023-03-22T22:04:10Z")

</div>

this is the new v4.4.7

---

<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:** [March 23, 2023, 4:20am UTC](https://forum.mautic.org/t/command-line-upgrade-problem-when-upgrading-from-2-16-3-to-3-0/15360/8 "2023-03-23T04:20:31Z")

</div>

Thank you. What is the version you upgrade from? I’ just asking because it is diffent if you upgrade from Mautic 2.16 or 3.3.3 or 4.4.6 😉
