Tag Archives: Plugins

Issue with WordPress Autoptimize Cache filling up cPanel Server Space.

Issue with Autoptimize Cache filling up cPanel Server Space.
As a temporary fix, just run a cron to delete all the cache files once an hour.
– I have only seen this issue with a Multisite install, but I haven’t had a problem on single site installs.

Log into cPanel go to CRONs

Under ‘Add a New Cron Job’ use the following settings:

Minute: 7
Hour: *
Day: *
Month: *
Weekday: *

Under the command section you need to first work out where your WordPress site is installed,
usually under cPanel it is under /home/[your_cpanel_username]/public_html/

Then you need to add the folder of the Autoptimize Cache folder, so the entire thing looks something like this:

/home/[your_cpanel_username]/public_html/wp-content/wp-content/cache/autoptimize/

Add the command rm -r at the start, put it all together and you have the right command:
!IMPORTANT! – The command rm -r will delete everything in the folder, if you get the path to the folder wrong, you could delete your entire website. You have been warned!

rm -r /home/[your_cpanel_username]/public_html/wp-content/wp-content/cache/autoptimize/

 

2016-01-14 10_20_04-cPanelX-CronJobs

So what we are doing is just at 7 minutes past the hour, of all hours, of all days, of all months, each weekday (that’s how you read the * in the cron) we delete all the files in the folder that we told it too.