# After Cache-delete "The site is currently offline due to encountering an error"

**URL:** <https://forum.mautic.org/t/after-cache-delete-the-site-is-currently-offline-due-to-encountering-an-error/19159>\
**Category:** Product Support\
**Tags:** mautic-3\
**Created:** [April 24, 2021, 10:04am UTC](https://forum.mautic.org/t/after-cache-delete-the-site-is-currently-offline-due-to-encountering-an-error/19159 "2021-04-24T10:04:18Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![imihandstand](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/imihandstand/32/1499_2.png) [@imihandstand](https://forum.mautic.org/u/imihandstand)\
**Post date:** [April 24, 2021, 10:04am UTC](https://forum.mautic.org/t/after-cache-delete-the-site-is-currently-offline-due-to-encountering-an-error/19159/1 "2021-04-24T10:04:18Z")

</div>

**Your software**  
My Mautic version is: 3.2.4 (but I think I always had this issue, even with 2.x)  
My PHP version is: 7.3.27

**Your problem**  
When I try to delete the **" _var/cache_ "** or **" _var/cache/prod_ "** folder via **FTP** , Mautic always breaks and shows just an " _The site is currently offline due to encountering an error_ " error. Even after an hour and multiple page-refreshs, it doesn’t work.

[On Github](https://github.com/mautic/mautic/issues/9933) I got advised doing [this file-permission-reset](https://docs.mautic.org/en/troubleshooting/file-ownership-and-permissions), which I did. It didn’t fix my problem.

These errors are showing in the log:  
Nothing.

---

<div class="post-metadata">

**Author:** ![ekke](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ekke/32/296_2.png) [@ekke](https://forum.mautic.org/u/ekke)\
**Post date:** [April 26, 2021, 10:56am UTC](https://forum.mautic.org/t/after-cache-delete-the-site-is-currently-offline-due-to-encountering-an-error/19159/2 "2021-04-26T10:56:47Z")

</div>

Sounds like a permissions issue indeed.  
can you show us the rights for `var` and `var/cache` (via the `dir` command in FTP, or `ls -l` in ssh)

> [@imihandstand](#):
>
> but I think I always had this issue

Then how did you solve it in previous cases?

Best,  
Ekke

* * *

Ekke Guembel

**Mautic Open Source Project, Team Lead “Community”**  
Mail: [ekke.guembel@mautic.org](mailto:ekke.guembel@mautic.org)  
Phone: +49 511 6262 9311  
Profile & Social Media: [Ekkehard Gümbel](http://Leuchtfeuer.com/ekke)  
Mautic Podcast: [mauticast.de](http://mauticast.de) (DE) / [mauticast.com](http://mauticast.com) (EN)

---

<div class="post-metadata">

**Author:** ![imihandstand](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/imihandstand/32/1499_2.png) [@imihandstand](https://forum.mautic.org/u/imihandstand)\
**Post date:** [April 26, 2021, 1:15pm UTC](https://forum.mautic.org/t/after-cache-delete-the-site-is-currently-offline-due-to-encountering-an-error/19159/3 "2021-04-26T13:15:00Z")

</div>

> [@ekke](#):
>
> can you show us the rights for `var` and `var/cache`

Both are 755, and so is “prod” too.

> [@ekke](#):
>
> Then how did you solve it in previous cases?

Usually I just put back a backup of the cache-folder (DropMySite makes daily backups of my Mautic-files). A few days ago, when I posted this issue, I did the same.

---

<div class="post-metadata">

**Author:** ![ekke](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ekke/32/296_2.png) [@ekke](https://forum.mautic.org/u/ekke)\
**Post date:** [April 26, 2021, 4:16pm UTC](https://forum.mautic.org/t/after-cache-delete-the-site-is-currently-offline-due-to-encountering-an-error/19159/4 "2021-04-26T16:16:25Z")

</div>

755 - but owner being the same user under which the webserver is running ?

---

<div class="post-metadata">

**Author:** ![imihandstand](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/imihandstand/32/1499_2.png) [@imihandstand](https://forum.mautic.org/u/imihandstand)\
**Post date:** [April 26, 2021, 5:17pm UTC](https://forum.mautic.org/t/after-cache-delete-the-site-is-currently-offline-due-to-encountering-an-error/19159/5 "2021-04-26T17:17:11Z")

</div>

> [@ekke](#):
>
> 755 - but owner being the same user under which the webserver is running ?

Sorry, but I don’t know too much about these server-things. I have 1 username, and I use always that for accessing FTP, SSH, WHM and cPanel. I might have a “root” user too, but I never use that.

> [@ekke](#):
>
> can you show us the rights for `var` and `var/cache` (via the `dir` command in FTP, or `ls -l` in ssh)

I now googled a bit to see how that “ls -l” works, and here is what I got using them:

```
drwxr-xr-x 6 myusername myusername 4096 Apr 24 07:07 var/
drwxr-xr-x 5 myusername myusername 4096 Apr 24 06:12 cache/

```

---

<div class="post-metadata">

**Author:** ![ekke](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ekke/32/296_2.png) [@ekke](https://forum.mautic.org/u/ekke)\
**Post date:** [April 27, 2021, 4:34am UTC](https://forum.mautic.org/t/after-cache-delete-the-site-is-currently-offline-due-to-encountering-an-error/19159/6 "2021-04-27T04:34:25Z")

</div>

> Sorry, but I don’t know too much about these server-things. I have 1 username, and I use always that for accessing FTP, SSH, WHM and cPanel. I might have a “root” user too, but I never use that.

No worries. If the `var` folder (and probably the other Mautic folders too) are all owned by your user, the webserver will be running on that account too.

Anyway, 2 1/2 more checks please:

- Just to confirm: var/cache ist still empty? Please do an  
`ls -l`  
within that folder.

- Please do another clear cache:  
`php bin/console mautic:cache:clear`  
What does it report?

- Immediately thereafter, try  
`tail var/logs/mautic_prod-2021-04-27.php` (or what ever is)  
What messages are displayed?

---

<div class="post-metadata">

**Author:** ![imihandstand](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/imihandstand/32/1499_2.png) [@imihandstand](https://forum.mautic.org/u/imihandstand)\
**Post date:** [April 27, 2021, 12:59pm UTC](https://forum.mautic.org/t/after-cache-delete-the-site-is-currently-offline-due-to-encountering-an-error/19159/7 "2021-04-27T12:59:25Z")

</div>

> [@ekke](#):
>
> Just to confirm: var/cache ist still empty?

No, because as said I uploaded there a backup of it, otherwise I wouldn’t be able to access/use Mautic. So at the moment this is the content of var/cache:

```
total 16
drwxr-xr-x 2 imicp imicp 4096 Apr 24 06:12 ip_data/
-rw-r--r-- 1 imicp imicp 3247 Apr 26 05:15 languageList.txt
drwxr-xr-x 8 imicp imicp 4096 Apr 26 13:49 prod/
drwxr-xr-x 2 imicp imicp 4096 Apr 27 09:00 run/

```

> [@ekke](#):
>
> Please do another clear cache:

This command doesn’t seem to do anything at all. It doesn’t say anything in Terminal after doing it, and neither do the files in FTP disappear.

> [@ekke](#):
>
> `tail var/logs/mautic_prod-2021-04-27.php` (or what ever is)

Just totally unrelated errors I had earlier today (I tried to send for the 1st time segment-emails, and didn’t work somehow).

---

<div class="post-metadata">

**Author:** ![imihandstand](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/imihandstand/32/1499_2.png) [@imihandstand](https://forum.mautic.org/u/imihandstand)\
**Post date:** [April 29, 2021, 1:09pm UTC](https://forum.mautic.org/t/after-cache-delete-the-site-is-currently-offline-due-to-encountering-an-error/19159/9 "2021-04-29T13:09:09Z")

</div>

**SOLVED!** I read at “[_ERR\_BUILD\_M3\_CACHE: Failed to build cache for Mautic 3_](https://forum.mautic.org/t/err-build-m3-cache-failed-to-build-cache-for-mautic-3-all-your-data-has-been-successfully-migrated-to-mautic-3-but-this-error-very-likely-needs-to-be-fixed-before-you-can-start-using-mautic-3/15569)” that somebody had upgrade-problems and I found similar errors in my log today. Than the user @imrodmartin revealed that’s **because of an outdated plugin**. I deleted than the Plugin “ **MauticExtendeeToolsBundle** ” (which generated the errors) and now deleting the cache-folder is not a problem anymore.

For future searchers: The error was:

`[27-Apr-2021 14:54:22 UTC] ReflectionException: Class "Mautic\CoreBundle\EventListener\CommonSubscriber" not found while loading "MauticPlugin\MauticExtendeeToolsBundle\EventListener\ButtonSubscriber". - in file /mywebsite/mautic/vendor/symfony/config/Resource/ClassExistenceResource.php - at line 181`

@ekke Thank you very much for trying to help me! 🙂

---

<div class="post-metadata">

**Author:** ![ekke](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ekke/32/296_2.png) [@ekke](https://forum.mautic.org/u/ekke)\
**Post date:** [April 30, 2021, 6:32am UTC](https://forum.mautic.org/t/after-cache-delete-the-site-is-currently-offline-due-to-encountering-an-error/19159/10 "2021-04-30T06:32:42Z")

</div>

oh wow - thanks a lot for sharing!  
🙂
