The 30-year-old is Tranmere manager Rob Edwards' seventh summer signing and he brings a wealth of experience to the Wirral side, with over 300 professional appearances under his belt.
He was a free agent after leaving Bristol Rovers at the end of last season and he has been on trial with the League Two club for the past two weeks, playing in their pre-season friendlies against Everton and Bolton.
Edwards told the club's official website: "Danny has really impressed me over the past fortnight.
"He's come in, trained well and shown how versatile he is in our friendlies, playing in the centre of midfield, left-back and right-back and he can also play centre-back as well.
"He is a talented player who is very capable of playing in the league above and has fitted in really well here."
Breaking news, transfer gossip, line ups and goal alerts from your football club - delivered direct to your mobile. Sign up for Sky Sports Alerts