I am aware of how dangerous it is to offer grammatical and spelling rules to make a point--usually responded to by a huge listing of exceptions. Nevertheless, I have been guided reasonably well thoughout my adult life by the following rule on doubling of consonants

Two-syllable words:
ED = If the stress is on the first syllable, the word only gets one consonant + ED.
ING = If the stress is on the first syllable, the word only gets one consonant + ING.

Examples:
visit > visited, open > opened
happen > happening, enter > entering
travel > traveling (I added this example)

ED = If the stress is on the second syllable, the word gets a double consonant + ED.
ING = If the stress is on the second syllable, the word gets a double consonant + ING.
Examples:
refer > referred, admit > admitted
begin > beginning, permit > permitting