The cyclodextrin glycosyltransferase (CGTase) is an important enzyme for cyclodextrin (CD) production, and is also widely used in the biotechnology, food, and pharmaceuticals industries. Secretory CGTase production by recombinant Komagataella phaffii using defined medium is a promising approach because of low cost, less impurity protein. It was found that no CGTase was expressed using traditional defined medium (basal salt medium [BSM]) because of pH value decreasing significantly. CGTase was expressed by recombinant K. phaffii through pH maintenance in range of 5.5–7.0. β‐CGTase activity increased to 122.0 U/mL after optimization of glycerol, phosphate buffer, pH value, ammonium sulfate, temperature, methanol, and additives based on BSM, establishing a modified defined medium. These results showed that it was necessary to establish recombinant K. phaffii‐based special defined medium although the same host cell used for different heterologous protein expression.