# Can I install Mautic 5 and after using the database of the 4.1.0 version?

**URL:** <https://forum.mautic.org/t/can-i-install-mautic-5-and-after-using-the-database-of-the-4-1-0-version/30736>\
**Category:** Mautic 5 Install/Upgrade Support\
**Created:** [January 31, 2024, 2:22pm UTC](https://forum.mautic.org/t/can-i-install-mautic-5-and-after-using-the-database-of-the-4-1-0-version/30736 "2024-01-31T14:22:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![funkman733](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/funkman733/32/9158_2.png) [@funkman733](https://forum.mautic.org/u/funkman733)\
**Post date:** [January 31, 2024, 2:22pm UTC](https://forum.mautic.org/t/can-i-install-mautic-5-and-after-using-the-database-of-the-4-1-0-version/30736/1 "2024-01-31T14:22:41Z")

</div>

**Your software**  
My Mautic version is: 4.1.0  
My PHP version is: 7.4 but I can set it up to 8.3  
My Database type and version is: 10.6.16-MariaDB-cll-lve-log

**Your problem**  
My problem is: that I can’t do any update or upgrade from the 4.1.0 version.

These errors are showing in the log: not, but I have “403 forbidden” if I try to do the update

Steps I have tried to fix the problem:  
I have tried to use Composer and Notification Update, but I don’t have any solutions.  
I ask you if I can do a backup of the database of the 4.1.0 Mautic installation. After doing a new Mautic 5.x installation and after restoring the backup of the Mautic 4.1.0 into the database of the new Mautic 5.x installation.  
I want to use the new version of Mautic, but I don’t want to lose all the data from the old database…

---

<div class="post-metadata">

**Author:** ![funkman733](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/funkman733/32/9158_2.png) [@funkman733](https://forum.mautic.org/u/funkman733)\
**Post date:** [February 21, 2024, 5:48pm UTC](https://forum.mautic.org/t/can-i-install-mautic-5-and-after-using-the-database-of-the-4-1-0-version/30736/2 "2024-02-21T17:48:09Z")

</div>

Hi,  
I have tried the following solution to update from 4.1.0 to 4.4.11, after the Mautic update I edited the .htaccess and now I don’t the 403 forbidden error message, but I have another error message that I cannot display the login form…

> <https://github.com/mautic/mautic/issues/10913?fbclid=IwAR0pwv01xLREn5grcDZXnpGaBDQIi_Z860gR0MS2lC7owo8_naX1oHDvzmU#issuecomment-1084513105>
>
> \### Mautic Version
> 
> 4.2.x series
> 
> \### PHP version
> 
> 7.4.27
> 
> \### What brow…sers are you seeing the problem on?
> 
> Firefox, Chrome
> 
> \### What happened?
> 
> After performing an upgrade, the site reports an error 403, forbidden.
> 
> We upgrade via command line and clear cache and clean permissions as part of the process.
> 
> This maybe server specific, but this line in the HTACCESS
> 
> https://github.com/mautic/mautic/blob/4.2.0/.htaccess
> 
> \`\`\`
> \# Apache 2.4+
> \<IfModule authz\_core\_module\>
> # Deny access via HTTP requests to all PHP files.
> \<FilesMatch "\\.php$"\>
> Require all denied
> \</FilesMatch\>
> \`\`\`
> 
> Causes the issue, by commenting out
> 
> \`\`\`
> \<FilesMatch "\\.php$"\>
> Require all denied
> \</FilesMatch\>
> \`\`\`
> 
> The site loads again.
> 
> Prior to this verison 4.1.2 Worked with this in the htaccess file.
> 
> \### How can we reproduce this issue?
> 
> Server
> Ubunto 18.04.4 LTS
> Server API | FPM/FastCGI
> MariaDB
> 1:10.2.43+maria~bionic
> Apache
> 2.4.52-1+ubuntu18.04+1
> NGiNX
> 1.19.9-1+ubuntu18.04+1
> 
> Not sure if this is important, but we have mautic in a subfolder off the domain
> eg: domain.com/mautic/
> 
> \### Relevant log output
> 
> \`\`\`shell
> n/a
> \`\`\`
> 
> 
> \### Code of Conduct
> 
> \- \[X\] I confirm that I have read and agree to follow this project's Code of Conduct

---

<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:** [February 21, 2024, 6:11pm UTC](https://forum.mautic.org/t/can-i-install-mautic-5-and-after-using-the-database-of-the-4-1-0-version/30736/3 "2024-02-21T18:11:10Z")

</div>

Do a full backup of source and database, then try to update mautic using CLI,

see this for detals:

[https://docs.mautic.org/en/5.x/getting\_started/how\_to\_update\_mautic.html](https://docs.mautic.org/en/5.x/getting_started/how_to_update_mautic.html)

---

<div class="post-metadata">

**Author:** ![Mpolixenidis](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mpolixenidis/32/11160_2.png) [@Mpolixenidis](https://forum.mautic.org/u/Mpolixenidis)\
**Post date:** [April 1, 2024, 11:49pm UTC](https://forum.mautic.org/t/can-i-install-mautic-5-and-after-using-the-database-of-the-4-1-0-version/30736/4 "2024-04-01T23:49:40Z")

</div>

Hello, I’ll try this on my instance to see if can have upgrade with CLI.

Usually when tried to upgrade from GUI I got this frustrated 403 forbidden error. Which I had to rollback after on previous version. I’d like to have the latest, but somehow to overcome this trouble.

---

<div class="post-metadata">

**Author:** ![paul.piazza.pro](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/paul.piazza.pro/32/13297_2.png) [@paul.piazza.pro](https://forum.mautic.org/u/paul.piazza.pro)\
**Post date:** [July 4, 2024, 7:29am UTC](https://forum.mautic.org/t/can-i-install-mautic-5-and-after-using-the-database-of-the-4-1-0-version/30736/5 "2024-07-04T07:29:53Z")

</div>

Hi,

I also follow the steps of the GUI part and got the 403. Mautic try to check my user with `https://mautic.ddev.site/index_dev.php/s/login_check`

The steps:

I use the project ddev and select the git branch Mautic 4.4. and I

```auto
$ ddev ddev-setup-mautic

```

I update the `config.yml`

```auto
php_version: "8.0"
webimage_extra_packages: [php8.0-imap]

$ ddev restart

```

Then, I try to update mautic

```auto
$ ddev exec php bin:console mautic:update:apply
$ ddev exec php bin:console mautic:update:apply --finish

# Success! You are now running version 5.1.0 of Mautic.

```

I update to php 8.2

```auto
php_version: "8.2"
webimage_extra_packages: [php8.2-imap]

$ ddev restart

```

I open my browser on [https://mautic.ddev.site/s/login](https://mautic.ddev.site/s/login)

Finally I got 403 forbidden because Mautic tries to check my user `admin` with  
`https://mautic.ddev.site/index_dev.php/s/login_check`

I suppose there is an issue with the .htaccess ?
