Edward Beavis, 34, of no fixed address, pleaded guilty to arson and criminal damage, at Salisbury magistrates court.
If follows a fire at Avenue Primary School in Warminster, in which two classrooms were destroyed. Nobody was injured in the blaze.
He is due to be sentenced at Salisbury Crown Court on date yet to be decided.

Laura Jayne Stuart, 33, was wounded in the incident near Love Lane and High Street at around 04:00 BST on Saturday and died on Sunday.
Jason Cooper, 27, who is from the town, has been charged in connection with the incident.
He appeared before Mold Crown Court on Tuesday and was remanded in custody.
A post mortem examination revealed the mother-of-two died as a result of stab wounds.
Senior investigating officer Det Ch Insp Neil Harrison said: "The weapon used remains outstanding despite a comprehensive search by specialist officers.
"From initial inquiries we believe a kitchen knife with a 5in blade was used and then disposed of.
"We are therefore asking anyone in the immediate area of Love Lane Denbigh and en-route to, and around, Denbigh Castle to check any outbuildings, gardens, and bins for any trace of the knife and to contact police immediately if one is found but to leave it for officers to recover."
A man has admitted setting fire to a primary school which was partially destroyed in a blaze early on Wednesday.
[NEXT_CONCEPT]
People in Denbigh have been asked to search their outbuildings, gardens and bins for a kitchen knife used in a fatal stabbing.