practice what you preach
Behave as you would have others behave, as in You keep telling us to clean up, but I wish you'd practice what you preach. This idiom expresses an ancient idea but appeared in this precise form only in 1678. Also see do as I say.
Dictionary.com presents 366 FAQs, incorporating some of the frequently asked questions from the past with newer queries.