Mautic Cache: Clean and adjust Permissions

Mautic Cache: Clean and adjust Permissions

For Mautic to work correctly you must apply the appropriate permissions to the root directory of your installation and also clear the Mautic cache.

Symfony – PHP Framework used to develop Mautic – caches objects, sessions, etc. to improve application performance.

You should perform these operations from time to time and whenever you update Mautic or adjust the Database.

Check which user is configured on your Apache / Nginx to run PHP. In most cases it is www-data, but on some servers it can be root or another.

Cleaning the Mautic Cache

You can simply remove the Mautic app / cache folder so that the cache is removed and redone. But Mautic himself offers two commands that do all the work of cleaning and heating the cache. I recommend that you use these two commands:

php app/console cache:clear
php app/console cache:warmup

Adjusting file permissions in Mautic

The command below reflects most installations of Mautic on Debian / Ubuntu using Apache or NGINX:

chown -R www-data:www-data .
chmod -R g+rw .

What we did in the first command was to set the file owner recursively -R for the user and the www-data group, which is responsible for running PHP through its web server.

The second command modifies the access permissions to the files saying that the www-data group has written and read access.

Related Articles


Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.