Chosen Solution

How to replace the USB ports with new ones?

Depending on which side you can replace the right side MacBook Pro 13" Retina Display Mid 2014 I/O Board Replacement. The left port is part of the main logic board that would be expensive to replace. It might be better to get the board repaired at that point.