The site is using Elementor, LearnDash, MemberPress, ACF Pro, and Timber at the moment (I usually just build with the last two plugins). I am developing locally using VVV and automating my builds with Gulp, which proxies the VVV address to localhost.
At first, this plugin didn’t work because it was trying to use “localhost” to “ping” Browsersync. When I changed it to the IP address Browsersync uses for external devices, it started working, but it reloads constantly, even without any changes to the WordPress database.
My thinking is maybe Elementor (or any of the other plugins) are updating constantly, perhaps looking for licenses or whatever, but they could be the root of the issue. I also cannot get the logs to output to a file even after using the code provided in the description and setting up debugging in my wp-config.php. Any tips would be greatly appreciated and I will try on a simpler server to try and isolate the issue. Great job on the plugin though!
]]>You will need to follow the install instructions carefully. And, the big prerequisite is knowing how to set up Browsersync of course. Knowing Gulp would be even better. If you aren’t comfortable wading through PHP and JavaScript, this plugin might be too intimidating. But, I highly recommend giving it a try because it will save you tons of dev time. Assuming you have a local WordPress dev env and are working on a lot of WordPress sites.
I did find a teeny bug (typo) that can be easily fixed. If you run into it too, then change “emssage” to “message” on line 275 in the trigger-browsersync.php file. I posted about this in the support forum.
If you have any issues at all with the set up, I suggest turning on your PHP debugging and telling the Trigger Browsersync plugin to log events via a filter. See the plugin details page.
A couple FYIs
1) This plugin does not seem to watch PHP and CSS updates. I have Gulp file that instantiates Browsersync reloads my browser on any PHP and CSS file changes. This setup runs perfectly with this plugin. I didn’t have to change a thing in my Gulp file.
2) There has not been any plugin updates for 9 months at the time of this post.
]]>The Classic editor, on rendering the edit screen for a page, shows the permalink correctly as //localhost:3000
– as the interception and rewriting of the dev URL happens on render of the HTML. If I edit the page and it shows “Post Updated” then the link goes correctly to //localhost:3000/my-page/
.
In Gutenberg, this does not happen. The URLs remain as the dev site URL, meaning that the View Post URLs, and the Preview buttons don’t work – they take you away from the browsersync enabled development environment.
This is obviously because those URLs are being generated and injected directly by Javascript rather than rendered in the page HTML. I just don’t know how to resolve it.
Does anyone know if there’s a way round this?
]]>