Simple Relative Content

This plugin makes all attachments urls stored in database relative to the WP_SITEURL url.

Author:Semio Design (profile at wordpress.org)
WordPress version required:
WordPress version tested:3.9.40
Plugin version:1.0
Added to WordPress repository:19-11-2012
Last updated:18-04-2014
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, %:100
Rated by:1
Plugin URI:http://wordpress.semiodesign.com/simple-relat...
Total downloads:1 661
Active installs:20+
plugin download
Click to start download

When you use the WordPress editor to insert a media in the content field it stores a reference to the absolute path.
So if you change the location of your site (by switching from staging to production environment for example) all your paths will be incorrect.
This plugin stores relative pathes in the db instead of an absolute path.
Beware: this plugin must be activated BEFORE inserting a media into the content field. It has no effect on the medias stored before the activation.
It’s mostly based on the WP_SITEURL constant which should be defined in the wp_config.php file. If this constant isn’t defined it uses the “siteurl” option value instead.
If the plugin detects that you access the website from another location than the “siteurl” defined initially it can correct most of the wrong urls in the database.

Localisation of the plugin into french.