WordPress.org

Ready to get started?Download WordPress

Forums

relative URLS (7 posts)

  1. outofbounds
    Member
    Posted 7 years ago #

    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?

    thanks

    jay

  2. vkaryl
    Member
    Posted 7 years ago #

    Did you change the siteurl and home values in the backend to your on-server domain address?

  3. outofbounds
    Member
    Posted 7 years ago #

    vkaryl;

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

  4. outofbounds
    Member
    Posted 7 years ago #

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

  5. vkaryl
    Member
    Posted 7 years ago #

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

  6. andymike
    Member
    Posted 7 years ago #

    I wrote a tutorial on this issue:

    http://wordpress.org/support/topic/79882

  7. outofbounds
    Member
    Posted 7 years ago #

    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 (http://codex.wordpress.org/Moving_WordPress - 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!

    jay

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags