If your old toilet suddenly stops working and cannot be repaired, or if you decide it’s time to upgrade your toilet to be more energy-efficient, then you will need to replace it. There are steps you need to take to both prepare and install the toilet. Below is a general outline, but if in doubt, you can always can a plumber for more information.
First you need to measure the old toilet for buying a new one. Know the “rough-in” measurement. Usually the waste pipe is about 12" from the wall, but sometimes it can between 10"-14" away. Just measure from the wall to the toilet’s bolts, and if the measurement isn’t 12", buying a replacement will be harder. You might have to special order, which will cost more.
To remove the old one, shut off the supply water valve, located near the floor behind the toilet. Remove the toilet tank lid, flush the toilet and then sponge out all the remaining water in the tank. You want to avoid a mess before you put down the new one.
Disconnect everything on the toilet: the supply hose to the tank, the toilet tank (if it is a two-piece system), and finally the nuts from the flange bolts on each side of the toilet. They are often underneath plastic caps on each side, which you just lift off.
Now, lift the old toilet up and off the closet flange. Set the toilet on some rags to catch any spilled water and then carry or drag it away. Scrape off any wax around the closet flange. Turn the new toilet upside down on some rags or a bathmat to protect the finish. Press the wax ring firmly over the toilet's drain hole. If the toilet is being installed over a new tile floor that has raised the floor level 1/4" or so, use a wax ring with a vinyl sleeve on it that extends into the closet flange. Some plumbers like to put on two wax rings for extra precautions against a leak.
Turn the toilet right side up and set it carefully on the closet flange so that the flange bolts slip through the holes in the toilet base. Sit on the toilet and rock back and forth slightly until it is firmly seated. Tighten the flange bolt nuts until the bowl does not rock, but be very careful not to over tighten, which can crack the toilet bowl. If that happens, you will have to get a new one.
Put the new tank on the bowl, following the assembly instructions. Generally there are two bolt holes in the bottom of the tank. Install the rubber gasket flange between the tank and toilet and then bolt the tank to the bowl. When the bolts are snug tight against their rubber washers, reconnect the water supply line, turn on the water, fill the bowl, and check for any leaks.