We always recommend sanding the floor as the first step as the sanding might give off some dust. It is a pity if your newly painted walls become dirty during the floor sanding process, but you can easily wipe off the walls if you have painted prior to a floor sanding.