by Ivijan-Stefan Stipic on WordPress.org
Serve WordPress cleanly over .onion with URL rewriting, Onion-Location, and privacy hardening.

Onionify Settings
Onionify is an independent plugin that enables WordPress websites to operate seamlessly through onion services (.onion).
This plugin is not affiliated with or endorsed by the Tor Project.
Onionify adds safe and standards-compliant integration for onion access – rewriting runtime URLs when requests arrive via .onion, preventing canonical redirects that might expose onion visitors to the clearnet, optionally adding the official Onion-Location HTTP header, and applying additional privacy-hardening measures (CSP, COEP, oEmbed and resource hints control) specifically for onion traffic.
The plugin follows WordPress.org guidelines and is designed for secure public distribution:
⚠ Warning: This plugin does not provide hosting-level anonymity or concealment of infrastructure. Onionify helps WordPress handle requests that arrive via onion service addresses, but it does not change or hide server configuration, hosting provider information, or other infrastructure-level metadata. If you require infrastructure-level protections or specialized operational procedures, consult authoritative technical documentation and qualified operational security professionals. Do not rely on this plugin for legal compliance or for anonymizing hosting details.
home or siteurl values – all rewrites occur at runtime only.onion_is_onion_request and onion_verify_exit_list).wp tor-onion list – show mapping table (multisite) or single-site status.wp tor-onion map – map blog_id (or 0 for single-site) to an onion host.wp tor-onion set --hardening=on|off --oembed=on|off --csp=strict|relaxed|off – quick toggles.abcd1234xyz.onion. Leave empty to use Network Default (multisite).Onion-Location: http:// header to requests on the clearnet site. This is useful to advertise your onion mirror to Tor Browser or other clients.Strict, Relaxed, Off, Custom.
'unsafe-inline'), useful for older themes.CSP mode is set to Custom.1) Minimal secure WordPress (no external CDN):
default-src 'self';
script-src 'self';
style-src 'self' 'unsafe-inline';
img-src 'self' data:;
font-src 'self' data:;
connect-src 'self';
frame-src 'self';
frame-ancestors 'self';
base-uri 'self';
form-action 'self';
2) Relaxed (allows inline JS):
default-src 'self';
script-src 'self' 'unsafe-inline';
style-src 'self' 'unsafe-inline';
img-src 'self' data:;
font-src 'self' data:;
connect-src 'self';
frame-src 'self';
3) If you must use an external CDN – add only the exact host(s):
img-src 'self' https://cdn.example.com data:;
font-src 'self' https://cdn.example.com data:;
Tips & cautions:
– Start with Strict; if things break (admin bar, theme JS), switch to Relaxed.
– Use Custom only if you know CSP; incorrect CSP can break admin, media, or login.
– Avoid including public CDNs in onion mode where possible – best privacy practice is to host assets locally.
apply_filters('onion_is_onion_request', bool $is_tor, array $server)$server is a copy of $_SERVER.apply_filters('onion_verify_exit_list', bool $default)define('TOS_VERIFY_TOR_EXIT', true); – alternative to enable exit-list verification in wp-config.php.onion_support_* option names used by the plugin: see Settings page. The plugin cleans up these options on uninstall.If you do not want automatic cleanup, do not use the admin “Delete” action; deactivate only.
wp-config.php configuration after verifying your allowed hosts.This plugin can optionally fetch the official Tor exit relay list to verify requests against Tor exits.
Service: Tor Project – Exit addresses list
Endpoint: https://check.torproject.org/exit-addresses
What it is used for: When exit verification is enabled, the plugin downloads the public list of Tor exit relays to check inbound requests.
What data is sent and when: The plugin performs a normal HTTP GET request from the server to the Tor Project endpoint. No user PII is sent; the request includes a generic User-Agent header and, as with any HTTP request, the server’s IP address is visible to the Tor Project. This request happens at most once per 24 hours due to caching and only if exit verification is enabled by the site owner.
How to enable/disable: Exit verification is opt-in. It is disabled by default. It can be enabled via the plugin settings or by adding define(‘TOS_VERIFY_TOR_EXIT’, true) in wp-config.php. If your environment blocks external HTTP requests (WP_HTTP_BLOCK_EXTERNAL), the plugin will respect that unless the host is whitelisted in WP_ACCESSIBLE_HOSTS.
Provider policies: See the Tor Project privacy policy and terms on their official website.
Use the WordPress.org support forum for the plugin. For commercial help or customizations contact https://infinitumform.com/.