The word order in phrases was discussed in the chapter 27 about Position of the elements in a sentence, which was not too easy as we admit. However, there are no modal verbs, no conjunctions nor auxilliaries in imperative phrases. Therefore, things are not too complicated.
Compare
these phrases
affirmative phrase:Du machst es heute
imperative:
Mach es heute!
affirmative phrase:
Du gehst jetzt
Kartoffeln kaufen.
imperative: Geh
jetzt Kartoffeln kaufen!
affirmative phrase:
Du schenkst
ihr die Blumen.
imperative: Schenk
ihr die Blumen!
affirmative phrase:
Du schenkst
sie ihr.
imperative: Schenk
sie ihr!
affirmative phrase:
Ihr schenkt
sie ihr.
imperative: Schenkt
sie ihr!
affirmative phrase:
Sie schenken
sie ihr.
imperative: Schenken
Sie sie ihr!
You see? Concerning the position of the elements in a phrase there is no difference (or let's say very little) between an affirmative phrase and the imperative. The personal pronoun in the second person singular and plural is omitted. The first and third person plural changes places with the verb.