Skip to main content
← All guides

Share a local WordPress site with a client without deploying it

Why qURL here

Your WordPress site stays on your machine, with no copy to host and nothing for the client to install: they open one link, once, in their browser, and your WordPress login still applies. Two defines in wp-config.php keep WordPress-generated URLs on their address, and removing them puts the site back the way it was.

See how qURL compares to ngrok →

The WordPress settings this guide touches

The WordPress settings this guide touches
SettingWhat it doesWhat to set for a qURL review
WP_HOMEOverrides the home option, the address WordPress builds its links from, without changing the database. WordPress says the URL reverts to the database value if the line is removed.The HTTPS origin from the client’s address bar, only for requests through qURL
WP_SITEURLOverrides the siteurl option, where WordPress’s own files are: wp-admin, wp-login.php, scripts and styles. Also an override that leaves the database alone.The same origin, plus the subdirectory if WordPress is not at the root of the port
$_SERVER['HTTPS']What is_ssl() reads. WordPress’s HTTPS documentation says a site behind a reverse proxy that provides SSL, hosted itself without SSL, otherwise goes into an infinite redirect loop.'on' inside the same block: the client’s browser is on https, while the request reaches WordPress over http
COOKIE_DOMAINThe domain set on WordPress cookies, which WordPress offers for unusual domain setups.Leave it unset. Cookies are then host-only for the hostname in the client’s address bar, so the login cookie stays on their preview address.

Steps

WordPress builds links and canonical redirects from its home and siteurl options, so a local site opened through a tunnel can send the browser back to localhost. InstaWP avoids this by hosting a copy; ngrok rewrites the Host header to localhost; Local Live Links need a Local account. With qURL™ by LayerV, publish the site, send the client one single-use link, and set WP_HOME and WP_SITEURL in wp-config.php to their exact browser origin.

  1. Find the port your local WordPress answers on

    qurl publish accepts only a loopback address: http://127.0.0.1:PORT, http://localhost:PORT or [::1]. MAMP, Docker and wp server each pick their own port; the example uses 8888. Local’s default Router Mode answers on a .local domain through a router on port 80 that picks the site by hostname, which a qURL request does not carry. Its help page describes a second mode under Preferences > Advanced > Router Mode, localhost, in which each site is reached directly at localhost on a dedicated port such as 10005; Local notes that sites in that mode can’t use HTTPS or Live Links. Use that mode and port for Local. Replace 8888 below with yours.

    curl -sS -o /dev/null -w "%{http_code}\n" http://127.0.0.1:8888/

    Check: The command prints 200, or 301 or 302 if the front page redirects. “Connection refused” means nothing listens on that port: check the port in your local WordPress tool.

  2. Install the qURL CLI

    On macOS, install it with Homebrew. On Linux and Windows, download the package for your platform from the latest release; the CLI page lists each one. Nothing asks you to sign up.

    brew install layervai/tap/qurl
    brew upgrade qurl
    qurl --version
  3. Publish the site

    The first qurl publish creates this device’s identity, starts a background service that keeps serving after you close the terminal, and prints the site’s CRID. The name is the public text the client sees on the opener page before the site loads, so name the project, not the client. The resource is private: nobody can open it until you share a link. Publishing the same address again reuses the resource and its CRID.

    qurl publish http://127.0.0.1:8888 --name "Spring site" -o json

    Check: The reply shows private: true and the resource’s CRID.

  4. Prepare WordPress to show the client their preview hostname

    Bind the web server to loopback for MAMP, wp server and Docker alike; the Host check is not access control. On your local development site, put this block before wp-settings.php and before any existing WP_HOME or WP_SITEURL definitions. Move those existing local definitions after this block and guard each one, for example defined("WP_HOME") || define("WP_HOME", "http://localhost:8888"); do the same for WP_SITEURL with its existing value. PHP constants can be defined only once per request. Leave the preview origin empty for the first visit. Requests through qURL will show a short message before WordPress or its plugins can redirect the browser to localhost. Local visits still use your existing settings.

    // wp-config.php, before existing URL definitions and wp-settings.php (development only)
    $preview_origin = '';
    $request_host = parse_url( 'http://' . ( $_SERVER['HTTP_HOST'] ?? '' ), PHP_URL_HOST );
    if ( is_string( $request_host ) && substr( strtolower( $request_host ), -10 ) === '.qurl.site' ) {
        if ( $preview_origin === '' ) {
            header( 'Cache-Control: no-store' );
            header( 'Content-Type: text/plain; charset=utf-8' );
            exit( 'Send the site owner the hostname in your address bar and keep this tab open.' );
        }
        define( 'WP_HOME', $preview_origin );
        define( 'WP_SITEURL', $preview_origin );
        $_SERVER['HTTPS'] = 'on';
    }

    Check: Open the site locally. The homepage still loads with its original address.

  5. Set the preview origin for this client

    Set $preview_origin in the block to https:// followed by the exact hostname the client saw. Use an HTTPS origin with no trailing slash or path, and verify that its hostname ends in .qurl.site; the Host PHP receives identifies the connector and differs from the client’s browser hostname. WordPress now uses WP_HOME for site links and WP_SITEURL for core files. If the core files are installed in a subdirectory, append that path to WP_SITEURL. The HTTPS flag tells WordPress that the browser used HTTPS even though its local connection uses HTTP. The database keeps its original settings. This block supports one preview origin at a time.

    Check: Use the actual origin from this visit. A new share link can have a different origin.

  6. Ask the client to reload the same tab

    If the preview message persists immediately after the edit, allow PHP’s opcode cache to revalidate and reload the same tab. The styles arrive, WordPress-generated site links use their preview address, and wp-admin asks for the WordPress login as it does for you. Give them a WordPress account with only the role the review needs; qURL decides who reaches the site, and your login decides what they can do in it.

    Check: On the client’s side: pages, their links and the wp-admin login all stay on the recipient’s HTTPS origin, with no mixed-content warning and no jump to localhost.

  7. Remove the block when the review ends

    Remove the block when finished. For another review, clear $preview_origin first. WordPress says the URL reverts to the database value as soon as the line is gone, so nothing needs undoing in the database. An unopened link ends at its --ttl and the client’s session at its --session-duration. qurl stop stops serving the site until qurl start; qurl delete retires the resource for good after asking you to confirm.

    qurl stop <CRID>     # pause; qurl start <CRID> resumes
    qurl delete <CRID>   # permanent; asks you to confirm

