Or: "How to keep the motor from falling out." Although I like things like GiantLeap's slimline retainer, I often can't justify the money when it is really only to keep the used motor from falling out - something that some accomplish with simple friction fit with tape.
For my motor retention, I simply use either "T-nuts" or "threaded inserts" (as in this picture). The black disk was cut out of a cheap piece of metal and I sometimes use that to go over the motor to hold it in. Often though, I simply use a washer. (The "admit one" ticket is just there for size reference...)
For attaching the threaded inserts, I start by tacking them down with 5 min epoxy to the centering ring at the aft end of the rocket. (Note for these TNuts, I had to grind the sides a little so it would fit in the space.) Note one drawback to my method is there is a limit to how far you can put a screw in (which forces you to have the right length screws). An alternative would be to predrill some holes below the insert and then try to tack the threaded inserts down without filling the holes in with epoxy. This would allow the screw to pass through the centering ring. [I haven't tried this method yet - I just have a variety of screws...]
After the threaded inserts (or TNuts) are tacked down, you can fill in the rest of the area with Epoxy being careful to not get it in the threads. [Yes, I changed rockets from the above picture to this picture...]
Here's a snapshot of using simply washers as retainer clips. Yes, these are pushing the limit on how much they grip the motor - a larger washer would be better, but I have used this with success.