The 25-year-old returns to Mark Hughes's side after an impressive loan spell last term, which saw him make 35 Premier League appearances and score one goal, away at eventual Premier League champions Chelsea.
The club confirmed that the deal is worth €7.7m (£7m) and makes him Hughes's fifth senior signing of the summer, following on from Kurt Zouma, Josh Tymon, Eric Maxim Choupo-Moting and Darren Fletcher.
Stoke chief exec Tony Scholes said: "We are delighted to have secured a deal to bring Bruno to the club in a permanent transfer and I know that Bruno feels the same.
"Bruno loved being with us last season and made no secret of his desire to move here permanently when his loan spell came to an end. We've had to be patient in our dealings with Porto but we're really pleased with the outcome."
Stoke begin their new season away at Everton tomorrow afternoon.