I have an extension cord specifically for when i need to charge the controller.
Can You Plug Ps4 Controller Into Wall. This video is about how to charge your playstation controller by plugging into the wall. You can use your dualshock 4 wireless controller away from your ps4.
How to Connect PS4 Controller to PC? from i1.wp.com
How to connect your ps4 controller to a pc using wireless bluetooth. Simply plug the adaptor into a usb port in your pc and turn on your dualshock 4 controller by pressing the home button. (make sure controller is not plugged in) 2.
Connect the controller to your system with a usb cable while the system is on.
Just plug it into your pc and let the drivers install themselves. Plug one end of the cable into your ps4 and the other end into your. Turn on your ps4, connect the controller using a micro usb cable and then press the ps button on the controller. Could get the controller to charge anywhere either.