URLs Editor – Absolute and Relative

Replaces absolute URLs with Relative URLs or changes the URLs for image paths in posts

Author:Jozef Kapicak (profile at wordpress.org)
WordPress version required:3.2
WordPress version tested:3.3.2
Plugin version:0.1
Added to WordPress repository:08-02-2012
Last updated:08-02-2012
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:0
Rated by:0
Plugin URI:http://www.hiih.com/
Total downloads:1 373
Active installs:10+
plugin download
Click to start download

Before:
http://example.com/wp-content/themes/twentyten/style.css

After:
/wp-content/themes/twentyten/style.css

OR:

Before:
http://example.com/wp-content/themes/twentyten/style.css

After (adding “https”):
https://example.com/wp-content/themes/twentyten/style.css

If you are looking for a plugin that automatically converts absolute URLs to relative URLs, or for a plugin that changes URLS for src & href URL attributes check out my other plugin.

I wrote this plugin because I needed a basepath for uploaded images for my WordPress Multisite. In other words, I needed a URL to the server root without the domain. You may find this useful for the same reason, or perhaps another.

Before you copy this code and add it into your own, keep in mind that there may be future updates. Keeping the code within an activated plugin will make sure you’re notified.


FAQ
ChangeLog