# Site is offline after update to 6.0

**URL:** <https://forum.mautic.org/t/site-is-offline-after-update-to-6-0/35401>\
**Category:** Mautic 6 Install/Upgrade Support\
**Created:** [March 29, 2025, 9:16pm UTC](https://forum.mautic.org/t/site-is-offline-after-update-to-6-0/35401 "2025-03-29T21:16:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajlowndes](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ajlowndes/32/13749_2.png) [@ajlowndes](https://forum.mautic.org/u/ajlowndes)\
**Post date:** [March 29, 2025, 9:16pm UTC](https://forum.mautic.org/t/site-is-offline-after-update-to-6-0/35401/1 "2025-03-29T21:16:14Z")

</div>

Front end shows 500 error and a message “The site is currently offline due to encountering an error. If the problem persists, please contact the system administrator.”

architecture: using a LAMP on Ubuntu installation. Old version: going to restore my droplet snapshot I took just before the update attempt and report back.

system (terminal) record to show you what I did and when:

```auto
➜ html cd mautic 
➜ mautic php bin/console mautic:update:find
Version 6.0.0 of Mautic is available for download. Please visit https://github.com/mautic/mautic/releases/tag/6.0.0 for more information.
To update, you can run 'php bin/console mautic:update:apply' from the command line.
➜ mautic php bin/console mautic:update:apply
Are you sure you wish to update Mautic to the latest version? y
Step 7 [------->--------------------] Clearing the cache

<warning>IMPORTANT: Run the same command again with --finish. For example 'php bin/console mautic:update:apply --finish'</warning>
➜ mautic php bin/console mautic:update:apply --finish
Step 2 [============================] Success! You are now running version 6.0.0 of Mautic.

➜ mautic php bin/console mautic:update:find
Great! You are running the current version of Mautic.
➜ mautic cat /var/log/apache2/error.log
[Sat Mar 29 00:00:03.858113 2025] [mpm_prefork:notice] [pid 2122728] AH00163: Apache/2.4.58 (Ubuntu) OpenSSL/3.0.13 configured -- resuming normal operations
[Sat Mar 29 00:00:03.858154 2025] [core:notice] [pid 2122728] AH00094: Command line: '/usr/sbin/apache2'
[Sat Mar 29 07:59:08.098895 2025] [core:error] [pid 2626492] [client 183.215.230.24:36148] AH10244: invalid URI path (/cgi-bin/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/bin/sh)
[Sat Mar 29 07:59:09.668670 2025] [core:error] [pid 2627150] [client 183.215.230.24:37628] AH10244: invalid URI path (/cgi-bin/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/bin/sh)
➜ mautic cat /var/log/apache2/error.log
[Sat Mar 29 00:00:03.858113 2025] [mpm_prefork:notice] [pid 2122728] AH00163: Apache/2.4.58 (Ubuntu) OpenSSL/3.0.13 configured -- resuming normal operations
[Sat Mar 29 00:00:03.858154 2025] [core:notice] [pid 2122728] AH00094: Command line: '/usr/sbin/apache2'
[Sat Mar 29 07:59:08.098895 2025] [core:error] [pid 2626492] [client 183.215.230.24:36148] AH10244: invalid URI path (/cgi-bin/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/bin/sh)
[Sat Mar 29 07:59:09.668670 2025] [core:error] [pid 2627150] [client 183.215.230.24:37628] AH10244: invalid URI path (/cgi-bin/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/bin/sh)

```

After update (right before I read the apache error log) the front-end error was shown.  
Last 3 lines of [installation folder]/var/logs/mautic\_prod-2025-03-29.php show these errors at every page refresh:

```auto
[2025-03-29T21:05:39.847819+00:00] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Filesystem\Exception\IOException: "Cannot rename "/tmp/url_matching_routes.phpaZAVQO" to "/var/www/html/mautic/var/cache/prod/url_matching_routes.php": rename(/tmp/url_matching_routes.phpaZAVQO,/var/www/html/mautic/var/cache/prod/url_matching_routes.php): Permission denied" at /var/www/html/mautic/vendor/symfony/filesystem/Filesystem.php line 320 {"exception":"[object] (Symfony\\Component\\Filesystem\\Exception\\IOException(code: 0): Cannot rename \"/tmp/url_matching_routes.phpaZAVQO\" to \"/var/www/html/mautic/var/cache/prod/url_matching_routes.php\": rename(/tmp/url_matching_routes.phpaZAVQO,/var/www/html/mautic/var/cache/prod/url_matching_routes.php): Permission denied at /var/www/html/mautic/vendor/symfony/filesystem/Filesystem.php:320)"} {"hostname":"lamponubuntu2404-s-2vcpu-4gb-syd1-01","pid":2666623}
[2025-03-29T21:05:39.899063+00:00] mautic.CRITICAL: Exception thrown when handling an exception (Twig\Error\RuntimeError: An exception has been thrown during the rendering of a template ("Unable to write in the cache directory (/var/www/html/mautic/var/tmp/twig/1b)."). at /var/www/html/mautic/app/bundles/CoreBundle/Resources/views/Error/500.html.twig line 1) {"exception":"[object] (Twig\\Error\\RuntimeError(code: 0): An exception has been thrown during the rendering of a template (\"Unable to write in the cache directory (/var/www/html/mautic/var/tmp/twig/1b).\"). at /var/www/html/mautic/app/bundles/CoreBundle/Resources/views/Error/500.html.twig:1)\n[previous exception] [object] (RuntimeException(code: 0): Unable to write in the cache directory (/var/www/html/mautic/var/tmp/twig/1b). at /var/www/html/mautic/vendor/twig/twig/src/Cache/FilesystemCache.php:57)"} {"hostname":"lamponubuntu2404-s-2vcpu-4gb-syd1-01","pid":2666623}
[2025-03-29T21:05:39.906156+00:00] mautic.ERROR: Twig\Error\RuntimeError: An exception has been thrown during the rendering of a template ("Unable to write in the cache directory (/var/www/html/mautic/var/tmp/twig/1b)."). - in file /var/www/html/mautic/app/bundles/CoreBundle/Resources/views/Error/500.html.twig - at line 1 [] {"hostname":"lamponubuntu2404-s-2vcpu-4gb-syd1-01","pid":2666623}

```

---

<div class="post-metadata">

**Author:** ![ajlowndes](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ajlowndes/32/13749_2.png) [@ajlowndes](https://forum.mautic.org/u/ajlowndes)\
**Post date:** [March 29, 2025, 9:28pm UTC](https://forum.mautic.org/t/site-is-offline-after-update-to-6-0/35401/2 "2025-03-29T21:28:19Z")

</div>

From old (working) version - full system info page: [https://pastebin.com/raw/6vnGVQKv](https://pastebin.com/raw/6vnGVQKv)

Pre-update-attempt version: Mautic 5.2.2 - app/prod (env: prod, debug: false)

---

<div class="post-metadata">

**Author:** ![raramuridesign](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/raramuridesign/32/13226_2.png) [@raramuridesign](https://forum.mautic.org/u/raramuridesign)\
**Post date:** [May 8, 2025, 7:07am UTC](https://forum.mautic.org/t/site-is-offline-after-update-to-6-0/35401/3 "2025-05-08T07:07:47Z")

</div>

@ajlowndes  
It looks like it was a permissions error.  
YOu should ensure the update is not run using the root user but the project user.  
Then check that files/folders have the same user  
Clear your cache and it should be fine.

Take time to read the error again - the answer was there.

- Permission denied"
- Unable to write in the cache directory

Hope this helps  
Matt
