WordPress always saves the content using the actual domain i.e. the domain you use to write your content.
But sometimes it may cause you issues especially when you want to develop your WordPress site locally using a local host server or blog on one domain and then go live on another. Because then you need to replace all URLs in your database.
This lesson guides you on how you can easily convert all absolute URLs into relative URLs.
Relative URLs is the new WordPress plugin that allows you to move from localhost to a live domain with minimal effort. The plugin doesn’t change the links in the database, so you can develop in the staging area or on a subdomain, or a sub-directory without worrying to replace URLs in your content.
The plugin doesn’t replaces the URLs in the database but:
- It removes the domain name on internal links
- It also removes the domain name on image sources for the images that are located on your server
Using this plugin you can:
- Switch between HTTP and HTTPS sites
- Move from one directory to another with minimal effort
- Go live in one domain and carry on your development in another
- Backup a production site from one domain and restore it for testing process on another domain
One important thing to take note of is the plugin should always be used for local development only. As it may conflict with your server-based cache services such as Nginx or Varnish.