The 39-year-old has masterminded a surge up the League 2 table since taking permanent charge in November, lifting the Blues from the foot of the Football League to a comfortable mid-table position.
“I’m really, really pleased,” he told Chairboys Player. “I’m honoured, proud and very, very thankful to everyone that has supported me in any way that they have.
“The players, Lee and Dobbo and my staff have been amazing, as have the whole club and the Trust. Everyone has been behind me since day one.
“This is enormous for me and I’m really thankful to everyone who has helped me achieve this. I want to repay the Trust and all the supporters by working so hard and bringing back the glory years. I’ll give it my best shot, I promise you.”
Joint-chairman Don Woodward said: “It’s great to secure Gareth’s services and we are really looking forward to continuing to work with a young but passionate manager.
“He’s been fantastic at getting the best out of players and if we can keep that going and he can keep learning, he should follow in the footsteps that most Wycombe managers have done by progressing his career and taking us along for the ride.
“There’s a lot of work to do but we’ll work as a team and we are very much looking forward to it.
“We are very excited to have a natural leader and a great guy managing our football club, hopefully onwards and upwards.”
Ainsworth has announced that Saturday’s clash against his former club Port Vale at Adams Park will be his last as a professional footballer.
An appearance would see the all-action wideman rack up another milestone in a hugely-successful playing career - his 600th professional outing.
He said: “The hardest part of today is making that decision. Football has been my life for all these years – it’s all I’ve ever done and ever known. I’ve spoken to people who are close to me and everyone seems to think it’s the right thing to do – it’s better to go out on a high.
“Thank you to everyone who has ever shouted for me at every club I’ve played for. It’s been a rollercoaster but I wouldn’t change any minute of it for anything.”
Get your tickets for the final day online or by calling 01494 441118.