Autoptimize conflict with admin access
-
Hi
The plugin Autoptize is causing page loading issues when trying to access the admin area of my WordPress site.I troubleshooted with my host WPEngine and found that when the plugin is activated any of the pages in the admin area that I try to load keeps trying to reload and prevent me from using the admin area.
WP Engine support representative found a fairly similar problem here https://www.ads-software.com/support/topic/reloads-page-constantly/page/2/ , although this thread is about users using another plugin to automatically clear the cache within Autoptimize. I have a following code snippet that automatically clears autoptimize cache if it goes beyond 256MB.
// Automatically clear autoptimizeCache if it goes beyond 256MB if (class_exists('autoptimizeCache')) { $myMaxSize = 256000; # You may change this value to lower like 100000 for 100MB if you have limited server space $statArr=autoptimizeCache::stats(); $cacheSize=round($statArr[1]/1024); if ($cacheSize>$myMaxSize){ autoptimizeCache::clearall(); header("Refresh:0"); # Refresh the page so that autoptimize can create new cache files and it does breaks the page after clearall. } }
Can you help me solve this issue so I can reactivate the plugin.
Thank you
LyseThe page I need help with: [log in to see the link]
- The topic ‘Autoptimize conflict with admin access’ is closed to new replies.