Absolute-to-Relative URLs
If you were to use this on a website like http;//example.com/test/testing/, you would get results like these:
Consider an alternative
Absolute-to-Relative URLs shows warning signs in 2026 — compare the alternatives below before installing. It runs on 10+ sites, is rated 5/5 and was last updated 14 years ago, and scores 30/100 on our health check.
- Small user base (10+ active installs)
- Very few reviews so far
- No update in 13 years
- Only tested up to WordPress 3.4 (latest is 7.1)
How does it stack up?
Side-by-side on installs, updates, ratings & supportDaily downloads
Download spikes usually follow a new release — each site that auto-updates counts as a download.
Rankings
Where Absolute-to-Relative URLs stands todayWordPress.org search rankings
Live position in the plugin search, top 100| Keyword | Position |
|---|---|
| absolute | >100 |
| function | >100 |
| link | >100 |
| links | >100 |
Version adoption
Share of active sites per release.
Rating breakdown
★★★★★★★★★★ 5 from 2 reviews
About Absolute-to-Relative URLs
From the official readme · v0.3.4Description
If you were to use this on a website like http;//example.com/test/testing/, you would get results like these:
-
- Before: http;//example.com/test/another-test/#anchor
- After: ../another-test/#anchor
-
- Before: http;//example.com/wp-content/themes/twentyten/style.css
- After: /wp-content/themes/twentyten/style.css
-
- Before: https;//example.com/wp-content/themes/twentyten/style.css
- After: https;//example.com/wp-content/themes/twentyten/style.css
-
- Before: http;//google.com/test/
- After: //google.com/test/
-
- Before: ../../../../../../../../#anchor
- After: /#anchor
- After (
$output_type=1): ../../#anchor
All string parsing. No directory browsing.
If you’re looking for a plugin that will automatically convert all URLs on your WordPress site, instead check out my other plugin, WP-HTML-Compression.
Before you copy this code and add it into your own, keep in mind that there will probably be future updates. Keeping the code within an installed plugin will make sure that you’re notified.
Installation
- Download the plugin (zip file).
- Upload and activate the plugin through the “Plugins” menu in the WordPress admin.
Changelog
0.3.4
- Empty, hash-only anchors (
"#") are no longer invalidated to"/"
0.3.3
- JavaScript URIs (
"javascript:") are no longer invalidated as paths
0.3.2
- Data URIs (
"data:") are no longer invalidated as paths
0.3.1
- Domains with and without “www.” are no longer considered to be identical by default, but can still be overridden
0.3
- Scheme-relative URLs (
//domain.com) now supported on input and output - Cleans up the ports and paths of external URLs
- Optionally, output only host-relative URLs (
/root-dir/) - Speed optimizations
- Minor bug fixes
0.2
- Path-relatve URLs (
../), or parenting, now supported on input and output - Differentiates schemes/protocols, usernames, passwords, hosts, ports, paths, resources/files, queries and fragments/hashes
- Considers domains with and without “www.” to be identical, and can be overridden
- Outputs the shortest url (host- or path-relative) by default, and can be overridden
- Custom site URL support, but only with a separate
new Absolute_to_Relative_URLs()instance
For developers
Is this your plugin? Show off the numbers.
Add a live badge to your site, docs or GitHub README. It updates on its own — no account needed.
Best Absolute-to-Relative URLs alternatives
All absolute plugins →| Rank | Plugin | Active installs |
|---|---|---|
| 1 |
|
1K+ |
| 2 |
|
1K+ |
FAQ
Absolute-to-Relative URLs: quick answers
Straight answers, pulled from live WordPress.org data.
Live data from WordPress.org · checked Sep 30, 2026
Is Absolute-to-Relative URLs free?
Yes. Absolute-to-Relative URLs is free to download and use from the official WordPress.org plugin directory.
Is Absolute-to-Relative URLs safe to use in 2026?
Absolute-to-Relative URLs shows warning signs in 2026 — compare the alternatives below before installing. It runs on 10+ sites, is rated 5/5 and was last updated 14 years ago, and scores 30/100 on our health check.
How many websites use Absolute-to-Relative URLs?
Absolute-to-Relative URLs is active on 10+ WordPress websites and has been downloaded 7,902 times since it launched in March 2011. It was downloaded 165 times in the last 30 days.
Does Absolute-to-Relative URLs work with WordPress 7.1?
Absolute-to-Relative URLs is officially tested up to WordPress 3.4.2, while the latest release is 7.1.2. It may still work, but try it on a staging site first.
When was Absolute-to-Relative URLs last updated?
The latest version, 0.3.4, was released on March 28, 2013 (14 years ago).
Who makes Absolute-to-Relative URLs?
Absolute-to-Relative URLs is developed and maintained by Steven Vachon.
What are the best alternatives to Absolute-to-Relative URLs?
The most popular alternatives to Absolute-to-Relative URLs are Absolute Relative URLs (1K+ installs) and WP-HTML-Compression (1K+ installs).
Powered by PageForge
Want thousands of pages that rank like these? Build them in an afternoon.
This directory runs on the same engine as PageForge. Turn any spreadsheet, CSV or API into thousands of fast, SEO-ready WordPress pages — with schema, internal links and AI-written copy baked in.
- CSV, Google Sheets & API data sources
- AI content, schema & internal links per page
- Works with Elementor, Gutenberg, Yoast & Rank Math
- Free on WordPress.org — no credit card