recommended steps for upgrading

Hi,
When doing upgrades to 4,7 is it best to upgrade version first, then theme, then plugins or it doesn't matter?