Preheat the oven to 200°C, fan 180°C, gas 6. Place the chicken in a large greased roasting tin and stuff the cavity with half the onion and garlic, 2 lemon quarters and half the thyme.
Remove the leaves from half of the remaining thyme sprigs, place in a bowl with the butter and mix well. Spread over the chicken skin with a butter knife.
Scatter the remaining onion, garlic, lemon and thyme around the chicken and drizzle with a little oil. Season the chicken, vegetables and lemon with freshly ground black pepper.
Place in the centre of preheated oven and cook for 1 hour 15-20 minutes, basting occasionally during cooking. To check it is cooked, insert a skewer into the thickest part of the thigh – the juices should run clear.
Remove from the oven. Transfer the chicken, veg and lemons to a serving dish or platter. Cover with foil and leave to rest for 10 minutes. Serve with peas, carrots and roast potatoes, if you like.