Upgrade or Replace CiviCRM 4.7.31
I think you're asking whether to try upgrading or just start with a fresh install. It is definitely possible to upgrade from 4.7.31. You'll want to update php too since you're probably still using php 5 and that won't work with the latest civi.