My door bell transformer is on an outside wall in my ceiling. I want to know if I can put the whole thing with the wire behind the drywall? Concerned about it over heating.
That bell transformer mounts on a mains power electrical box. The electrical code requires that all electrical boxes remain accessible and not be enclosed. This means that you will also not be able to cover over the box + transformer behind drywall.
You may have the option to move the bell transformer to a completely different location and re-run the low voltage wires to the doorbell. Then you could just insulate the wire ends in the box and cover this existing electrical box with blank cover which you then paint to a color to match the wall there by the ceiling. The result would be much less of an eyesore than the transformer hanging there with it's exposed wires.