The 30-year-old was with Liverpool as a youngster and has also had spells with Southampton, Blackpool, Wolves, Middlesbrough, Huddersfield and Rotherham.
Manager Oran Kearney told the club website: "When you look at where we are at in this point of time he ticks the box. Similar to Simeon Jackson and Anton Ferdinand, there is a real hunger there to do well and I think that's vitally important."