I've been trying to set up BrowserSync for my WordPress theme running locally with Local by Flywheel. Basically I followed this guide: https://fraserclark.com/blog/laravel-mix-with-wordpress

However, the page will hot reload only when changes in my CSS and JS files are being made - changes in my PHP files don't trigger anything. Even after hard refreshing the page myself, the changes still won't reflect in the proxy URL BrowserSync creates. They will appear in the Local URL fine though.

From what I have read, it seems like this could be because BrowserSync needs body tags for the script it inserts but the PHP files are all split up.

That blog post doesn't mention anything though so I'm at a loss. I've tried specifying the files in the mix.browserSync options parameter in the different ways below, but I get the same result. I'd be grateful if anyone could share what might be going wrong.

  proxy: `http://<my-site>.local`,
  files: [


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.