Seeing “Minify error: failed to open stream: No such file or directory” from W3 Total Cache? That message means the minify engine is trying to read a CSS or JS file from disk, but the file is not where PHP expects it to be. The plugin is asking for a path. PHP looks on the server, finds nothing, and throws the error.
The fix is almost always: make W3TC point at real files again and make sure the minify cache folders exist and are writable. Let’s go through it in a clean, step by step way.
W3 Total Cache is throwing “Minify error: failed to open stream: No such file or directory” for CSS/JS. What does this mean and how do I fix it?
If you’re wondering what’s broken: W3 Total Cache’s minify feature is trying to load a CSS or JS file that your server cannot find at the path it is using.
W3 Total Cache “minify” works by reading your CSS and JS files from disk, combining and shrinking them, and then serving a cached version from wp-content/cache/minify/.
When PHP logs something like:
Minify error: failed to open stream: No such file or directory
it means:
That usually comes from one of these situations:
wp-content/cache/minify/ folder is missing or not writable, so W3TC cannot create or read cache files.We’ll start by finding the exact file that is failing, then branch based on what you find.
You need the full error. It usually includes the file path that PHP could not open.
/home/account/public_html/wp-content/themes/your-theme/assets/js/app.js.wp-content/cache/minify/, for example /wp-content/cache/minify/1/c1399.css.If you have W3TC’s Minify error notification turned on, it may also show an admin notice naming the missing file. That is the file we care about.
wp-content/cache/minify/ and that file does not exist.Once you know which case you are in, use the matching fix below.
Example: you see an error for wp-content/plugins/old-plugin/assets/js/old.js, but that plugin is gone.
If the error disappears with Minify off, you just proved that W3TC minify is the source.
If you use manual Minify mode:
If you use auto Minify mode:
Turn Minify back on in Performance → General Settings, purge caches, and retest.
Example: WordPress lives in /public_html/site/, but the error path uses only /public_html/, or you are using symlinked directories.
This usually means W3TC is building paths from the wrong document root.
/public_html/site, URLs should look like https://example.com/site unless you use special rewrites.If the URLs are wrong, fix them and click Save Changes. Then purge all caches and test again.
W3TC has a setting to help when the server’s document root does not match the actual WordPress path (common with subdirectories, symlinks or some panels).
This tells W3TC to resolve file paths using the absolute WordPress path instead of only the server’s root, which often fixes incorrect minify paths.
If you use symlinked themes or plugins and see path related minify errors, keep in mind that W3TC’s file safety checks can also complain about those. In that case, you may need to exclude those files from minify to keep things simple.
Example: the error mentions /wp-content/cache/minify/1/c1399.css and that file is missing.
Here, the problem is usually the minify cache folder itself or permissions.
wp-content/cache/.minify does not exist, create it.wp-content, cache, and minify are owned by the web server user.If permissions and folders are correct, W3TC should now be able to create the missing .css or .js cache files on demand.
If this is a live site and the error is flooding logs or breaking pages, it is fine to turn Minify off while you sort out the root cause.
Your site will load without minification. Once things are stable, you can turn Minify back on and reintroduce it slowly.
If one specific file or plugin keeps causing minify problems, exclude it.
It is better to leave a few tricky files unminified than to have broken pages or constant “failed to open stream” notices.
Any time you:
plan to:
You are in a good spot when:
Minify error: failed to open stream: No such file or directory./wp-content/cache/minify/ files.Hit Continue Chat below and send me:
wp-content/cache/minify/... or to a theme/plugin file.I’ll help you track down the exact file and the cleanest way to fix or exclude it.
Scroll down to the contact form below. Enter your name, email, and WordPress needs. Atiba will get back to you as soon as possible.
WP Assistant is a free tool created by Atiba Software, a WordPress design and development company located in Nashville, TN. If you need more personalized WordPress assistance let us know, and we’ll get back to you ASAP!