The 44-year-old's departure from the club comes after Tuesday night's 3-1 defeat at Yeovil.
After the loss at Huish Park, the former Stevenage boss insisted that he would not resign from his post.
"I'm a professional person and when things aren't working it is my responsibility to do what I can to put them right," he said.
"I have never walked away from anything in my life and don't expect me to."
Westley leaves the Lilywhites just five points above the npower League One relegation zone, with only one win in the competition since November.
- Sports & Recreation