Multisite cache/minify folder .htaccess updating issue
-
In recent months (starting around June 20th) I’ve started seeing an issue on a multisite install with the .htaccess file stored in the cache/minify folder.
First the file seems to constantly be getting updated which is part of the core of the problem. Each time it updates it changes the RewriteBase to the different mutlisite paths.
The problem comes up when I believe the traffic is unusually increased due to bots and such.
Normally the .htaccess ends with:
</IfModule> # END W3TC Minify core
But occasionally it’s like it gets updated while it’s already being updated and corrupts itself, causing the end of the file to look like different variations of:
</IfModule> # END WTC Minify core fy core
Where extra text is being leftover below the END line. It isn’t always exactly the same.
This is enough to completely break all the sites in that it causes errors for the loading of any css and js files linked in the cache folder, and since it’s outside the WTC Minify core block it doesn’t correct itself when it updates the next time. It also increases the process load when it’s broken.
So, first I’d like to ask does this file really need to be constantly rewriting itself? That would seem to be problematic to begin with. Isn’t there a more efficient way to handle minified cache for multisites?
For example does it need to be switching between:
RewriteBase /site1/wp-content/cache/minify/
RewriteBase /site2/wp-content/cache/minify/
RewriteBase /site3/wp-content/cache/minify/Could it not just stay static with:
RewriteBase /wp-content/cache/minify/
…since the blog paths for the assets still vary with the numerical id folders like:
/wp-content/cache/minify/1/
/wp-content/cache/minify/2/
/wp-content/cache/minify/3/So the multsite folder at the front would seem unnecessary to remain unique.
If that’s not possible, then when the .htaccess updates, it either needs to be designed to be more careful / strict or open the file with exclusive access so another sub-site’s process doesn’t try to update it at the same time.
I don’t know why this didn’t use to be a problem. Maybe the updating of the .htaccess file is a recent change or some other update is at play.
All I know is this has become an issue that may push to ditch this plugin entirely if not resolved since I can’t afford site’s failing in this manner.
Let me know what you think.
- The topic ‘Multisite cache/minify folder .htaccess updating issue’ is closed to new replies.