Relative URL

By on

Relative URL is a WordPress plugin to apply wp_make_link_relative function to links (posts, categories, pages and etc.) to convert them to relative URLs. Useful for developers when debugging local WordPress instance on a mobile device (iPad. iPhone, etc.).

This plugin should be used for local development only. I haven’t tested on a production environment; it may work with some issues, like unwanted URLs in RSS feed or sharing URLs are replaced with relative URLs, etc.

# Example:

# Will be converted to:

# And...

# Will be converted to:

# And...

# Will be converted to:

Then after activating this plugin, you can simply access your local instance using on your iPad or other mobile devices without having styles and navigation issue.

What if I deactivate this plugin?

The URLs will be changed back to absolute URLs again, there’s no database writes with this plugin.

Why this plugin is not recommend for production environment?

URLs in RSS feed are also replaced to relative URLs with this plugin, this could causes some issues for RSS readers that they will be confused for URLs without host. Shared URLs (ie Jetpack Sharing module) are also replaced to related URLs, Twitter, Facebook or other social sites won’t treat them as valid URLs.

If you love this plugin, please consider buying me a cup of coffee.

Download it at