What the recipient sees

The client opens the link in a browser, sees the resource’s name and your publisher name on the opener page, and sees a message asking for the preview hostname.

More

After you set the origin in wp-config.php, the client reloads the same tab to see the site. WordPress page links, stylesheets and the wp-admin login use the preview origin. Opening the same link again shows “Access link invalid”.

Ways to show a client a local WordPress site

Each row follows the vendor’s own pages in the sources below, checked on 2026-11-19.

Ways to show a client a local WordPress site
OptionWhere the site runsWhat the client needsNotes from the vendor’s docs
Local Live LinksOn your machine, while the site and the Local app are runningA browser and the Privacy Mode username and passwordNeeds a Local account. Each link is HTTPS with Privacy Mode enabled, and the URL stays the same across sessions. Local staff on the community forum say the link stays up only while the site and Local app run and the machine is online, and that Live Links are not meant as a long-term, permanent view of the site.
InstaWPA copy of the site in InstaWP’s cloudA browser; InstaWP says no login and no setupTemporary sites expire after 2 days by default; a permanent site stays until you delete it. Starts at a $2 sandbox; an InstaWP blog post says it no longer offers a free plan for new sites.
ngrokOn your machine, through an ngrok endpoint URLA browserngrok’s WordPress example uses a Traffic Policy that rewrites the Host header of every request to localhost so WordPress accepts them, and ngrok then rewrites the Location header of responses to match the endpoint URL. The --host-header flag is marked deprecated in favour of traffic policy.
qURLOn your machineA browser; the link opens onceNo account for you or the client. WP_HOME and WP_SITEURL are set to the client’s browser origin in wp-config.php, and the site’s own WordPress login still applies.

Sources: Local: Live Links, Local: Live Links overview, Local community forum: Live Link troubleshooting (staff reply), InstaWP, InstaWP docs: permanent site, InstaWP blog: choosing a site plan, ngrok docs: WordPress example, ngrok docs: HTTP endpoints, ngrok docs: agent CLI, qURL access behaviour, CLI README.

Troubleshooting

