Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support browser-sync not running on same domain as wordpress #277

Open
axelson opened this issue Mar 27, 2017 · 1 comment
Open

Support browser-sync not running on same domain as wordpress #277

axelson opened this issue Mar 27, 2017 · 1 comment

Comments

@axelson
Copy link

axelson commented Mar 27, 2017

I use Varying Vagrant Vagrants (https://github.com/Varying-Vagrant-Vagrants/VVV) to host my wordpress sites in Vagrant during development. Thus, my wordpress development is done with a domain like http://my-new-cool-site.dev

This means that the existing browser-sync setup does not work because it assumes that the browser-sync server is running on the same domain/hostname that wordpress is running on (http://my-new-cool-site:3000.dev), but that is incorrect. Instead we need to point browser-sync to http://localhost:3000

I accomplished this with two changes. Replace HOST with localhost in gulp/core/templates/browser-sync-snippet.js and add socket: { domain: 'localhost:3000' } to gulp/config/browser-sync.js. Ideally this wouldn't require any changes to the "core" template.

@kubarazny
Copy link

kubarazny commented Mar 29, 2017

I made this changes, but I still get an error: "Cannot GET /" I have installed wordpress at localhost:80/wordpress

EDiT:

i add to config proxy: 'localhost/wordpress/' but I have blank page now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants