The double consonant rule applies when you add a suffix beginning with a vowel to a base word ending with consonant + vowel + consonant.
For example:
the verb to plan - when you add a suffix beginning with a vowel (for example, -ing), to a base word ending with consonant + vowel + consonant (pLAN), the final consonant is doubled = planning
the verb to refer + -ed = referred