Taking the step from personal to distributed

I keep creating scripts that other people want to use… In creating them, I basically did whatever I needed to to bend them into shape to do what I wanted… In order to distribute them to others, I pretty much have to set up everything myself… Obviously, this creates problems – even people who know me have a hard time giving me root access to their mysql db and such…

So what I’d like to see is a discussion of guidelines on how to package your php/mysql solutions for distribution so that it’s easier on the other end to get them up and running.

Part of this would be proper coding and commenting to begin with, I’m sure… But scrubbing existing code is a part of it as well. Are there any helpful functions, code bits, etc that ease the process? Any other helpful hints on how to accomplish this?