Photo by Elly Fairytale from Pexels

How To Convert Absolute URLs Into Relative URLs In WordPress?

WordPress always saves the content using the local 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 localhost server or blog on one domain 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, very quickly.

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 stanging 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.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.