Where are the permalinks or slug stored in the database in WordPress

Send Us a Sign! (Contact Us!)
Word PDF XPS XML

slug is a few words that describe a post or a page. Slugs are usually a URL friendly version of the post title (which has been automatically generated by WordPress), but a slug can be anything you like. Slugs are meant to be used with permalinks as they help describe what the content at the URL is.

[tweet]

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.

Where are the permalinks or slug stored in the database in WordPress

Where are the permalinks or slug stored in the database in WordPress

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 (wp_posts).

SOURCE

LINK

LANGUAGE
ENGLISH

1 thought on “Where are the permalinks or slug stored in the database in WordPress”

Comments are closed.