The surprise performance starring the 80-year-old former Beatle was announced on Thursday, with “first come first served” tickets selling out in under an hour.
The Cheese and Grain entertainment venue in Frome, Somerset will host Sir Paul from 5pm on Friday.
On their website, it said: “In 24 hours time from now Paul McCartney will be performing live, here in Frome, at the Cheese and Grain.
“What an incredible opportunity to watch Paul warm up for his Glastonbury headlining performance this weekend.
“What an amazing treat… we are told this won’t be his normal set either so should be an afternoon full of wonderful surprises.”
Sir Paul will become Glastonbury Festival’s oldest ever solo headliner when he takes to the stage this weekend, which marks exactly a week after celebrating his 80th birthday.
The festival will return with the former Beatle as its Saturday night headliner, his second time topping the Pyramid stage bill after a performance in 2004.
The music offering this year also features headliners Billie Eilish and Kendrick Lamar, with Diana Ross filling the Sunday Teatime Legends slot.
On Thursday, Glastonbury co-organiser Emily Eavis thanked festivalgoers for their commitment in attending the event, saying she thinks “the best people in the world come here”.
The 42-year-old was speaking the day after the festival opened its gates for the first time in three years after it was cancelled twice amid the coronavirus pandemic.
Eavis told the festival’s on-site newspaper, the Glastonbury Free Press: “We offered refunds, but so few people took us up on it.
“That commitment people showed to us is absolutely not taken for granted and it meant so much.
“I genuinely think the best people in the world come here.
“Bands always say this audience is the most generous, respectful and up-for-it crowd there is.
“So I would like to say thank you to everyone who’s supported and stuck by us over the last three years.
“And now I just hope you all have an absolutely amazing time.”
Eavis said that having to cancel Glastonbury in 2020 and 2021 was “a very sad and quite traumatic thing to have to go through”.
She added: “Particularly when you cancel and you don’t actually know when you’ll be back.
“But there’s been no escape from the pandemic – everyone has been hit by it to some degree.
“And ultimately, this is just a festival; there were greater things going on in the world. But to be able to open the gates again and bring people back together for the purpose of pure joy is such a wonderful thing.”
Over 200,000 people are attending Glastonbury’s near 800-acre (3.2 million square metre) site in Pilton, Somerset this year, according to statistics shared by the festival.
That total at Worthy Farm includes 138,000 tickets sold and 67,000 staff, and the venue includes 500 marquees, 100 performance stages and 101 bars, as well as one “secret one”.
The festival also raises over £2 million for charities per year, for 500 causes.
Having spoken previously about the money lost as a result of the cancellations, she said: “We’ve definitely been through some financial struggles.
“It’s been very hairy.
“People forget that we’re still an independent festival.
“It’s a long road for us to recover from the last two years, but the important thing is that we’re back.
“And it feels so great to be able to focus on exciting things again.”
Last minute changes to the Glastonbury line-up include rocker Terry Reid dropping out of his Sunday afternoon slot on the Acoustic Stage.
He will be replaced by Glenn Tilbrook, lead singer and guitarist of Squeeze.
Wolf Alice, who are performing on the Pyramid Stage on Friday, tweeted in the early hours of Thursday morning to say they were stuck in Los Angeles due to their flight being cancelled.
In a tweet to British Airways they wrote: “@British_Airways is there anyway to get us to England from La before we are supposed to play glastonbury on Friday afternoon our flight has been cancelled :(.”
A reply from the airline said to message and they would “see what we can do for you”.
The band also tweeted: “Has anyone got a private jet in La?” adding: “Our flights been cancelled and we need to get to glastonbury not joking.”