{"id":51324052,"url":"https://github.com/alfiosalanitri/wordpress-plugin-cloudflare-tunnel-for-local-development","last_synced_at":"2026-07-01T16:30:47.427Z","repository":{"id":350464909,"uuid":"1206879268","full_name":"alfiosalanitri/wordpress-plugin-cloudflare-tunnel-for-local-development","owner":"alfiosalanitri","description":"A WordPress plugin that exposes your local development site via Cloudflare Tunnel, rewriting URLs on the fly only when requests arrive through the tunnel.","archived":false,"fork":false,"pushed_at":"2026-04-10T13:57:06.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-10T14:29:09.740Z","etag":null,"topics":["cloudflare","developer-tools","plugin","tunneling","wordpress"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alfiosalanitri.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-10T10:46:31.000Z","updated_at":"2026-04-10T13:57:11.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/alfiosalanitri/wordpress-plugin-cloudflare-tunnel-for-local-development","commit_stats":null,"previous_names":["alfiosalanitri/wordpress-plugin-cloudflare-tunnel-for-local-development"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/alfiosalanitri/wordpress-plugin-cloudflare-tunnel-for-local-development","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alfiosalanitri%2Fwordpress-plugin-cloudflare-tunnel-for-local-development","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alfiosalanitri%2Fwordpress-plugin-cloudflare-tunnel-for-local-development/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alfiosalanitri%2Fwordpress-plugin-cloudflare-tunnel-for-local-development/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alfiosalanitri%2Fwordpress-plugin-cloudflare-tunnel-for-local-development/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alfiosalanitri","download_url":"https://codeload.github.com/alfiosalanitri/wordpress-plugin-cloudflare-tunnel-for-local-development/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alfiosalanitri%2Fwordpress-plugin-cloudflare-tunnel-for-local-development/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35015052,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-01T02:00:05.325Z","response_time":130,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloudflare","developer-tools","plugin","tunneling","wordpress"],"created_at":"2026-07-01T16:30:46.958Z","updated_at":"2026-07-01T16:30:47.422Z","avatar_url":"https://github.com/alfiosalanitri.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cloudflare Tunnel for Local Development\n\nA WordPress plugin that exposes your local development site via Cloudflare Tunnel, rewriting URLs on the fly **only** when requests arrive through the tunnel. Accessing `localhost` directly is never affected.\n\n---\n\n## How it works\n\nWhen a request arrives from the Cloudflare Tunnel host, the plugin:\n\n- Rewrites `site_url`, `home_url`, `content_url`, `plugins_url`, theme URIs and upload URLs to the tunnel URL\n- Sets `$_SERVER['HTTPS'] = 'on'` and `SERVER_PORT = 443` — no need to touch `wp-config.php`\n- Runs an output buffer as a safety net, rewriting any hardcoded URLs left in the final HTML (including JSON-encoded URLs inside Gutenberg blocks)\n- Prevents redirect loops by removing `redirect_canonical` and intercepting `wp_redirect`\n\nWhen a request arrives from `localhost`, **nothing changes** — WordPress behaves exactly as normal.\n\n---\n\n## Requirements\n\n- WordPress 6.0+ installed and working on http://localhost or http://localhost:port. See: [https://github.com/alfiosalanitri/wordpress-with-docker](https://github.com/alfiosalanitri/wordpress-with-docker)\n- PHP 8.0+\n- [Cloudflare Tunnel](https://developers.cloudflare.com/tunnel/downloads/) installed on your development machine\n\n---\n\n## Installation\n\n1. Download the latest `cloudflare-tunnel-for-local-development.zip` from the [Releases](../../releases/latest) page\n2. In WordPress go to **Plugins → Add New → Upload Plugin**\n3. Upload the zip and activate\n\n---\n\n## Usage\n\n**1. Start the tunnel on your machine:**\n\n```bash\ncloudflared tunnel --url http://localhost:8001\n```\n\nCloudflare will output a URL like `https://xxxx.trycloudflare.com`.\n\n**2. Configure the plugin:**\n\nGo to **Settings → CF Tunnel / Local Dev** and:\n- Paste the tunnel URL (must start with `https://`)\n- Check **\"Attiva la riscrittura degli URL per le richieste dal tunnel\"**\n- Save\n\n**3. Share the tunnel URL** — visitors hitting `https://xxxx.trycloudflare.com` will see your local site with all assets loading correctly.\n\nYou can leave the plugin enabled permanently. From `localhost` everything works as before; the rewriting only activates for tunnel requests.\n\n---\n\n## Uninstall\n\nDeactivating or uninstalling the plugin removes all stored options (`cflt_tunnel_url`, `cflt_tunnel_enabled`) from the database automatically.\n\n---\n\n## License\n\nGPL-2.0-or-later — see [LICENSE](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falfiosalanitri%2Fwordpress-plugin-cloudflare-tunnel-for-local-development","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falfiosalanitri%2Fwordpress-plugin-cloudflare-tunnel-for-local-development","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falfiosalanitri%2Fwordpress-plugin-cloudflare-tunnel-for-local-development/lists"}