Roots Discourse

Wordpress links and Browsersync server

Hi,

I’m on Windows and I’m trying to use Sage with Wordpress. I have fresh installations of both Sage 9.0.9 and Wordpress latest version. I can start a localhost:3000 for the site index, where I get the syncing after scss/js/php files change. The problem is that every link of this page, mainly the example post that comes with a basic WP installation, has a different address, which is the one I have set up for my local Wordpress installation, which is http://local.sage2021.net. Thus, every time I click on a link it brings me outside the browser sync server address. It goes from http://localhost:3000 to http://local.sage2021.net/[something], losing all the syncing and stuff. I have configured the config.json according to the guide. What do I do wrong?

{

  "entry": {

    "main": [

      "./scripts/main.js",

      "./styles/main.scss"

    ],

    "customizer": [

      "./scripts/customizer.js"

    ]

  },

  "publicPath": "/wp-content/themes/sage2021",

  "devUrl": "http://local.sage2021.net",

  "proxyUrl": "http://localhost:3000",

  "cacheBusting": "[name]_[hash:8]",

  "watch": [

    "app/**/*.php",

    "config/**/*.php",

    "resources/views/**/*.php"

  ]

}

Does it work with this Sage update release?

When I type the installation command, I got:

[Seld\JsonLint\ParsingException]
“” does not contain valid JSON
Parse error on line 1:
{type:vcs,url:https:/
^
Expected one of: ‘STRING’, ‘}’

I’m on Windows, Composer 1.10.20.

Update: I had to escape the json double quotes so it worked. But now I got:

GitHub API limit (60 calls/hr) is exhausted, could not fetch https://api.github.com/repos/strarsis/sage. Create a GitHub OAuth token to go over the API rate limit. You can also wait until 2021-02-12 16:38:49 for the rate limit to reset.

I’m going to wait so and retry.

It would be much better if you create a GitHub OAuth token instead. Then you don’t have these very constrained limits and you don’t need to wait.

Done. Still the same problem.
Although this release has fixed the hot-updates issue.

Ok, I think I got It. It was a wrong configuration about Wordpress site url.
Good, seems to work now!

Please mark my answer as solution to mark this discussion as solved.