Forced to run "wp blade compile" or I get Warning: file_put_contents() ERROR


I am starting using Sage, also thanks to @knowler and @strarsis help.

What I am facing now is a browsersync issue, I guess, as, once I update a blade template, unless I launch a wp compile command I keep receiving a warning attached to the page and no updates to the code are reflected…

Warning : file_put_contents(/Users/matteo/Sites/ failed to open stream: Permission denied in /Users/matteo/Sites/ on line 122

no real premisison though, as if I run wp blade compile the output is correctly updated…


How are you hosting that site? Vagrant? Docker? WAMP? Linux system?

Mysql + PHP on localhost, for now…

remotely it will be hosted by netsons

Why are you running the wp blade compile command after updating Blade templates? In most situations you shouldn’t need to do that, just refreshing the page should be sufficient.

that’s why I am asking in this forum…
even if I have a “watching” message, if I refresh the page no JS nor CSS changes take effect.

I need to re-run yarn start each time :exploding_head:

Any warnings or errors in the JavaScript console on the browsersync’ed page?

Unluckily (but also a bit obviously :wink: ) not! :frowning:

there’s only one strange error:

Failed to load resource: the server responded with a status of 404 (Not Found)

but my styles are applied…
don’t know if this could be a symptom of something weird happening…

This seems to be normal though, the styles are streamed/applied by BrowserSync instead.

so what can I check/do?
working in this way is totally impossible as I have to stop the watcher CTRL + C and then yarn (re)start each time… crazy…
even for a minor JS console log check…
not viabile in this way…

said a stupid thing :frowning:

You may also try:

unfortunately this is already my config:

new BrowserSyncPlugin({
      proxyUrl: config.proxyUrl,
      delay: 1500,
      advanced: {
        browserSync: {
          cors: true,

same issues…

CHROME EDIT: chrome returns another error.

GET 404 (Not Found)

safari doesn’t

found the solution.

low chance anyone else would face this one: MY MISTAKE.

instead of going ahead on localhost:3000 URL, I kept working on local path written in nginx config (

This topic was automatically closed after 42 days. New replies are no longer allowed.