Music Theory from the Ground Up, by Ben Levin, is a playlist on Youtube. https://www.youtube.com/playlist?list=PLJTWoPGfHxQH5zdZN6UlMPwZerVApkqmk
This is published there by the author, and is free. Explanations are clear and practical, and relate directly to the guitar.
Here is how I used it:
- Start at the beginning, watch each videos and do all the exercices over the course of several weeks.
- No need to rush through them, nor to skip any. The key to success is to do all the exercises with a pen and paper.
By the end of it, I had a good understanding of music theory, and as a bonus, I was able to apply the knowledge to my guitar as I learned. This has direct impact on playing by ear, coming up with tunes and improvising. Along with the guitar itself, I consider it the most ear-opening topic I have ever studied in music. I encourage you to go through it too.