Quick summary
On Windows 10, creating a site with a specific WordPress version (e.g. 6.8, 6.9) fails with “Cannot set up WordPress while offline”, even when the machine has a working internet connection. Creating a site with latest works.
Root cause: Studio’s isOnline() check (tools/common/lib/network-utils.ts) uses dns.resolve(), which fails on Windows when the bundled Node.js v24 reports DNS servers as 127.0.0.1 (known Node.js/c-ares regression: nodejs/node#62748). The OS resolver and system Node.js on the same machine work correctly.
This is not the same root cause as #3153 (SSL/cURL certificate issue), which shows the same user-facing error message.
Steps to reproduce
- Install WordPress Studio 1.10.0 on Windows 10 (build 19045).
- Confirm internet works (browser, etc.).
- Open Studio → Add site → choose a WordPress version other than
latest (e.g. 6.8 or 6.9).
- Complete the form and create the site.
- (Optional diagnostic) Run with Studio’s bundled Node:
$node = "$env:LOCALAPPDATA\studio_app\app-1.10.0\resources\bin\node.exe"
& $node -e "console.log('getServers:', require('dns').getServers()); require('dns/promises').resolve('public-api.wordpress.com').catch(e=>console.log(e.code, e.message))"
- (Optional) Compare with system Node:
node -e "console.log('getServers:', require('dns').getServers()); require('dns/promises').resolve('public-api.wordpress.com').then(console.log)"
What you expected to happen
The site should be created with the selected WordPress version when the machine has internet access.
What actually happened
Site creation fails with:
Cannot set up WordPress while offline. Specific WordPress versions require an internet connection. Try using "latest" version or ensure internet connectivity.
Studio log excerpt:
[CLI - …] Checking WordPress version…
[CLI - …] Validating site configuration…
[CLI - …] Creating site directory…
Error occurred in handler for 'createSite': CliCommandError: [Last error message] Cannot set up WordPress while offline. …
On affected systems, bundled Node reports getServers: [ '127.0.0.1' ] and dns.resolve() returns ECONNREFUSED, while system DNS and Resolve-DnsName public-api.wordpress.com succeed.
Affected code path: desktop app forks bundled node.exe + resources/cli/main.mjs (apps/studio/src/modules/cli/lib/execute-command.ts), then isOnline() in tools/common/lib/network-utils.ts gates non-latest installs in apps/cli/commands/site/create.ts.
Impact
Some (< 50%)
Available workarounds?
No but the app is still usable
Platform
Windows
Logs or notes
Environment
- OS: Windows 10 (build 19045)
- Studio: 1.10.0 (commit
206258631711953a003bba8b933c0cf75e95baf7 from app logs)
- Locale: pt-BR
- System DNS:
192.168.0.1 (router)
- Bundled Node: v24.14.1 (c-ares 1.34.6) —
dns.getServers() → ['127.0.0.1']
- System Node: v22.5.1 — resolves DNS correctly
Reproduction confirmed
- Without workaround: WP 6.8 and 6.9 fail in Studio UI (2026-06-06 and 2026-06-10).
- With
latest: succeeds.
latest uses bundled files under ~/.studio/server-files/wordpress-versions/latest and does not depend on isOnline().
Suggested fix (for maintainers)
Replace dns.resolve() with dns.lookup() in tools/common/lib/network-utils.ts, since lookup() uses the OS resolver and is unaffected by the c-ares regression.
Related
I am planning to submit a PR with a fix in network-utils.ts in the coming days.
Quick summary
On Windows 10, creating a site with a specific WordPress version (e.g. 6.8, 6.9) fails with “Cannot set up WordPress while offline”, even when the machine has a working internet connection. Creating a site with
latestworks.Root cause: Studio’s
isOnline()check (tools/common/lib/network-utils.ts) usesdns.resolve(), which fails on Windows when the bundled Node.js v24 reports DNS servers as127.0.0.1(known Node.js/c-ares regression: nodejs/node#62748). The OS resolver and system Node.js on the same machine work correctly.This is not the same root cause as #3153 (SSL/cURL certificate issue), which shows the same user-facing error message.
Steps to reproduce
latest(e.g. 6.8 or 6.9).What you expected to happen
The site should be created with the selected WordPress version when the machine has internet access.
What actually happened
Site creation fails with:
Studio log excerpt:
On affected systems, bundled Node reports
getServers: [ '127.0.0.1' ]anddns.resolve()returnsECONNREFUSED, while system DNS andResolve-DnsName public-api.wordpress.comsucceed.Affected code path: desktop app forks bundled
node.exe+resources/cli/main.mjs(apps/studio/src/modules/cli/lib/execute-command.ts), thenisOnline()intools/common/lib/network-utils.tsgates non-latestinstalls inapps/cli/commands/site/create.ts.Impact
Some (< 50%)
Available workarounds?
No but the app is still usable
Platform
Windows
Logs or notes
Environment
206258631711953a003bba8b933c0cf75e95baf7from app logs)192.168.0.1(router)dns.getServers()→['127.0.0.1']Reproduction confirmed
latest: succeeds.latestuses bundled files under~/.studio/server-files/wordpress-versions/latestand does not depend onisOnline().Suggested fix (for maintainers)
Replace
dns.resolve()withdns.lookup()intools/common/lib/network-utils.ts, sincelookup()uses the OS resolver and is unaffected by the c-ares regression.Related
latestwhennavigator.onLine === false; does not cover this CLI false positive)I am planning to submit a PR with a fix in
network-utils.tsin the coming days.