Quick answer
por = the reason behind, the route through, the exchange.
para = the purpose ahead, the destination, the deadline, the recipient.
Side by side
Memory trick
para points forward like an arrow — purpose, destination, deadline. por points back at a cause or through a space.
Typical mistakes
Gracias para tu ayuda.
Gracias por tu ayuda.
Thanks is always about a cause: por.
Este regalo es por ti.
Este regalo es para ti.
A recipient is a destination: para.
Check yourself
Este café es ___ ti.