CaerphillyWelsh Caerffilicastle town, Caerphilly county borough, historic county of Glamorgan (Morgannwg), Wales. The town grew up outside a 13th-century castle. The still-incomplete structure was destroyed in 1270 by the Welsh prince Llywelyn ap Gruffudd but was rebuilt from 1271 onward, with some 14th-century additions. Covering 30 acres (12 hectares), the castle is the largest in Britain after Windsor; it was built on a concentric plan with a surrounding moat. Derelict by 1536 except for one part used as a prison, the castle was further destroyed in the English Civil Wars (during the 1640s) by Parliamentary forces; one tower still leans at an angle after an unsuccessful attempt to blow it up. In 1949 the marquess of Bute donated the castle to the crown. During the 19th century Caerphilly became a mining town and was also a centre for a local cheese-making industry. Cheese-making was suspended for a time but has resumed. The town suffered economically and lost population when coal mining ceased in the late 20th century, but the community has attracted light industries. It is also an active shopping centre and a residential base for commuters to Cardiff. Pop. (19912001) 28,481urban agglom., 39,212.