Support » Fixing WordPress » relative URLS

  • does anyone have a good way to use relative urls in wordpress for internal linking of pages? when i set up a relative link on my local server from one page to another, then upload to my remote server, wordpress still prepends the “http://localhost…” to the URL on the production page.

    what am i doing wrong?



Viewing 6 replies - 1 through 6 (of 6 total)
  • Did you change the siteurl and home values in the backend to your on-server domain address?


    thanks for helping. yes i did. any other ideas?

    also, this is only an issue with inline anchor text links. the nav is fine when pushing from local to production….. and when i made the anchor links locally, i used relative URLs… those are the ones that continue to prepend the localhost url when the site is migrated to production..

    Huh. You’re welcome, but no, I don’t have any other ideas. The only times I’ve had this sort of thing happen were when for some reason I hard-coded some of the links; or when I forgot to change the blog addys….

    I wrote a tutorial on this issue:

    thanks andymike!!

    i looked at the local DB that i uploaded to the production server and did find instances of localhost.

    i guess i thought the procedure i used to move WP from one server to another ( – see the section “If You Want Your Old Blog To Still Work”) would prevent this from happening.

    what is your recommended way of keeping local and production instances up to date?

    really appreciate it!


Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘relative URLS’ is closed to new replies.