I have done several, for myself and others.
There is usually a tapered part on the porcelain bar-holder, with the inside end larger than the dimension at the wall surface. That makes a sort of knob to hold it in place.
1. Clean out the holes by removing loose material.
2. If the hole is really large then you will have to insert some pieces of thin material into the hole and attach it with adhesive or drywall screws to make the hole smaller.
3. Stuff the hole with wadded up newspaper to make a moderately firm base in the hole. The newspaper wad is crushed against the drywall on the other side of the stud cavity.
4. Mix up a good quantity of plaster of paris. You will be able to judge how much based on the following instructions. You can use a tool but I usually use my hand and sometimes the rubber spatula from the utensil drawer in the kitchen.
5. Moisten the ceraminc part that is going into the hole (and shake off excess water) and butter a liberal amount of P of P onto the four sides and end of the stem going into the hole. The four sides hold it in; not the end.
6. Moisten the edges of the hole; then put a large amount of P of P into the hole.
7. Mash the stem of the bar-holder into the mass of P of P in the hole so it will engage it and grab it. You have to judge how much P of P to use, and the firmness of the wad of newspaper, to get the correct effect.
8. Work quickly because the P of P sets up quickly. It should hold itself in 5 minutes.
9. Hold the part firmly against the wall until it sets up. You can tell by when the left-over P of P has set up in the mixing bowl.
Further Hints:
1. Don't put any load on it until 12 hours have elapsed.
2. Use a Stainless, plastic, or glass mixing bowl from the kitchen. It will clean up if you do it right after you let go of the part in the wall.
3. Be sure the towel bar is in place when you do the second holder.
4. Don't skimp on the P of P. It reduces in volume when mixed with water and it is inexpensive.
5. If you have a problem with an installation clean it out immediately and mix a new bowl of P of P.