The 23-year-old centre-half, who started his career at Huddersfield Town, has been a consistent figure in the Rovers defence over the past season-and-a-half and has been rewarded for his solid form.
Wright, expected to return to training later this week after a spell out with an ankle injury, which has sidelined him since November, joined Rovers on a free transfer in the summer of 2016.
A clause activated in Wright's contract last March extended his deal at Rovers until the end of the current season. He is now contracted at the club until the summer of 2021.
Talks were delayed regarding the defender signing a new longer-term contract, but an agreement has now been reached.
On signing his new deal, Wright said: "I’m really happy to get this deal over the line, I’ve been talking to the club for a while so I’m delighted to get it sorted.
“It shows the faith the gaffer has in me as I’ve been injured for a while, and it fills me with confidence that he’s offered me a deal.
“I’m a Yorkshire lad so this place feels like home to me, I’ve settled in over the past couple of years and made some very good friends here.”
A host of other Rovers players see their deals expire in the summer.
The experienced trio of Tommy Rowe, Andy Butler and James Coppinger are among those whose deals end, along with Danny Andrew, Niall Mason, Marko Marosi, Ian Lawlor and Matty Blair.