Does the pH of milk increase as spoils?

Yes, the pH of milk increases as it spoils.

Fresh milk has a slightly acidic pH, typically between 6.5 and 6.7. As milk spoils, bacteria and other microorganisms begin to grow and ferment the lactose (milk sugar) into lactic acid. This increase in lactic acid causes the pH of the milk to decrease. However, as the spoilage process continues, the bacteria and microorganisms also produce ammonia and other alkaline compounds, which neutralize the lactic acid and cause the pH of the milk to increase. As a result, the pH of spoiled milk can be significantly higher than that of fresh milk, sometimes reaching values of 7.0 or even higher.