Running Browsersync with a Simple WordPress Theme
I’m working on another simple WordPress theme and Browsersync provides a great way to automatically refresh your browser whenever a change is made. Usually you would include a sync tool in the build tool of your choice (Gulp, Grunt, etc.) but this also works by itself. Open your Terminal, install Browsersync (
npm install -g browser-sync),
cd into your theme directory, and paste this line in for it to “watch” your theme folder.
browser-sync start --proxy "local.wordpress.dev" --files "*.*"
Note that you’ll need to update the proxy address with whatever your development address is. Since I’m using VVV in this case, mine is local.wordpress.dev.