WordPress.org

Ready to get started?Download WordPress

Forums

why are guid's stored as absolute paths? (3 posts)

  1. fritzthecat
    Member
    Posted 7 years ago #

    Maybe I just don't know how to use WP properly, but I run a local version on my machine and a live one on the server, and it is annoying how WP stores all the guids in the wp_posts table as absolute: http://dev.server/this/that

    There should be an option to select the link format behaviour - absolute [http://i.only.have.one.server/this/that], or root relative [/this/that].

    In fact I don't understand why guids are stored as absolute at all since the blog url is stored in the option table - can't WP just work URLS by collating site url and root relative guid?

    In the end I had to write a plugin to strip all the host names from the guids, and have to remember to run it everytime I upgrade WP. Not ideal.

  2. MichaelH
    Member
    Posted 7 years ago #

    Pointing you to Owen Winkler's explanation of why the complete URL is stored:
    http://comox.textdrive.com/pipermail/wp-hackers/2006-October/008955.html

  3. fritzthecat
    Member
    Posted 7 years ago #

    Thanks for you reply. It makes sense.

Topic Closed

This topic has been closed to new replies.

About this Topic