When the power source runs directly to a light fixture rather than to its switch, you can wire in a second switch for the light fixture by following these 10 steps.
Step 1: Use the breaker or fuse in the circuit panel to turn off the power to the existing switch and light fixture.
Step 2: Remove the cover plate and mounting screws from the switch. Gently pull the switch out from the wall to expose the wires behind. There should only be two wires and possibly a ground wire running into the box. Use a voltage sensor to determine that there is no power running to any of the wires.
Step 3: With the switch in the off position, turn the power source back on and use a voltage sensor to identify the “hot” wire attached to the switch. Mark the wire with electrical tape.
Step 4: Install an electrical box for the new switch and run a red, a black and a white wire from the new switch to the old switch. Mark the white wire on either end with a piece of black electrical tape.
Step 5: At the new switch box, attach the black wire to the gold screw on the paired side of the new three-way switch. Attach the red wire to the silver screw and attach the white wire to the gold screw on the opposite side of the switch. Attach the ground wire to the green screw.
Step 6: Replace the old switch with a three-way switch also. Attach the “hot” wire from the old switch to the gold screw on the paired side of the replacement switch. Attach the old ground wire to the replacement switch’s green screw.
Step 7: Use a wire nut and electrical tape to attach the last original wire coming into the box to the black wire running to the new switch.
Step 8: Use a wire nut and electrical tape to join the grounding wire from the new switch to the other grounding wires.
Step 9: Attach the red wire running from the new switch to the silver screw on the paired side of the replacement switch.
Step 10: Attach the marked white wire from the new switch to the gold screw on the non-paired side of the replacement switch.
Turn the power on and test the switches before securing everything back into place.