Unplug the power cord from the wall outlet. Turn off both water supply spigots at the wall. Slide the washing machine away from back wall enough that you are able to access the two water supply line connections at the back of the washing machine.
Set a bucket behind the washing machine, under the supply line connections. Loosen the connections with a pair of slip-joint pliers, and remove the supply lines from the washing machine. Place the ends of the lines into the bucket to catch residual water.
Disconnect the control console from the top of the washing machine, if you have a standard top-load cabinet. The control console has either a screw on each end or spring clips under each end depending upon the manufacturer. Loosen and remove the screws with a Phillips-head screwdriver, or slide a putty knife between the bottom of the control console and top of the washer to disengage spring clips. Remove the screws securing the rear access panel to the washing machine if you have a front-load unit.
Follow the power cord from the back of the access panel or the back of the console to the connector. The power cord on some washing machines has a green ground wire attaching to the frame or cabinet as well. Pull the connector apart with your fingers. If you have a power cord with a green ground wire, remove the screw securing the wire to the washing machine with a Phillips-head screwdriver.
Pry off with a flat-head screwdriver the retaining clip securing the power cord to the rear panel of the control console or access panel.. Pull the power cord through the access panel or the back of the control console.
Insert the connector end of the new cord through the back of the control console or access panel. Push the retaining clip into the hole until it snaps into place. Plug the connector on the end of the power cord into the washing machine connector. The connector only attaches one way. Secure the green ground wire to the washing machine with the retaining screw, if your washer uses the green wire.
Reattach the control console to the top of the washer or attach the rear access panel to the washing machine. Thread the water supply lines onto the washing machine until hand tight. Turn the line connections another 2/3 turns with the slip-joint pliers. Push the washing machine back toward the rear wall, and plug the new power cord into the outlet. Turn on both water spigots at the wall to supply water to the unit.