Installing a water heater is a sequence, and most of the failures that show up years later come from a step that was skipped rather than a part that was cheap. The appliance is the least interesting part of the job.
Sizing comes before shopping
A tank is sized on first-hour rating and household demand, not on the old unit's label. A family that ran out of hot water with a forty-gallon tank will run out again with another forty-gallon tank, however new it is. Adding a bathroom, a second dishwasher or a tenant changes the calculation.
Tankless sizing works differently: it is driven by the flow rate of the fixtures that run at the same time and the temperature rise needed. Two showers plus a laundry tap is a different number from one shower.
Venting and combustion air
A gas water heater's flue has to be sized and routed to the appliance, and the room needs combustion air. Replacing an atmospheric unit with a power-vented or condensing model changes the venting requirements, sometimes substantially. A shared flue in an older building needs to be assessed rather than assumed.
Clearances and access
Service access matters. A unit boxed into a corner with no room to reach the anode rod, the relief valve or the drain valve is harder to maintain and harder to repair, which is a cost that arrives later. Platform and closet installations also need to satisfy clearance-to-combustibles requirements.
The permit and the strapping
In California, installing or replacing a water heater is permit work under the Plumbing Code, and storage units must be braced against seismic movement. The inspection is where venting, relief discharge, strapping and clearances get checked by someone other than the installer.
Water connections and the drain pan
Flexible connectors, a shut-off valve on the cold inlet, dielectric unions where dissimilar metals meet, and a drain pan with a discharge line where a leak would damage the structure. These are small parts that decide whether the next leak is a mop or a repair bill.
What the day looks like
Drain and disconnect the old unit, remove it, set and connect the new one, fill and purge air, test for leaks, light and verify operation, then arrange inspection. Unexpected findings, such as a corroded shut-off valve or a vent that does not meet clearance, change the schedule and are worth flagging early.
For a straight swap where the old unit has failed, the replacement page covers the same ground with the removal and disposal included.