Viewing 7 replies - 1 through 7 (of 7 total)
  • I believe they are stored in the wp_posts table, guid is the field name.

    Thread Starter lerizzle

    (@lerizzle)

    thats what you would think but all the urls in there are

    url.com?page=4

    Where does it say this is actually

    url.com/aboutus/

    Now that I think about it, they aren’t stored in the database. When you load a page, it uses WordPress’ rewrite rules to figure out what content you want. That’s why when you change your rewrite rules it doesn’t have to go through the database and update all the records.

    Here’s some more info: http://codex.wordpress.org/Function_Reference/WP_Rewrite

    Thread Starter lerizzle

    (@lerizzle)

    Thank you so much.. I’ve been searching for this information forever.

    Erik

    (@southernutahautism)

    The slug is stored in the wp_posts table in the column “post_name”. This also stores all the auto-save and revision titles as well, but for your actual published posts and pages, this is the slug.

    Now, this isn’t the entire permalink, this is just the character-stripped slug, so if you had a post or page called “This is my title”, it would be stored here as “this-is-my-title”.

    This is different than the “post_title” field, and the GUID field.

    Now, the permalink structure is built on the fly using the settings you set in the wordpress options. But the actual slug itself is stored here.

    Does this help at all?

    Thread Starter lerizzle

    (@lerizzle)

    awesome thanks!

    Thread Starter lerizzle

    (@lerizzle)

    Since you guys seem to know about permalinks here’s my next question.

    I developed a plugin and I use URL query vars. How can I turn those in nice permalinks?

    I have http://www.URL.com/page/subpage/?id=1

    I want http://www.URL.com/page/subpage/id/1

    Any direction to the answer would be appreciated.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘where are the permalinks / slug stored in the database’ is closed to new replies.