Turn off the power to the vanity light circuit at the main electrical panel.
Remove the cover plate screws from the junction box using the appropriate screwdriver. Turn the screws counterclockwise. Remove the cover.
Pull the wires from the vanity light out from the box as far as the wiring will allow.
Remove the wire nuts from the black hot wire, the white neutral wire and the bare copper ground wire. Turn the nuts counterclockwise.
Test the black and white vanity light wires with a voltage tester to ensure that no power is reaching the circuit.
Loosen the wire clamp screws on the junction box that secures the vanity light wires. Turn the screws counterclockwise.
Pull the wires out from the junction box.
Reinstall the wire nuts on the power supply wiring inside the junction box. Wrap electrical tape around the wire nuts.
Replace the cover on the junction box. Turn the cover screws clockwise with the screwdriver to tighten.
Cut the ends of the vanity light wires off at the base of the outer sheathing, using wire cutters. Fresh tips will make reliable connections inside the new plug.
Remove approximately 2 inches of sheathing from the cable, using a utility knife.
Strip 1/4 inch of insulation from the black and white wires, using the wire strippers.
Remove the plug cover from the new plug assembly to access the terminals. Turn the screws at the prong end of the plug counterclockwise, using a screwdriver.
Pull the vanity light wiring through the rear of the plug cover. The cover must be installed before connecting the wires.
Insert the black wire into the brass terminal until it is fully seated. Secure the wire by tightening the terminal screw clockwise with a screwdriver.
Install the white wire into the silver terminal and tighten the screw.
Connect the bare copper wire to the green grounding terminal. Tighten the green screw clockwise.
Slide the cover forward over the terminals. Turn the cover screws clockwise to tighten.
Tighten the cable clamp screws at the rear of the plug cover. Be sure that the clamp is secured over the sheathing and not the individual wires.
Restore power to the bathroom circuit if other outlets or devices were connected jointly with the vanity light.
Plug the vanity light into any available outlet to test.