If you have been using Mautic for an extended period of time, and you feel, that the loading time is increasing, there are three things you can do immediately to help the situation:
This is a no-brainer, probably you’ve read it somewhere already. However I need to mention it, because it is the first thing you should do.
In order to clear the cache, you need to access your server via SSH, navigate to your Mautic install’s directory, and execute this command in your command line:
rm -rf app/cache/*
Or Use a plugin:
If you need to do this pretty often, you can also download a brand new 3rd party plugin, that helps you to do it in a more civilized way. The plugin is available here for free. (Well not free, you’ll pay with your email address, but you are a marketer, so you are used to it.)
If your mysql database is bloated, you could do some cleanup to speed things up to ensure instant relief and lower your CPU usage. Mautic tends to save all kind of data. One of them is audit logs. You can clean them up by accessing your server via ssh.
Before you clean your data mindlessly, let’s do a dry run:
php /path/to/mautic/app/console mautic:maintenance:cleanup --days-old=365 --dry-run
Once you ran this code, you can see what information will be deleted. If you have a huge audit log, you should clear it out.
What exactly is audit log? Mautic saves information about viewing customer data to make sure you know which staff member looked at your contact’s data and when.
The old logs can be deleted forever once you remove the –dry run part of the command. (This is irreversible, so make sure you know what you are doing.)
php /path/to/mautic/app/console mautic:maintenance:cleanup --days-old=365
If you have issues with your Mautic installations, you’ll get notifications regularly at your dashboard in the left upper corner, next to the Mautic logo.
If you have a large contact list, these notifications can flood your database, and generate multiple gigabytes of data. The result will be an extremely slow Mautic app. Look at this database, over 6 million notifications:
You can purge all the notifications by clicking on ‘Empty’ in your PhpMyAdmin.
I hope the above mentioned solutions helped to speed up your Mautic install!