Below is a table of upgrades in tiers of importance for Town Hall 5.

Tier 1Build the Spell Factory.
Tier 2Add all new traps, walls, defense and buildings.
Laboratory to level 3.
Tier 3Army Camps to level 5.
Tier 4Barracks to level 7.
Tier 5Elixir and Gold Storages to level 9.
Elixir Collectors and Gold Mines to level 10.
Tier 6Air Defense to level 3.
Air Bombs to level 2.
Archer Towers to level 6.
Wizard Tower to level 2.
Mortar to level 3.

Tier 7Cannons to level 6.
Bombs to level 3.
Tier 8Town Hall to level 6.

Try to keep your walls on par and maxed before upgrading to Town Hall 6. You don’t want to drag behind this early in the game! And at Town Hall 5 you don’t need to worry much about your War Weight and the order you upgrade your defense.