How to Replace a Lamp Cord. Replacing a lamp's electrical cord is often easier and safer than repairing it. Repaired cords are more likely to have loose connections or bad splices, which can cause fires or shocks.
Things You'll Need
Putty Knife Or Screwdriver
Plenty Of Blades And Utility Knives
Unplug the lamp. Remove the lamp shade and unscrew the lightbulb from the socket.
Unscrew or snap the socket from the lamp, using a screwdriver if necessary, to gently pry the socket-shell base from the socket shell.
Unscrew the two wires from the socket's bottom.
Pull the wires off the screws, and then pull the cord out of the lamp from the bottom.
Push the new electrical cord into the lamp from the bottom up. Push slowly and evenly to avoid getting the wire stuck, particularly if the lamp is long.
Pull through a section of the new cord once it appears at the top of the lamp; it should be long enough to work with comfortably, a foot or two.
Separate the cord's two wires with a razor blade or utility knife, cutting 2 to 4 inches down the cord's center.
Strip about 1 inch of insulation from the separated wire ends with a wire stripper. (Do not cut toward yourself, and take care not to pinch the palm of your hand.) Make sure there are no other nicks or cuts elsewhere on the cord.
Twist the ends of each exposed wire clockwise so they don't fray, then curl each into a small hook.
Place one hook over each screw in the socket, wrapping the wire in a clockwise direction (this will help ensure a snug fit under the screw).
Make sure the wires won't come into contact with each other, then tighten the screws.
Reassemble the lamp by first screwing in the socket. Then replace the bulb and shade.
When replacing a defective cord, also replace the plug (see 'eHow to Replace a Plug').
It is potentially dangerous to work with electrical systems. If you are unsure about your abilities or about any aspect of the project, call an electrician (see "eHow to Hire an Electrician').