WordPress.org

Forums

How To Update WordPress Local Links in Content (4 posts)

  1. Jessica
    Member
    Posted 1 year ago #

    We have a test site, a pre-production site where the users are entering their info and then we will have a live site.

    Currently, the users are adding their info in the pre-production site and when they add a link, WordPress adds the whole url http://url.link-to-page rather than /link-to-page.

    The problem with this is that when we upload the new site and content to the live url, the url will change.

    Is there any way to change all of the links in the content that link to the url to remove the url and have the link be local? /link-to-page rather than http://url/link-to-page?

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    Not that I am aware of. You should always use full urls in WordPress. Relative urls tend to generate unpredictable results.

  3. Jessica
    Member
    Posted 1 year ago #

    That is good to know. I thought that if we could simply remove the url from the link it would work across all of the sites, but if it will cause potential issues perhaps we can go into the DB and make the change that way, replace the test url with the prod and then the prod with the live url...

  4. esmi
    Forum Moderator
    Posted 1 year ago #

Topic Closed

This topic has been closed to new replies.

About this Topic