Here's what I remember of that time.
Ford under Alan Mulally was consolidating production and closing plants that were not in states bordering Michigan. So in 2007–2008 came the announcement that the F-150 plant in Norfolk, Virginia, and the Ranger plant in Minneapolis–St. Paul would be chopped. The F-150 was made in other plants, but the Ranger was made only at the one plant.
Sales of the Ranger had slowly dropped, but production ended up having to be phased out because of continued demand. Ford was still selling 50,000+ per year without advertising. There are imports that would kill to have that sales volume for one model. So the Minnesota plant continued a few more years. By contrast, once the Norfolk plant announcement came, just a few months later it was done.
By the way, I'm originally from the Tidewater area, and there were a lot of hard feelings over that closure. Lots of people in southeastern Virginia had been loyal to Ford pickups. People thought the Norfolk plant was safe because Ford had spent big money just a few years earlier to upgrade the paint operation. By contrast, to show how attitudes changed, one of the employees won the last F-150 built there in a drawing, but soon sold it.
Ford finally set December 2011 as the final date for the Ranger plant. The truck had been upgraded as necessary for 2010 to meet government requirements, as another poster here noted to answer Garth Libre's questions. Sales were high that last year. I looked at new Rangers in 2011 at a large local dealer, and it had only a few on the lot. In about September 2011 the plant switched to 2012 VINs and those Rangers went to commercial buyers.
I would say that compact and smaller mid-sized pickups were never as successful as full-sized ones were. Ford sold over 7 million Rangers in 30 years, but F-150 sales dwarfed Ranger sales. Keep in mind 2011 was also the last year for the Dodge/Ram Dakota, which never sold as well as the Chevrolet and Ford small pickups.
The one mystery to me is why the 2011 4.0 is marginally larger in displacement than the earlier 4.0s (if the Haynes manual is correct). That was the last year the Cologne V-6 was in the Ford line, and why bother with that change?