Catalyzes the formation of UDP-glucose from glucose-1-phosphate and UTP (PubMed:33556370). This is an intermediate step in the biosynthesis of diglucosyl-diacylglycerol (Glc2-DAG), i.e. the predominant glycolipid found in B.subtilis membrane, which is also used as a membrane anchor for lipoteichoic acid (LTA) (PubMed:33556370). YngB contributes to wall teichoic acid (WTA) glucosylation and glycolipid formation under anaerobic fermentative growth conditions (PubMed:33556370). Might also enter other glycosylation pathways, leading to the decorating of other cell envelope components with glucose residues under anaerobic or other growth conditions (PubMed:33556370). alpha-D-glucose 1-phosphate + H(+) + UTP = diphosphate + UDP-alpha-D-glucose kcat is 0.264 sec(-1) with glucose-1-phosphate as substrate. kcat is 0.293 sec(-1) with UTP as substrate. Glycolipid metabolism; diglucosyl-diacylglycerol biosynthesis. Homodimer. Expressed under anaerobic conditions. GtaB is the main UGPase enzyme producing UDP-glucose under both aerobic and anaerobic fermentative growth conditions (PubMed:33556370). YngB augments UDP-glucose production under anaerobic growth conditions (PubMed:33556370). Belongs to the UDPGP type 2 family.