The 20-year-old, who has scored seven goals in 28 appearances while on loan with the Coca-Cola Championship side this season, has penned a three-and-a-half-year deal at the Britannia Stadium.
Boss Tony Pulis told the club's website: "I am absolutely delighted to have signed Ryan permanently.
"He has been fantastic for us this season and he will continue to get even better.
"Everyone has worked extremely hard behind the scenes to tie up the deal and we have beaten off several other clubs to his signature which shows we are moving in the right direction."
The deal will rise by a further £750,000 based on appearances and another £250,000 depending on the club's success.