Troubleshooting
If you seeDo this
The client clicks a link or opens wp-admin and lands on localhostWP_HOME and WP_SITEURL are not in effect for this host. Check that the block sits above the require_once of wp-settings.php, that the configured origin matches the one the client sent, and that the hostname your server passes to PHP ends in .qurl.site. WordPress builds links from the home option and the canonical redirect from the site URL, so until the override applies they point at localhost.
The client’s browser reports too many redirectsis_ssl() is false: WP_HOME says https while WordPress believes the request is http, so it redirects between the two. Keep $_SERVER['HTTPS'] = 'on' in the block. The X-Forwarded-Proto check from WordPress’s HTTPS documentation does not help here, because qURL forwards http.
Show 10 more fixes
More troubleshooting
If you seeDo this
The page loads but styles are missing, or the browser warns about mixed contentAsset URLs are being built with http. Check that both defines start with https:// and that $_SERVER['HTTPS'] = 'on' is in the block. If a page cache serves HTML built before the change, clear it or disable it for the review.
wp-admin login loops back to the login page, or says cookies are blockedA cookie set for another host is not sent back. Remove any COOKIE_DOMAIN define that names localhost or your .local domain so cookies stay host-only for the client’s hostname, then ask them to clear cookies for the preview address and sign in again.
The client’s browser went to localhost before they could copy the addressA redirect fired on the first request: a redirect, maintenance or coming-soon plugin, or a site that requires login on every page. Leave $preview_origin empty and place the block before wp-settings.php loads. Check the web server for redirects that run before PHP. Leave the site’s access controls enabled.
The web server or a security plugin answers with a host error or 400Something checks the Host header before WordPress does. The request reaches your machine with Host c-….qurl.site, so allow that host, or the .qurl.site suffix, in the server block or plugin setting that rejects it. Local’s router picks sites by hostname: use its localhost Router Mode and port instead. Allow a tunnel’s hostname in your dev server →
qurl publish says the local app is not accepting TCP connectionsStart the app first and check that curl works on the same address. qurl publish connects to localhost as 127.0.0.1, so if your app listens only on IPv6 (on macOS or Linux, lsof -iTCP -sTCP:LISTEN -nP shows [::1]), publish 'http://[::1]:PORT' instead, or start the dev server with --host 127.0.0.1 and publish that address. Neither requires listening on your LAN. Keep the quotes: zsh treats the brackets as a pattern.
The recipient sees “Access link invalid”The link was already used or has expired. Run qurl share again and send the new link.
The recipient sees “Resource not found”The resource was deleted after the link was made. Publish the app again, then run qurl share and send the new link.
publish rejects http://127.0.0.1 with “only HTTPS URLs are allowed”, asks you to log in, or prints no Access: lineYour qURL CLI is out of date. On macOS run brew update, then brew upgrade qurl; elsewhere install the latest release. After updating, qurl --version prints 3.4.1 or later, and every publish is private by default.
publish says this Linux session “can’t reach a systemd user manager”You are in a container or sandbox without a user service manager. Run qurl publish with --foreground; sharing lasts as long as that process runs. Container and CI setup →
publish says “Quota Exceeded” with “protected resource limit reached”, or “Your qURL account has reached a plan limit”You can see this without an account: a device with no account can keep up to 3 active resources, with links that last up to 24 hours. Run qurl list --status active, then qurl delete <CRID> for any you no longer need (it asks you to confirm; --yes skips that). qurl stop keeps the resource, so it does not free a slot.

Frequently Asked Questions

Why does WordPress redirect my client to localhost?

WordPress stores its address in the home and siteurl options and builds absolute URLs from them: the links on every page, the stylesheet and script URLs, the login redirect, and the canonical redirect, which WordPress describes as redirecting incoming links to the proper URL based on the site url. On your machine those options say localhost, so a page opened on any other hostname sends the browser there. WP_HOME and WP_SITEURL in wp-config.php override them for the review without changing the database.

Can I build WP_HOME from $_SERVER['HTTP_HOST'] instead of a fixed value?

Not through qURL. The client’s browser uses its own preview hostname, but the request reaches WordPress with Host c-….qurl.site, so a WP_HOME built from HTTP_HOST produces c-… links the browser cannot use. WordPress also warns that HTTP_HOST is created dynamically by PHP from the request’s Host header and can allow file inclusion vulnerabilities. Match a fixed suffix and set a fixed value, as the block in this guide does.

Does the client need an account or an install?

No. A qURL link from qurl share opens in a browser with no account and nothing to install, and the first qurl publish creates your device identity without an account either. The client signs in to WordPress only if they open wp-admin, with the WordPress account you give them.

Can the client look without any wp-config change?

Only partly. The front page comes through the qURL link, but its stylesheet and script URLs point at localhost, so it arrives without styles, and any absolute link, the login, or a canonical redirect sends them to localhost. The two defines take a minute and come out again when the review ends, so make the change.

Who else can reach my app while the link is open?

Opening the link starts a session for that browser, which lasts 1 hour by default. After a browser opens it, another browser on the same public IP cannot use its access. A script or agent that opens the link without a browser is admitted by its network address instead, which other devices on that public IP share until the session ends. A link admits whoever opens it: the API’s IP and country rules do not apply to the signed links qurl share issues. Keep your app’s own sign-in for anything sensitive.

How do Local Live Links work?

Local describes Live Links as a way to share the progress of a Local site with a client or teammate without moving it to a remote server. You need a Local account and to log in from the Local app; each link is HTTPS with Privacy Mode enabled, so the client enters a username and password; and each site gets a continuous, unique link that stays the same across sessions. A Local staff reply on the community forum says the link stays up only while the site and the Local app are running and the machine is online, and that Live Links are not meant as a long-term, permanent view of the site. Local’s documentation does not say which plan tiers or limits apply. In Local’s localhost Router Mode, which this guide uses, Local notes that sites can’t use Live Links.

Does my computer have to stay on?

Yes. The app is served from your machine, so the machine and the app must be running and connected. The background service reconnects after sleep, but the app is unavailable while the machine is asleep.

Show the client now

Publish the port your WordPress answers on and send one person a link that opens once. Then set WP_HOME and WP_SITEURL to the hostname they land on.

Or use the CLI →

Book a pilot

Tell us what to hide. We’ll scope a pilot.

Enterprise starts with a paid pilot on one application, typically 60 to 90 days, credited in full toward year one if you convert within 60 days. After that, an annual package sized to what you protect, not per seat.