I walked to Foz do Douro from Ribeira and back. It was not the best decision. It is a distance long enough to be challenging, but not long enough to be an achievement. Regardless, walking is a good opportunity to take in the views that the river offers and there are quite a few small restaurants along the way (not yet at Foz) that look like good places to grab a meal. In hindsight, it would have been better to walk to Foz, had lunch along the way, and then took the tram or bus back to the city centre to continue whatever activities you want to do.