Upgrade priorities at Town Hall 9 varies depending on your focus on war or farming.

War FocusFarming Focus
Tier 1Build Archer Queen Altar.
Put all Dark Elixir you can into Archer Queen and Barbarian King until maxed.
Build Archer Queen Altar.
Put all Dark Elixir you can into Archer Queen and Barbarian King until maxed at your own pace.
Tier 2Laboratory to level 7.
Clan Castle to level 5.
Army Camps to level 7.
Archer Queen to level 5, minimum.
Build new Elixir and Gold Storage.
Build new Elixir Collector and Gold Mine.
Build new Dark Elixir Drill.
Laboratory to level 7.
Clan Castle to level 5.
Army Camps to level 7.
Spell Factory to level 4.
Dark Spell Factory to level 4.
Tier 3Spell Factory to level 4.
Dark Spell Factory to level 4.
Build all new traps, defenses, walls and buildings.
Get them on par with Town Hall 8.
X-Bows to level 3.
Tier 4Dark Elixir Storage to level 3.
Dark Elixir Drills to level 6.
New Elixir and Gold Storages to level 11.
New Elixir Collector and Gold Mine to level 12.
Dark Elixir Storage to level 6.
Barracks to level 11.
Dark Barracks to level 6.
Archer Queen to level 10, minimum.
Dark Elixir Storage to level 3.
Dark Elixir Drills to level 6.
New Elixir and Gold Storages to level 11.
New Elixir Collector and Gold Mine to level 12.
Dark Elixir Storage to level 6.
Tier 5Build all new traps, defenses and walls.
Get them on par with Town Hall 8.
Please note, keep your X-Bows at level 1 for now.
Archer Queen to level 15, minimum.
Barbarian King to level 15, minimum.
Air Defenses to level 7.
Air Sweepers to level 5.
Hidden Teslas to level 7.
Skeleton Traps to level 3.
Wizard Towers to level 7.
Archer Towers to level 11.
Cannons to level 11.
Tier 6Air Defenses to level 7.
Air Sweepers to level 5.
Bomb Tower to level 3.
Bombs to level 6.
Spring Traps to level 4.
Mortars to level 7.
Tier 7Hidden Teslas to level 7.
Skeleton Traps to level 3.
Archer Towers to level 11.
Cannons to level 11.
Archer Queen to level 20, minimum.
Barbarian King to level 20, minimum.
Barracks to level 11.
Dark Barracks to level 6.
Tier 8When AQ/BK is level 20 upgrade X-Bows to level 2.Town Hall to level 10.
Tier 9Bombs to level 6.
Spring Traps to level 4.
Wizard Towers to level 7.
Bomb Tower to level 3.
Mortars to level 7.
Archer Queen to level 25, minimum.
Barbarian King to level 25, minimum.
Tier 10When AQ/BK is level 25 upgrade X-Bows to level 3.
Tier 11Archer Queen to level 30.
Barbarian King to level 30.
Tier 12Town Hall to level 10.

Town Hall 9 is a heavy grind for both heroes and walls. Barbarian King and Archer Queen has 50 levels of upgrades combined, and every wall piece can be upgraded twice, at a total cost of 3.000.000 gold (or elixir). My advice is to take your time, don’t rush it, don’t stress it. The time spent at Town Hall 9 is worth it. Make sure you max it out and make it count!