233

Is slug a completely arbitrary word? Or does it stand for something? I used the word in a conversation with someone and when they asked me why it's called that I realized I didn't know.

I know what it means of course: https://wordpress.org/support/article/glossary/#slug

So - does the word have an actual meaning behind it?

notquiteamonad
  • 857
  • 1
  • 10
  • 25
Matthew
  • 14,390
  • 26
  • 83
  • 118

2 Answers2

329

The term 'slug' comes from the world of newspaper production.

It's an informal name given to a story during the production process. As the story winds its path from the beat reporter (assuming these even exist any more?) through to editor through to the "printing presses", this is the name it is referenced by, e.g., "Have you fixed those errors in the 'kate-and-william' story?".

Some systems (such as Django) use the slug as part of the URL to locate the story, an example being www.mysite.com/archives/kate-and-william. Even Stack Overflow does this, with the GEB-ish(a) self-referential https://stackoverflow.com/questions/4230846/what-is-the-etymology-of-slug/4230937#4230937, although you can replace the slug with blahblah and it will still find it okay.

It may even date back earlier than that, since screenplays had "slug lines" at the start of each scene, which basically sets the background for that scene (where, when, and so on). It's very similar in that it's a precis or preamble of what follows.

On a Linotype machine, a slug was a single line piece of metal which was created from the individual letter forms. By making a single slug for the whole line, this greatly improved on the old character-by-character compositing.

Although the following is pure conjecture, an early meaning of slug was for a counterfeit coin (which would have to be pressed somehow). I could envisage that usage being transformed to the printing term (since the slug had to be pressed using the original characters) and from there, changing from the 'piece of metal' definition to the 'story summary' definition. From there, it's a short step from proper printing to the online world.


(a) "Godel Escher, Bach", by one Douglas Hofstadter, which I (at least) consider one of the great modern intellectual works. You should also check out his other work, "Metamagical Themas".

paxdiablo
  • 772,407
  • 210
  • 1,477
  • 1,841
  • 1
    well explained! just a clarification: Django is not an application - it's a framework, and it's just predisposed to use slugs, so it makes a developer choice to use slugs in URLs. this can't be said in real applications, such as Wordpress or Drupal. – caesarsol May 04 '14 at 16:50
  • As for the counterfeit coin, my guess is that it's derived, like all the rest, from meaning #1 in the other answer. See also the dates in http://www.etymonline.com/index.php?term=slug – Walter Tross Jan 01 '16 at 11:36
  • 3
    Such beautiful explanation. I really don't understand why a very much legitimate question being flagged as opinion based or out of topic. The attitude of the editors have some serious problem. – Shi B. Mar 14 '17 at 04:14
  • 1
    @ShiB. It was flagged/closed only because it is about word etymology, not programming. – authentictech Jul 16 '17 at 20:23
  • I thought that what StackOverflow did was just for SEO. Normally, I consider a slug to be a unique key myself which is how Wordpress uses it. – binki Oct 09 '18 at 21:09
18

Appropriate definitions for slug at dictionary.com I think tell the story:

  1. any heavy piece of crude metal.

  2. Printing

    a. a thick strip of type metal less than type-high.

    b. such a strip containing a type-high number or other character for temporary use.

    c. a line of type in one piece, as produced by a Linotype.

  3. Journalism

    a. Also called catchline. a short phrase or title used to indicate the story content of newspaper or magazine copy.

    b. the line of type carrying this information.

Ned Batchelder
  • 323,515
  • 67
  • 518
  • 625