When your favourite light fixture starts exhibiting problems, you are left with a dilemma--either leave it up and deal with the inconsistent reliability or throw it away and install a brand new light fixture. For some, neither of those solutions are ideal. If the latter sounds like you, you're in luck. You can learn how to rewire the light fixture so it can provide you with many more years of eye-pleasing service.
Turn off the circuit breaker in the electrical panel that delivers power to the light fixture you wish to rewire.
Remove the cover and the bulb from the light fixture.
Remove the light fixture's base from the mounting bracket and carefully pull it away from the wall or ceiling. Before you disconnect the wires, check them for voltage using the touch-type voltage tester. If no voltage is read, then disconnect the wires and take the fixture to a table where you can work on it.
Look at the socket. It should either be screwed in place or held in place by a pressure clip. Remove the socket by unscrewing the retainer screw or unclipping it. If the socket happens to be held in place by a pop rivet, you can break it off.
Take the socket to your local home improvement store and purchase a replacement. If the home improvement store doesn't have it, look at your nearest electrical supply store. In most cases, the replacement socket will come with the wires already attached to it.
Take the new socket and fish the wires through the hole in the light fixture where the old socket's wires went through. Then, secure the socket to the fixture body by either clamping it or screwing it in place. If the fixture had a pop riveted socket, you will have to secure it using a nut and bolt. Make sure the socket is tightly installed and not loose.
Connect the black socket wire to the black wire in the wall or ceiling box. Connect the white socket wire with the white wall or ceiling wire. Connect the wall/ceiling box's ground wire with the ground wire on the fixture if it has one.
Resecure the light fixture to the mounting bracket, install the bulb and the cover and turn the circuit breaker back on. Your job of rewiring the light fixture is complete.
Always turn off the power at the electrical panel before working on any electrical circuit.