Writing Lead writer
Steven Moffat conceived of the episode's plot due to a realization that many of the season's episodes had been "frothy" and more light-hearted. Moffat wished to create a more funeral-like atmosphere, akin to that which appeared in the episode
Logopolis (1981) which depicted the
Fourth Doctor's
regeneration. Moffat stated that he wanted to have a new monster in the finale, after the series had seen the reappearance of old monsters such as the
Ice Warriors,
Cybermen, and
Daleks. The idea of the Whisper Men came from "the thought of stylish, whispering, almost faceless creatures" which seemed frightening and appropriate for "an episode that looks forward and back". The first draft of the script was dated 1 November, 2012, and remained largely identical to the final script, though had several differences from the final version. The opening sequencein which Clara falls through the time vortexwas instead going to have Clara wake up in a cottage and recount her splinters interacting with various Doctors. Clara would additionally have referenced seeing
Amy Pond falling out of the Pandorica (as depicted in the 2010 episode "
The Big Bang") and the Doctor's death at Lake Silencio (depicted on-screen in the 2011 episode "
The Impossible Astronaut"), which would have had her face overlaid on top of crew members who had accidentally entered the shots of both scenes, with Moffat attempting to retcon both crew members as being splinters of Clara. "The Name of the Doctor" was initially used in the first draft of the script, but all subsequent drafts referred to the title as "The Finale." The second draft of the script was dated to 7 November, 2012, with this script having several alterations from both the first and final versions. The episode's shooting script was dated to 15 November, 2012.
Filming The episode was directed by
Saul Metzstein. Work on the episode overlapped with production of "
Nightmare in Silver" (2013). Certain sequences in the episode were recorded alongside "
The Day of the Doctor" (2013)'s production block, instead of being recorded with the episode's production block. Shooting began on 16 November 2012 in
Cardiff Bay, and concluded on 30 November. Green screen shots were filmed at the BBC's
Roath Lock Studios. On 25 March and 25 April 2013, Metzstein also handled the shooting of the accompanying minisodes. The episode contains archive footage of the Doctor's prior incarnations. Specifically video from of the
First (from
The Aztecs, 1964, with dialogue from
The Web Planet, 1965),
Second,
Third (both from "
The Five Doctors", 1983),
Fourth (
The Invasion of Time, 1978),
Fifth (
Arc of Infinity, 1983), and
Seventh (
Dragonfire, 1987) Doctors was shown.
Stunt doubles were used for some other brief appearances, including the
Sixth Doctor walking past Clara while she is in a corridor. Several Doctors can also be seen running past her in the Doctor's time stream. The clips of the first Doctor were
colourised.
Casting "The Name of the Doctor" stars
Matt Smith and
Jenna Coleman star as the
Eleventh Doctor and
Clara Oswald respectively.
John Hurt makes his first appearance as the
War Doctor, an incarnation of the Doctor who fought in the
Time War, a large war between the Doctor's species the
Time Lords, and the Daleks. The War Doctor was introduced alongside text reading "Introducing John Hurt as The Doctor". ==Broadcast and reception==