Does WordPress not use relative URLs?

Out of the box WordPress uses absolute URLs. This requires you to make database updates when moving sites from development to production or when changing the base URL. I’m not sure why this choice was made but there are many options when moving sites.

  1. You can use a tool like WP Migrate DB Pro or another option that
    will work with serialized data to change the URL in the database
    after moving.
  2. Another option seems to be a plugin that changes that
    URLs to relative ones. It is up to date but I haven’t used it so I
    can’t endorse it. (https://wordpress.org/plugins/relative-url/)

Leave a Comment