Left tackle Joe Staley has signed a two-year contract extension with the San Francisco 49ers, the team announced Thursday.