You probably couldn't survive on just wine, but beer most definitely. Provided the alcohol content is under 10%.
Back before water treatment existed, scientists discovered that brewers didn't get sick during cholera outbreaks. By the 19th century, many municipal water supplies, most notably London's, were obscenely contaminated with raw sewage that the water was basically poison. This came from the practice of digging latrines too close to the aquifers, or simply dumping human waste right onto the street. This fosters the growth of harmful bacteria. When beer is made, the grain mash is boiled killing this bacteria off.
Small beer was the most common beverage of the time. It was closer to modern low-alcohol beers. You could get away with it today drinking light or non-alcoholic beer.