This cheese and onion pie is a proper British classic, made rich and deeply savoury with slowly caramelised onions, sharp mature Cheddar, and a golden shortcrust pastry. It’s a hearty, comforting bake that works as a midweek dinner or a weekend centrepiece, and the filling stays creamy and sliceable thanks to a few simple tricks. The recipe follows the generous, no-fuss style James Martin is known for, but the results are all yours to enjoy.
Ingredients
- 2 lb 4 oz (1 kg) onions, thinly sliced
- 4 tbsp (60 g) butter, plus extra for greasing
- 2 tbsp olive oil
- 1 tsp salt
- 1 tsp black pepper
- 1 tsp sugar (optional, helps caramelising)
- 2 tbsp all-purpose flour
- 1 cup (240 ml) whole milk
- 1 cup (240 ml) heavy cream
- 2 tsp Dijon mustard
- 2 cups (200 g) grated mature Cheddar cheese
- 1 cup (100 g) grated Red Leicester or extra Cheddar (optional, for colour)
- 1 lb 2 oz (500 g) shortcrust pastry (homemade or store-bought)
- 1 egg, beaten, for glazing
Instructions
- Preheat the oven to 375°F (190°C). Grease a 9-inch (23 cm) pie dish with butter.
- In a large, heavy-bottomed pan, melt the butter with the olive oil over medium heat. Add the sliced onions, salt, pepper, and sugar if using. Cook gently for 25–30 minutes, stirring occasionally, until the onions are soft, golden, and caramelised. They should reduce significantly in volume.
- Sprinkle the flour over the onions and stir well. Cook for 2 minutes to remove the raw flour taste.
- Gradually pour in the milk and cream, stirring constantly. Bring to a gentle simmer; the mixture will thicken. Cook for 3–4 minutes until it coats the back of a spoon.
- Remove from the heat and stir in the mustard and grated cheeses. Taste and adjust seasoning—it may need more salt depending on your cheese. Set aside to cool slightly while you roll the pastry.
- Roll out two-thirds of the pastry on a floured surface to about ¼-inch (5 mm) thick. Line the pie dish, leaving an overhang. Prick the base with a fork.
- Pour the cheese and onion filling into the pastry case, spreading it evenly.
- Roll out the remaining pastry for the lid. Brush the rim of the base pastry with beaten egg, then place the lid on top. Press the edges to seal, then trim and crimp with a fork or your fingers. Cut a small steam hole in the centre.
- Brush the whole top with beaten egg. Place the pie on a baking sheet to catch any drips.
- Bake for 40–45 minutes, until the pastry is golden brown and the filling is bubbling through the steam hole. If the edges brown too quickly, cover them with foil.
- Let the pie rest for 10 minutes before slicing. This helps the filling set for cleaner slices.
Tips
- Caramelise properly: Don’t rush the onions. Low and slow gives sweetness; high heat makes them bitter. If they catch, add a splash of water.
- Cool the filling: If you pour hot filling into pastry, it can make the base soggy. Let it cool for 10–15 minutes before assembling.
- Cheese choices: Mature Cheddar is essential for flavour. Red Leicester adds colour but you can use all Cheddar. Avoid pre-grated cheese—it contains anti-caking agents that affect melting.
- Prevent soggy bottom: Brush the base pastry with a little beaten egg before adding the filling—this creates a barrier.
Serving Suggestions
Serve warm with a pile of buttery mashed potatoes and steamed green beans or peas. For a pub-style meal, add a side of chunky chips and a dollop of Branston pickle. A simple tomato and onion salad also cuts through the richness nicely.
Variations
- Add potato: Layer thinly sliced cooked potato in the bottom of the pie before adding the filling for a heartier version.
- Herby twist: Stir in 1 tablespoon chopped fresh thyme or chives with the cheese.
- Puff pastry top: Use puff pastry for the lid instead of shortcrust for a flakier, lighter topping.
- Add leeks: Replace half the onions with sliced leeks for a milder, sweeter flavour.
Storage and Reheating
Refrigerate leftover pie within 2 hours of baking. It will keep for up to 3 days. To reheat, cover with foil and warm in a 350°F (175°C) oven for 20–25 minutes, or until piping hot throughout. You can also microwave individual slices for 2–3 minutes, but the pastry will soften. The pie can be frozen, unbaked or baked, for up to 3 months—thaw overnight in the fridge before baking or reheating.
Frequently Asked Questions
Can I use ready-made shortcrust pastry? Yes, absolutely. Store-bought shortcrust works well and saves time. Just make sure it’s all-butter for the best flavour, and roll it out slightly thinner if it’s a thick block.
Why is my filling runny? This usually happens if the onions weren’t cooked down enough, or if the flour wasn’t cooked out. Make sure the onions are well caramelised and the sauce thickens before adding cheese. Letting the filling cool also helps it set.
Can I make this pie ahead of time? Yes, assemble the pie completely, then refrigerate unbaked for up to 24 hours. Add 10–15 minutes to the baking time. You can also freeze it unbaked for up to 3 months—bake from frozen, adding 20 minutes.
What’s the best cheese for this pie? Mature Cheddar is the classic choice because it melts well and has a strong flavour. You can mix in Gruyère or Red Leicester for extra depth. Avoid mild cheeses—they won’t stand up to the onions.
Can I make it vegetarian? This recipe is already vegetarian as long as you use vegetarian-friendly cheese and pastry (some contain animal rennet). Check labels if that’s important to you.
How do I stop the pie from leaking in the oven? Place the pie on a baking sheet to catch any drips. Also, make sure the filling isn’t too hot when you assemble, and don’t overfill—leave a little room for bubbling.
Related
- Cheese and Onion Pie: How Long to Cook It
- How to Cook Fried Bread (Crispy & Golden)
- How to Make Treacle Tart with Golden Syrup
More recipes to cook
Safety notes: safe minimum internal temperatures from USDA FSIS; raw and undercooked fish guidance from the U.S. FDA. Food safety notes
Spotted an error? Tell us and we will correct it (corrections policy).