This invention relates generally to a codon optimized nucleic acid encoding a retinitis pigmentosa GTPase regulator (RPGR) protein. The nucleic acid has enhanced stability during plasmid production relative to a wildtype cDNA encoding the RPGR protein. The invention also relates to expression cassettes, vectors, and host cells comprising the codon optimized nucleic acid. Methods for preparing a recombinant adeno-associated (rAAV) expression vector comprising the codon optimized nucleic acid sequence are also provided. The nucleic acids, expression cassettes, vectors, and host cells provided may be useful in the large scale production of rAAV expression vectors for gene therapy applications.