After one or two delays, the paperwork has been tied up and Trevor has become the second sale of the summer following on from Glen Johnson's move to Chelsea for £6m.
"Trevor's move has been signed and sealed as is the case with Glen and everyone at the club wishes them all the best in the future.
"We thank them both for their services and, while we are sorry to see them go, the transfers have been done in the best interests of West Ham United."
Trevor, born in Dulwich but brought up in Wythenshawe, was picked for the England squad when City boss Kevin Keegan was manager, could have joined Manchester City a decade ago, but the chairman at the time, Peter Swales refused to let then manager Peter Reid sign him.
It would have cost them only an initial £50,000 down payment for Trevor, who is a City fan.
He ended up joining QPR before moving on to West Ham and has notched up more than 200 appearances at Upton Park since signing in 1998 for £2.3m.