First off you have to have GM account to give this to others and it keeps you from having to .recall everywhere
for Alliance
.learn (ID here)
17334 Teleport to Stormwind
17607 Teleport to Ironforge
17608 Teleport to Darnassus
32268 Teleport to Exodar
For Horde
.learn (ID here)
17611 Teleport to Undercity
17610 Teleport to Thunder Bluff
17609 Teleport to Orgrimmar
32270 Teleport to Silvermoon
This Teaches it to you like they are spells so no need to use portal