# Mautic shows "The Site is currently offline due to encountering an error" after upgrade from 4.4 to 5.1

**URL:** <https://forum.mautic.org/t/mautic-shows-the-site-is-currently-offline-due-to-encountering-an-error-after-upgrade-from-4-4-to-5-1/33358>\
**Category:** Product Support\
**Created:** [September 2, 2024, 3:40pm UTC](https://forum.mautic.org/t/mautic-shows-the-site-is-currently-offline-due-to-encountering-an-error-after-upgrade-from-4-4-to-5-1/33358 "2024-09-02T15:40:10Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joseph08](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joseph08/32/12645_2.png) [@Joseph08](https://forum.mautic.org/u/Joseph08)\
**Post date:** [September 2, 2024, 3:40pm UTC](https://forum.mautic.org/t/mautic-shows-the-site-is-currently-offline-due-to-encountering-an-error-after-upgrade-from-4-4-to-5-1/33358/1 "2024-09-02T15:40:10Z")

</div>

**Your software**  
My Mautic version is: 5.1.0  
My PHP version is: 8.2 - tried 8.0 and 8.1 as well.  
My Database type and version is: Mysql 5.7 and tried 8.0 as well  
OS : Centos running cpanel. Tried on Alma Linux as well.  
**Your problem**  
My problem is: I have been running 4.4 version of Mautic for long time. Yesterday I tried to upgrade mautic to latest version using command line. It failed with Twig error, I then tried and executed the composer update command, but it didn’t help. I tried every possible solution mentioned on the internet but the issue persists. I am not able to run version 5.

These errors are showing in the log:  
[2024-09-01T15:19:10.719222+00:00] mautic.CRITICAL: Exception thrown when handling an exception (Twig\Error\RuntimeError: An exception has been thrown during the rendering of a template (“Mautic\CoreBundle\Twig\Extension\AssetExtension::getOverridableUrl(): Return value must be of type string, bool returned”). at /home/insightgenetic/public\_html/app/bundles/CoreBundle/Resources/views/Default/head.html.twig line 10) {“exception”:“[object] (Twig\Error\RuntimeError(code: 0): An exception has been thrown during the rendering of a template ("Mautic\CoreBundle\Twig\Extension\AssetExtension::getOverridableUrl(): Return value must be of type string, bool returned"). at /home/insightgenetic/public\_html/app/bundles/CoreBundle/Resources/views/Default/head.html.twig:10)\n[previous exception] [object] (TypeError(code: 0): Mautic\CoreBundle\Twig\Extension\AssetExtension::getOverridableUrl(): Return value must be of type string, bool returned at /home/insightgenetic/public\_html/app/bundles/CoreBundle/Twig/Extension/AssetExtension.php:132)”} {“hostname”:" “,“pid”:1647}  
[2024-09-01T15:19:10.728757+00:00] mautic.ERROR: Twig\Error\RuntimeError: An exception has been thrown during the rendering of a template (“Mautic\CoreBundle\Twig\Extension\AssetExtension::getOverridableUrl(): Return value must be of type string, bool returned”). - in file /home/insightgenetic/public\_html/app/bundles/CoreBundle/Resources/views/Default/head.html.twig - at line 10 {“hostname”:” ",“pid”:1647}

Steps I have tried to fix the problem:  
Tried command line upgrade steps mentioned on the mautic page.  
cleared cache couple of times, before and after upgrade.  
deleted cache/prod directory and tried upgrading  
ran composer update command with successfull message  
Still problem persists.

---

<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:** [September 2, 2024, 5:42pm UTC](https://forum.mautic.org/t/mautic-shows-the-site-is-currently-offline-due-to-encountering-an-error-after-upgrade-from-4-4-to-5-1/33358/2 "2024-09-02T17:42:25Z")

</div>

Hi,  
Did you install with composer originally?  
J

---

<div class="post-metadata">

**Author:** ![Joseph08](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joseph08/32/12645_2.png) [@Joseph08](https://forum.mautic.org/u/Joseph08)\
**Post date:** [September 9, 2024, 8:51pm UTC](https://forum.mautic.org/t/mautic-shows-the-site-is-currently-offline-due-to-encountering-an-error-after-upgrade-from-4-4-to-5-1/33358/3 "2024-09-09T20:51:05Z")

</div>

No, as far as I remember initially installed Mautic using web, I have been using it for couple of years and I used to upgrade using web only.

---

<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:** [September 10, 2024, 10:05am UTC](https://forum.mautic.org/t/mautic-shows-the-site-is-currently-offline-due-to-encountering-an-error-after-upgrade-from-4-4-to-5-1/33358/4 "2024-09-10T10:05:17Z")

</div>

Okay, that is a no-go.  
You need to do it via command line.  
Not web.  
If you don’t have composer install that is also okay, but use the command line to upgrade

---

<div class="post-metadata">

**Author:** ![Joseph08](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joseph08/32/12645_2.png) [@Joseph08](https://forum.mautic.org/u/Joseph08)\
**Post date:** [September 10, 2024, 2:32pm UTC](https://forum.mautic.org/t/mautic-shows-the-site-is-currently-offline-due-to-encountering-an-error-after-upgrade-from-4-4-to-5-1/33358/5 "2024-09-10T14:32:20Z")

</div>

As I mentioned, I tried first using web and it failed.  
I restored mautic using backups and tried command line, executing the command as mentioned on the mautic page : [How to update Mautic — Mautic Documentation 0.1 documentation](https://docs.mautic.org/en/5.x/getting_started/how_to_update_mautic.html)  
But it failed.  
I then tried composer steps and it failed as well.

---

<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:** [September 11, 2024, 10:53am UTC](https://forum.mautic.org/t/mautic-shows-the-site-is-currently-offline-due-to-encountering-an-error-after-upgrade-from-4-4-to-5-1/33358/6 "2024-09-11T10:53:13Z")

</div>

Okay, let’s start from 0.  
Which is the version you are upgrading from?

---

<div class="post-metadata">

**Author:** ![Joseph08](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joseph08/32/12645_2.png) [@Joseph08](https://forum.mautic.org/u/Joseph08)\
**Post date:** [September 11, 2024, 11:06am UTC](https://forum.mautic.org/t/mautic-shows-the-site-is-currently-offline-due-to-encountering-an-error-after-upgrade-from-4-4-to-5-1/33358/7 "2024-09-11T11:06:37Z")

</div>

![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/e/ef7367c7148ee53ceff0c65be7283e94d4558827.png)  
to 5.1.  
Actually it only give me iption to upgrade to 5.1 when I execute the find command.

---

<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:** [September 11, 2024, 11:22am UTC](https://forum.mautic.org/t/mautic-shows-the-site-is-currently-offline-due-to-encountering-an-error-after-upgrade-from-4-4-to-5-1/33358/8 "2024-09-11T11:22:28Z")

</div>

Hi,  
So its a Mautic 4 → 5.1.  
That is good.  
What is the error you get when you upgrade via command line?

---

<div class="post-metadata">

**Author:** ![Joseph08](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joseph08/32/12645_2.png) [@Joseph08](https://forum.mautic.org/u/Joseph08)\
**Post date:** [November 10, 2025, 7:08am UTC](https://forum.mautic.org/t/mautic-shows-the-site-is-currently-offline-due-to-encountering-an-error-after-upgrade-from-4-4-to-5-1/33358/9 "2025-11-10T07:08:04Z")

</div>

Hey @joeyk  
I hope you are doing good.

I am back at Mautic, have been working on other priority items so couldn’t reply on this post.

I tried again, interestingly using command line mautic was upgraded successfully with the message : Success! You are now running version 5.2.8 of Mautic.  
But the site is still offline and below is the error message I saw in the logs file:

mautic.CRITICAL: Uncaught PHP Exception Twig\Error\RuntimeError: “An exception has been thrown during the rendering of a template (“Mautic\CoreBundle\Twig\Extension\AssetExtension::getOverridableUrl(): Return value must be of type string, bool returned”).” at /app/bundles/CoreBundle/Resources/views/Default/head.html.twig line 10 {“exception”:“[object] (Twig\Error\RuntimeError(code: 0): An exception has been thrown during the rendering of a template (“Mautic\CoreBundle\Twig\Extension\AssetExtension::getOverridableUrl(): Return value must be of type string, bool returned”). at /app/bundles/CoreBundle/Resources/views/Default/head.html.twig:10)\n[previous exception] [object] (TypeError(code: 0): Mautic\CoreBundle\Twig\Extension\AssetExtension::getOverridableUrl(): Return value must be of type string, bool returned at /app/bundles/CoreBundle/Twig/Extension/AssetExtension.php:132)”} {“hostname”:“\*”,“pid”:}

mautic.ERROR: Twig\Error\RuntimeError: An exception has been thrown during the rendering of a template (“Mautic\CoreBundle\Twig\Extension\AssetExtension::getOverridableUrl(): Return value must be of type string, bool returned”). - in file /app/bundles/CoreBundle/Resources/views/Default/head.html.twig - at line 10 {“hostname”:“”,“pid”:}

---

<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:** [November 10, 2025, 8:49am UTC](https://forum.mautic.org/t/mautic-shows-the-site-is-currently-offline-due-to-encountering-an-error-after-upgrade-from-4-4-to-5-1/33358/10 "2025-11-10T08:49:28Z")

</div>

> [@Joseph08](#):
>
> mautic.CRITICAL: Uncaught PHP Exception Twig\Error\RuntimeError: “An exception has been thrown during the rendering of a template (“Mautic\CoreBundle\Twig\Extension\AssetExtension::getOverridableUrl(): Return value must be of type string, bool returned”).” at /app/bundles/CoreBundle/Resources/views/Default/head.html.twig line 10 {“exception”:“[object] (Twig\Error\RuntimeError(code: 0): An exception has been thrown during the rendering of a template (“Mautic\CoreBundle\Twig\Extension\AssetExtension::getOverridableUrl(): Return value must be of type string, bool returned”). at /app/bundles/CoreBundle/Resources/views/Default/head.html.twig:10)\n[previous exception] [object] (TypeError(code: 0): Mautic\CoreBundle\Twig\Extension\AssetExtension::getOverridableUrl(): Return value must be of type string, bool returned at /app/bundles/CoreBundle/Twig/Extension/AssetExtension.php:132)”} {“hostname”:“\*”,“pid”:}
> 
> mautic.ERROR: Twig\Error\RuntimeError: An exception has been thrown during the rendering of a template (“Mautic\CoreBundle\Twig\Extension\AssetExtension::getOverridableUrl(): Return value must be of type string, bool returned”). - in file /app/bundles/CoreBundle/Resources/views/Default/head.html.twig - at line 10 {“hostname”:“”,“pid”:}

Did you refresh the cache?

---

<div class="post-metadata">

**Author:** ![Joseph08](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joseph08/32/12645_2.png) [@Joseph08](https://forum.mautic.org/u/Joseph08)\
**Post date:** [November 10, 2025, 2:27pm UTC](https://forum.mautic.org/t/mautic-shows-the-site-is-currently-offline-due-to-encountering-an-error-after-upgrade-from-4-4-to-5-1/33358/11 "2025-11-10T14:27:15Z")

</div>

Hello @joeyk ,

Yes, refreshed the cache with no luck.

Thanks

---

<div class="post-metadata">

**Author:** ![Joseph08](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joseph08/32/12645_2.png) [@Joseph08](https://forum.mautic.org/u/Joseph08)\
**Post date:** [November 10, 2025, 3:28pm UTC](https://forum.mautic.org/t/mautic-shows-the-site-is-currently-offline-due-to-encountering-an-error-after-upgrade-from-4-4-to-5-1/33358/12 "2025-11-10T15:28:53Z")

</div>

Hello @joeyk

I noticed when I load the site, the logs files shows twig errors for the below code : href=“{{ getOverridableUrl(‘images/favicon.ico’) }}”

Not sure if it is related, just wanted to share it with you.

Thanks,  
joseph.

---

<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:** [November 11, 2025, 8:54am UTC](https://forum.mautic.org/t/mautic-shows-the-site-is-currently-offline-due-to-encountering-an-error-after-upgrade-from-4-4-to-5-1/33358/13 "2025-11-11T08:54:36Z")

</div>

Are you using a custom skin in your Mautic or all the look and feel is default?

---

<div class="post-metadata">

**Author:** ![Joseph08](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joseph08/32/12645_2.png) [@Joseph08](https://forum.mautic.org/u/Joseph08)\
**Post date:** [November 11, 2025, 10:20am UTC](https://forum.mautic.org/t/mautic-shows-the-site-is-currently-offline-due-to-encountering-an-error-after-upgrade-from-4-4-to-5-1/33358/14 "2025-11-11T10:20:59Z")

</div>

We haven’t changed anything in mautic and have been it with defaul skin and plugins.
