Mautic Community Forums

Please How are CACHES deleted Mautic 3?

My software Mautic 3.0.2
My PHP version is : 7.3
MySQL/MariaDB version is 10.3

My problem is :
Please i am having a difficult time locating the CACHE folder in my mautic 3
When i go to App folder the cahe folder cant be found there as it was in version 2.1.6.3

I found that the cache folder is now located in the VAR folder

Steps I have tried to fix the problem

When i deleted the whole content in the cache folder inside the VAR

I practically got my mautic 3 broken and cant re-login, regardless of how many times i refresh my login page.

But as soon as i restored the the deleted PROD folder inside the Cache folder my mautic instance becomes accessible.

Please how are the caches deleted in Mautic 3?

In my mautic 2 i followed this same process and after 1 or 2 refreshes my instance would come back on with a fresh cache folder, but appears this isnt so with M3,

Please i will appreciate any help i can get to fix this. thank you

This works for me:

sudo -u www-data rm -rf /var/www/mautic/var/cache/*

Thank you for your help

Please will this command work for centeos7/Linus environment?

Sorry if my question sound lame please

I am not a developer.

Thanks in advance

Yeah, that should work. Another way you could do this is using:

sudo -u www-data php /var/www/mautic/bin/console cache:clear

I am using www-data cos that is the owner of my mautic directory, if you use the above command, you should get an output like so:

 // Clearing the cache for the prod environment with debug false


[OK] Cache for the "prod" environment (debug=false) was successfully cleared.

Thank you again…

But how do i tell the owner of my mautic directory here please??

this is what my directory looks like
/home/beginnersbase/public_html/mauticstage/var

i use cpanel to manage mautic, but i can use the terminal to run commands if i am properly guided.

i appreciate your help

The owner of your var would likely be www-data, but you can confirm that by running:

ls -l

I guess i messed it up

this are the outcomes on the terminal:

[root@vpserver ~]# /home/beginnersbase1/public_html/mauticstage/
-bash: /home/beginnersbase1/public_html/mauticstage/: Is a directory
[root@vpserver ~]# sudo -u www-data
sudo: unknown user: www-data
sudo: unable to initialize policy plugin
[root@vpserver ~]# cd /home/beginnersbase1/public_html/mauticstage/
[root@vpserver mauticstage]# sudo -u
sudo: option requires an argument – ‘u’
usage: sudo -h | -K | -k | -V
usage: sudo -v [-AknS] [-g group] [-h host] [-p prompt] [-u user]
usage: sudo -l [-AknS] [-g group] [-h host] [-p prompt] [-U user] [-u user]
[command]
usage: sudo [-AbEHknPS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p
prompt] [-T timeout] [-u user] [VAR=value] [-i|-s] []
usage: sudo -e [-AknS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p
prompt] [-T timeout] [-u user] file …
[root@vpserver mauticstage]# sudo -u www-data
sudo: unknown user: www-data
sudo: unable to initialize policy plugin
[root@vpserver mauticstage]#

hmm, what did you get when you executed ls -l

or do this:
ls -l /home/beginnersbase/public_html/mauticstage

is the owner www-data?

I GOT SOMETHING NOW

[root@vpserver mauticstage]# ls -l /home/beginnersbase1/public_html/mauticstage
total 112
drwxr-xr-x 7 beginnersbase1 beginnersbase1 4096 Aug 5 02:55 app
drwxr-xr-x 2 beginnersbase1 beginnersbase1 4096 Aug 5 02:55 bin
-rw-r–r-- 1 beginnersbase1 beginnersbase1 12862 Aug 5 02:55 favicon.ico
-rw-r–r-- 1 beginnersbase1 beginnersbase1 634 Aug 5 02:55 index.php
-rw-r–r-- 1 beginnersbase1 beginnersbase1 38419 Aug 5 02:55 LICENSE.txt
drwxr-xr-x 2 beginnersbase1 beginnersbase1 4096 Aug 5 02:26 mautic-3-temp-files
drwxr-xr-x 7 beginnersbase1 beginnersbase1 4096 Aug 5 02:26 media
-rw-r–r-- 1 beginnersbase1 beginnersbase1 4043 Aug 5 02:55 offline.php
drwxr-xr-x 15 beginnersbase1 beginnersbase1 4096 Aug 6 18:05 plugins
-rw-r–r-- 1 beginnersbase1 beginnersbase1 224 Aug 5 02:55 robots.txt
-rw-r–r-- 1 beginnersbase1 beginnersbase1 1317 Aug 5 02:55 SECURITY.md
drwxr-xr-x 19 beginnersbase1 beginnersbase1 4096 Aug 5 02:55 themes
drwxr-xr-x 2 beginnersbase1 beginnersbase1 4096 Aug 5 02:55 translations
drwxr-xr-x 3 beginnersbase1 beginnersbase1 4096 Aug 5 02:56 upgrade
drwxr-xr-x 6 beginnersbase1 beginnersbase1 4096 Aug 8 13:04 var
drwxr-xr-x 69 beginnersbase1 beginnersbase1 4096 Aug 5 02:56 vendor
[root@vpserver mauticstage]#

What do i do now?

beginn… is the owner of the directory, do you have a folder named bin inside the mautic directory?

edit: nevermind, I saw that :slight_smile:

Now, run the following command:

sudo -u beginnersbase1 php /home/beginnersbase1/public_html/mauticstage/bin/console cache:clear

Please should this be pasted and run in one word or line?

check my edit, and it should be paste in one line, /var/www/mautic/bin/console won’t work for you, use this:

sudo -u beginnersbase1 php /home/beginnersbase1/public_html/mauticstage/bin/console cache:clear

Image example:

Thank you @devsrealm
:smiling_face_with_three_hearts:

today is my lucky day i guess. I am grateful for helping me fix this. God bless you

Here:
[root@vpserver mauticstage]# sudo -u beginnersbase1 php /home/beginnersbase1/public_html/mauticstage/bin/console cache:clear

// Clearing the cache for the prod environment with debug
// false

[OK] Cache for the “prod” environment (debug=false) was successfully cleared.

Content-type: text/html; charset=UTF-8

[root@vpserver mauticstage]#

2 Likes

Glad it worked bro, and God bless u too :slight_smile:.

Today I initiated my first campaign and Mautic got hanged for 6 hours. Still I can not open dashboard or login through main page. Troubleshooting suggest to clear cache

  1. To clear the cache, I can not see the “/app/cache” folder (but there is AppCache.php )
  2. “http://[your-mautic-url]/s/update/schema” this method too is giving error

I do not know if I am doing it right, but I made this command: . I am entering this comand in Terminal app in Cpanel provided by my hosting. (my Mautic subdomain is connect.joyloan.in)

sudo -u joylocxl php /home4/joylocxl/connect.joyloan.in/bin/console cache:clear

Comand terminal is giving following output. I do not know what it means

sudo: effective uid is not 0, is /bin/sudo on file system with no “souid” option set or an NFS file system without root privilages?

Can you please help me clear the cache? Hope my Mautic will work after that

Can you tell us version of mautic are you using?

The cache on Mautic 3.x is located at var/cache not app/cache

If all else fails, go to var/cache/prod and delete the contents. Refresh your browser

It is 3.1. I installed it just 2-3 weeks ago. Even made a recent update. So, it is latest, but I do not know where to see version.

The cache folder is in var/cache. I deleted all the contents of that folder. But this error of 500 persists.

“Update/schema” method is also giving error. What else can be wrong?

In the error log it is showing hundreds of errors.

But I can access the Mautic, except dashboard and using login ID and password.

When I use “Update/schema” method, I see the error, but still I can see the other things, including setting section.

i cant think of a reason to run update schema manually. That was the process of your update if you use command line and not clicking the notification. <----Never do that

The version of your mautic is in the bottom right corner of screen but if you cant see screen due to 500 error I understand.

I would start a new post and describe the system you are using and the errors from the log

I was trying as this method (Update/schema) was given in Mautic troubleshooting.

Today was my first newsletter sending, so I do not know what is what.

I can see the error logs by bypassing the login screen. (when I do “Update/schema”, it gives me some error, but I can go in to setting and see errors)