The first time I heard about Pingyao was not on this website, but in the Lonely Planet guidebook for China. They were extolling the virtues of this most historic Chinese town as one of the top tips for China. Having been fooled by Lonely Planet's so called top tips repeatedly before and after, I didn't prioritize getting there the first time I went to China (Beijing area).
Eventually, I read up on Pingyao and it materialized as one of the places I really wanted to see. In China. And globally. What I often find lacking in Asia are consistent cities, the likes you find plenty in Europe. Places where you can just get lost and stroll the roads, always finding new small treasures. In most of Asia, you find some old buildings or single blocks squeezed between modern concrete towers. Supposedly, Pingyao was different...
The backstory of Pingyao is similar to other sites. For centuries, Pingyao was the financial hub of China. In the 19th century due to the foreign colonial incursions, the financial center moved to the coast (Hongkong, Shanghai) and the town was largely forgotten. Nowadays, it is a tiny city even for German standards (42.000 inhabitants), let alone Chinese where it wouldn't even count as a suburb.
The slumber protected the city center from the blessings of modernity. And it also was not subject to the demolitions of the culture revolution. So, within its city walls (the largest remaining in China), it stayed the same city it was in the 19th century. You can enter and explore plenty of the historic estates on the main roads, several of them former banks. You can also climb the city wall and there are several temples to visit. The city does a good job of being accessible and providing background on the city's history. But the best part was just strolling the many side streets. I spent four hours in the city and it would have been more, if I hadn't been freezing for hours by then due to me visiting in January. On the plus side, the whole city was stunningly decorated for Chinese New Year.
In sum, this is the quintessential Chinese town and belongs with the best sites in China and the world.
Getting There
Pingyao has a bullet train station on the Xian-Beijing line (Xian 3h, Beijing 4h). So it's a nice stop if you plan to travel between the two. I visited as a day trip from Xian and that worked fine.
As always, the bullet train station is outside of town. There are local buses waiting for you to take you into town (North or South Gate). To return, it's easiest to go to the old train station where all buses for the bullet train station pass.
Near the bullet train station is the Shuanglin Temple. I think it would be best to simply take a cab to get there and then continue into town.