At various points in its history the Vatican City has been a less than safe place to be, so was there ever any serious consideration given to moving to a relatively more stable area?
The Papacy actually moved to Avignon, in France in 1309 and stayed there for much of the 14th century. Keep in mind, though, that for much of its history, the Papacy was actually a power unto itself in Italy. It held significant lands in the country and, thanks to its wealth, could hire soldiers to defend itself when the need arose. It was only in relatively modern times that the Vatican was reduced to a small city state.
The Papacy did throughout its history move to Avignon, in southern France, during a time when Milan was on the rise in Italy and was openly antagonistic towards the power of the Pope. However, when the Papacy was in France it was viewed as a puppet of the French Monarchy which led to a great deal of antagonism in the areas of Europe that were not Pro-French (e.g. England, many areas of the Holy Roman Empire, etc.) In the 14th Century this conflict would come to a head when the pro-Italian-pope advocates and the pro-French-pope advocates would back rival claimants to the papacy, resulting in two anti-Popes who excommunicated each other and their respective halves of Christendom.
In addition to episodes like the Aignon papacy, there were times when the popes were still within the Papal States, but they did not hold court in Rome itself. Medieval Rome could be volatile, and the Ghibelline (anti-Papal, pro-Holy Roman Empire) faction sometimes held a lot of power. Sometimes the popes held court in other cities in the Papal States like Perugia, Orvieto, or Viterbo.
You might want to check this, it's slightly off topic, but can partially answer your question : http://en.wikipedia.org/wiki/Antipope