Catalyzes the prenylation of para-hydroxybenzoate (PHB) with an all-trans polyprenyl group. Mediates the second step in the final reaction sequence of coenzyme Q (CoQ) biosynthesis, which is the condensation of the polyisoprenoid side chain with PHB, generating the first membrane-bound Q intermediate. 4-hydroxybenzoate + an all-trans-polyprenyl diphosphate = a 4-hydroxy-3-all-trans-polyprenylbenzoate + diphosphate Cofactor biosynthesis; ubiquinone biosynthesis. Flies exhibit a G1/S block in the third larval instar with normal neuronal differentiation. Belongs to the UbiA prenyltransferase family.