David James joins Bristol City
James will join officially on August 1, the day he turns 40, on a contract that includes an option for a further year, City added on their website.
The experienced keeper left Portsmouth following the club's relegation from the Premier League last season. He then headed to the World Cup, where he played the last three games after Rob Green was dropped following a howler in the opener.
James had the option of a move to Scottish Premier League side Celtic. Manager Neil Lennon said he accepted James's decision not to move to Glasgow for family reasons and instead join a club much nearer his home in the west of England.
"I do think he has more to offer at a higher level than the Championship -- he is England's No.1 goalkeeper and just played at the World Cup," Lennon said at a new conference before this weekend's Emirates Cup pre-season competition at Arsenal.
"He would have been ideal for us in terms of his experience, presence and charisma, but these things happen in football.
"But I don't think he's made a mistake, he's moved there for genuine personal reasons."
James has also played in the Premier League with Liverpool, Aston Villa, West Ham United and Manchester City and won the F.A. Cup with Portsmouth in 2008.