I’m going to set our time machine for a bit more than 25 years, as that was when the movie was released. The production of an animated film takes years, the average one taking at least four years, and Toy Story was no average film. It was the first full-length computer animated feature. Something that John Lasseter, Ed Catmull, Steve Jobs, and the rest of the Pixar team had long wanted to do since the studio was founded in 1986. There’s a far longer story here that can be saved for another time about the studio’s beginnings, but shortly, most of Pixar’s work at the time was limited to visual effects in other films and commercial work to pay the bills. Having worked with Walt Disney Feature Animation (Now known as Walt Disney Animation Studios) to develop software used and effects in a lot of the films of the “Disney Renaissance,” they were invited to make a featurette for television inspired by the Pixar short, Tin Toy.
In Tin Toy, we see a drummer toy (Tinny) come to life to avoid being placed in the mouth of a baby while onlooking toys watch the chase in horror. In 2003, the short was adopted into the Library of Congress’ National Film Registry as being "culturally, historically, or aesthetically significant" and part of the argument that can be made for why, is that it directly influenced Toy Story (also in the National Film Registry since 2005 after 10 years, the minimum age of a film that can be allowed in). It was during the talks for “"A Tin Toy Christmas” that the idea of Toy Story was first discussed.
It was also during this time that Disney, now headed by Michael Eisner and Jeffrey Katzenberg, were trying to lure back an animator the studio previously fired in John Lasseter to come direct at their studio. Reportedly, he later told Ed Catmull, “I can go back to Disney and direct, or I can stay here and make history.” Realizing that he couldn’t tear Lasseter away from Pixar, Katzenberg set out to make a deal. It was actually a deal for Tim Burton and The Nightmare Before Christmas that gave Katzenberg the idea of signing a different studio to produce a film under the Disney name. The deal that was written could also be the topic of a whole different article, as it became a point of contention years after Toy Story was released.
The original concept for Toy Story was similar but vastly different than the film we know today, with Woody as a ventriloquist dummy that was so snarky and sarcastic, what Jeffrey Katzenberg termed “edgy,” that the character gained an immediate reputation in Hollywood circles as being immediately repulsive. Roy E. Disney has also mentioned that the original version felt so long that he would find himself just fast forwarding through video tapes of storyboards wondering “will this thing ever end?” After reworking and retooling, and eventually taking back creative control, John Lasseter, Andrew Stanton, Pete Docter, and Joe Ranft landed on the idea of a buddy comedy, with smaller details being changed throughout the writing process. One small detail that became a huge moment in the film was the idea of (who became) Buzz Lightyear not knowing he was a toy. An earlier draft had him knowing he was a toy the whole time.
At this point we have a script with a greenlight. Time to cast. According to John Lasseter, he always had Tom Hanks in mind to play the role of Woody, citing his ability to convey emotions and make an otherwise unlikeable character appealing. See Also: Hanks’ performance as Jimmy in A League of Their Own. Lasseter had made a quick animation test using dialogue from Turner and Hooch and an early look for Woody that was shown to Hanks.
Explanation:
hope that helps:)