Described herein are methods and systems for O-glycosylating proteins in vivo or in vitro in any prokaryotic organism. In these methods and systems, DNA comprising a gene that produces a PglL-like oligosaccharyltransferase and DNA comprising a gene that produces a protein to be O-glycosylated are used. The PglL-like oligosaccharyltransferase facilitates the covalent attachment of the glycan to the protein to produce the O-glycosylated protein. The methods and systems described herein provide an approach for the design and production of new vaccines and therapeutic agents for the treatment of various diseases.