Blog of Leonid Mamchenkov

You just stepped in a pile of posts.

Fixing WordPress slugs

Posted in All on May 1st, 2005 · 2 Comments

Slug is a short name for WordPress post. It looks like this-is-your-post-title. One of the applications of posts is in permalinks. Having post title (or part of it) in the link makes the URL slightly longer, but much more easier to identify.

Now, sometimes people tweak the way slugs are structured. Or people import posts from unsupported blogging systems and forget to make slugs. Regenerating slugs for all posts in the database is very easy and does not require any scripting at all! After importing your posts (or tweaking the slug generation mechanism) simply run the upgrade.php script, which is in the WordPress wp-admin folder. That’s it!

Tags:

2 responses so far ↓

  • 1 BeLeBo // Jun 2, 2005 at 7:27 am

    Nifty idea… though the only time I import content is from previous mySQL backups after my free host “accidentally” misplaces a few files.

  • 2 Leonid Mamchenkov // Jun 2, 2005 at 10:23 am

    Well, importing from the backup is another story. You have all the slugs in place already…

Leave a Comment

Note: This post is over 3 years old. You may want to check later in this blog to see if there is new information relevant to your comment.

Advertisement

  • Flickr
  • WordPress publishing platform
  • Linux Weekly News