The posts date from late 2012 and early 2013, when Clarke-Harris was 18 and establishing himself with loan moves from Posh to Southend and Bury.
Clarke-Harris, now 27, has also been fined more than £5,000, the Football Association has announced.
A statement on the FA Spokesperson Twitter account read: "Peterborough United FC's Jonson Clarke-Harris has been suspended for four matches, fined £5,300 and is required to complete a face-to-face education programme after admitting six breaches of FA Rule E3 in relation to social media comments posted between 27 October 2012 and 6 March 2013.
"The comments were insulting, abusive, improper and brought the game into disrepute contrary to FA Rule E3.1.
"The comments also constitute an 'aggravated breach', which is defined in FA Rule E3.2, as they included reference to sexual orientation.
"An independent regulatory commission was subsequently convened and imposed the above sanction during a paper hearing. Their written reasons will be published in due course."
Clarke-Harris will miss the Championship games against Coventry, Bournemouth, Bristol City and Middlesbrough as a result.