First go to the Unifi website and find your device and the version of the firmware you’d like.
Hit download, accept the EULA and grab the direct URL
Log into the Unifi controller, select the device you’d like to manully update the firmware on.
Then expand manage device and paste the direct URL and select custom upgrade.
If this fails then try using the terminal upgrade method