Plered (also Pleret) was the location of the palace of Amangkurat I of Mataram (r. 1645–1677). Amangkurat moved the capital there from the nearby Karta in 1647. During the Trunajaya rebellion, the capital was occupied and sacked by the rebels, and Amangkurat died during the retreat from the capital. His son and successor Amangkurat II later moved the capital to Kartasura. It was twice occupied by Diponegoro, during the Java War (1825–1830) between his forces and the Dutch. The Dutch assaulted the walled complex in June 1826, which was Diponegoro's first major defeat in the war.
Following the Java War, the town's decline accelerated and today it is in ruins. The remains are now located in the Bantul Regency, Special Region of Yogyakarta, Indonesia, close to the banks of the Opak River, and south of Kota Gede. It has been researched for archaeological remains It is located to the east of the site of Sultan Agung's Karta Palace at Karta. It is also the location of extensive irrigation and other water works which occurred at the time of the palace being used.
Sultan Agung (r. 1613–1645) built the previous court complex at Karta and moved the capital there in the first decade of his reign. The decision to move to a new capital might have been made during his reign in 1634, when a fire in Karta killed "many people of the court". In 1644, Sultan Agung started building an artificial lake in an area which became known as Plered. He died two years later and was succeeded by his son Amangkurat I. In 1647, shortly after taking the throne, Amagkurat built his royal residence near the lake and moved the court there. In contrast to Karta, which was made of wood, the royal compound at Plered was built of brick. Amangkurat continued to expand this complex up to 1666.