rewire
To rewire something is to change or repair it so that it works the way that you want it to. You might rewire a light switch so that it turns on and off automatically, or you might rewire a computer so that it can be used with different software.
The computer needed to be rewired in order to use the new software.
The light switch needed to be rewired so that it would turn on and off automatically.