Karpaka Vinayakar Temple is an ancient rock-cut cave shrine dedicated to Ganesha, located at Thiruppatthur.In the cave temple, there are rock-cut images of Siva and other gods as well as several shrines. The Āgama texts found on stones in the temple help date the temple between the years 1091 and 1238. A unique Tamil image of Pillaiyar found in the temple helps to verify this dating. The presiding deity of the temple is Karpaka Vinayakar.
It was built after viewing a hillock by the early Pandya kings. The image of Pillaiyarpatti Pillaiyar and that of a Siva Lingam were carved out of a stone by a sculptor named Ekkattur Koon Peruparanan who put his signature on a stone inscription, in the Tamil Language used between the 2nd and 5th century, found even today in the sanctum. It is believed that the icon of Pillaiyarpatti Pillaiyar must have been carved around the 4th century AD.
Pillaiyarpatti is located near Thiruppathur, Sivagangai District of Tamil Nadu. It is situated between Kundrakkudi and Tiruppatthur. Pilliyarpatti is 12 Kilometres away from Thiruppatthur and 3 kilometres from Kundrakkudi. Pillaiyarpatti Karpaga Vinayagar is carved out in a cave of Pillaiyarpatti Hillocks. Lord Vinayagar is carved out from the rock of the cave. Lord Thiruveesar is also carved in the rock of this cave. The temple was built under patronisation of Pandyas. The age of the cave temple is 2500 years or more. There are 14 stone Sculptures in the cave. These stone sculptures state the ancient names of Pillaiyarpatti such as Ekkattoor, Thiruveenkaikkudi, Maruthangudi, and Rajanarayanapuram. The temple opens at 6 in the morning and stays open until 1 PM. The shrine is again opened at 4 PM and is open until 8.30 PM. The Vinayagar sannidhi is a cave where the 6 feet of Karpaga Vinayagar has been carved inside. As this is a cave formation, there is no provision to go around for the pradakshina.