# Delete Cache And Site is offline

**URL:** <https://forum.mautic.org/t/delete-cache-and-site-is-offline/20999>\
**Category:** Product Support\
**Created:** [September 24, 2021, 9:18am UTC](https://forum.mautic.org/t/delete-cache-and-site-is-offline/20999 "2021-09-24T09:18:45Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![jin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/jin/32/5864_2.png) [@jin](https://forum.mautic.org/u/jin)\
**Post date:** [September 24, 2021, 9:18am UTC](https://forum.mautic.org/t/delete-cache-and-site-is-offline/20999/1 "2021-09-24T09:18:46Z")

</div>

**Your software**  
My Mautic version is:4  
My PHP version is:8.1  
My Database type and version is: Ubuntu 20.4

**Your problem**  
My problem is: Delete Cache And Site is offline.

These errors are showing in the log: The site is currently offline due to encountering an error. If the problem persists, please contact the system administrator.

#### System administrators, check server logs for errors.

Steps I have tried to fix the problem:

Hello there,

First of all, I think this is my fault.

Cache folder was located in public\_html/mautic/var

As I try to fix the setting “Configuration section” can not open and can not Import my list to Mautic. So  
I follow one of the YouTuber but did not realize that was in 2016.

The site is totally offline.

Do I have to re-install?

Regards,  
Jin

---

<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:** [September 24, 2021, 9:59am UTC](https://forum.mautic.org/t/delete-cache-and-site-is-offline/20999/2 "2021-09-24T09:59:36Z")

</div>

In mautic/var/logs you should have log files what do the logs from today say?

---

<div class="post-metadata">

**Author:** ![jin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/jin/32/5864_2.png) [@jin](https://forum.mautic.org/u/jin)\
**Post date:** [September 24, 2021, 10:23am UTC](https://forum.mautic.org/t/delete-cache-and-site-is-offline/20999/3 "2021-09-24T10:23:22Z")

</div>

Hey mzagmajster,

I deleted it today but The latest log is 2021/09/21

[2021-09-21 08:55:32] mautic.NOTICE: PHP Notice - SessionHandler::gc(): ps\_files\_cleanup\_dir: opendir(/var/lib/php/sessions) failed: Permission denied (13) - in file /home/mecandid/domains/mautic.mecandid.com/public\_html/vendor/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php - at line 106 {“maxlifetime”:1440}

---

<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:** [September 24, 2021, 11:02am UTC](https://forum.mautic.org/t/delete-cache-and-site-is-offline/20999/4 "2021-09-24T11:02:29Z")

</div>

Did you delete cache folder or just its contents? If you deleted the cache folder create ti again and make sure you give it the right permissions and user & group.

---

<div class="post-metadata">

**Author:** ![jin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/jin/32/5864_2.png) [@jin](https://forum.mautic.org/u/jin)\
**Post date:** [September 24, 2021, 8:11pm UTC](https://forum.mautic.org/t/delete-cache-and-site-is-offline/20999/5 "2021-09-24T20:11:31Z")

</div>

Only deleted the folder. I try to create the folder but can’t do it directly on the file. Sorry, I am not sure where and how to go to give permissions, is there any guideline I can find?

---

<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:** [September 24, 2021, 11:42pm UTC](https://forum.mautic.org/t/delete-cache-and-site-is-offline/20999/6 "2021-09-24T23:42:41Z")

</div>

Folder mautic/var/cache must exists so make sure you create it.

I do not know about the guide. If you are running Linux OS look into commands: mkdir, chown & chmod.

And in the future you should delete only the contents of mautic/var/cache, so something like:

rm -rf var/cache/prod/\* – That deletes your production cache (this is probably what you are using).

rm -rf var/cache/dev/\* - That deletes the cache if you run your instance in development mode.

You also have command php bin/console cache:clear but I find out the above commands are the most reliable.

---

<div class="post-metadata">

**Author:** ![jin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/jin/32/5864_2.png) [@jin](https://forum.mautic.org/u/jin)\
**Post date:** [September 26, 2021, 1:52am UTC](https://forum.mautic.org/t/delete-cache-and-site-is-offline/20999/7 "2021-09-26T01:52:13Z")

</div>

Hey mzagmajster, Thank you so much. I will look into it!

---

<div class="post-metadata">

**Author:** ![jin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/jin/32/5864_2.png) [@jin](https://forum.mautic.org/u/jin)\
**Post date:** [September 26, 2021, 3:20am UTC](https://forum.mautic.org/t/delete-cache-and-site-is-offline/20999/8 "2021-09-26T03:20:48Z")

</div>

I managed to create a folder and gave permission but the site is still offline. What do I have to do? Thank you

---

<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:** [September 26, 2021, 12:02pm UTC](https://forum.mautic.org/t/delete-cache-and-site-is-offline/20999/9 "2021-09-26T12:02:32Z")

</div>

Hi, I do not have much to go on here. If you want, I can look into your installation and try to figure out what went wrong. Shoot me PM if you are up for it.

---

<div class="post-metadata">

**Author:** ![jin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/jin/32/5864_2.png) [@jin](https://forum.mautic.org/u/jin)\
**Post date:** [September 26, 2021, 8:47pm UTC](https://forum.mautic.org/t/delete-cache-and-site-is-offline/20999/10 "2021-09-26T20:47:40Z")

</div>

Hey mzagmajster, appreciated that. I will re-install it. Thank you for your reply here.

---

<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:** [September 27, 2021, 1:42pm UTC](https://forum.mautic.org/t/delete-cache-and-site-is-offline/20999/11 "2021-09-27T13:42:20Z")

</div>

have you run chown on the entire mautic directory ?  
Did you install any new plugins ?

---

<div class="post-metadata">

**Author:** ![jin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/jin/32/5864_2.png) [@jin](https://forum.mautic.org/u/jin)\
**Post date:** [September 27, 2021, 11:04pm UTC](https://forum.mautic.org/t/delete-cache-and-site-is-offline/20999/12 "2021-09-27T23:04:12Z")

</div>

Hey mikew,  
The files are not showing after I extracted Mautic zip in Virtualmin. Still searching for how to fix this.
