Skip to content
A little preparation. A much better adventure.Independent travel advice · Made for China

Where to go

Shanxi: Pingyao's walled city and Datong's grottoes

The best-preserved walled city in China and a UNESCO cave complex, both a short train from Beijing — with two ticket rules that catch people out badly.

Last verified . Entry rules, fees and limits change often — check the sources at the bottom before you rely on anything here.

Two traps, first

These are the two things that ruin Shanxi trips, and both are avoidable.

1. Yungang Grottoes is online-booking only. Since 1 January 2025 the on-site ticket counters have been abolished. There is no gate counter. Turn up without a booking and you do not get in. Book up to 7 days ahead through the official channel, real-name.

2. The Hanging Temple has a two-part ticket. ¥15 lets you look at it from across the river. A separate ¥100 ticket lets you climb onto it. People buy the ¥15, walk up, and discover they cannot go on. If you want to walk the boardwalk, buy both.

A second thought on that one: the boardwalk is narrow with low railings and dense crowds. If you dislike heights, the ¥15 view takes about ten minutes and is honestly the better purchase.

Pingyao

¥125 for the combined ticket, covering 22 sites inside the walls — the city wall itself, the Rishengchang exchange house, the County Government Office, the Confucian temple and more.

It is valid 72 hours from first use, which is the planning fact: Pingyao rewards two nights, not a day trip. Ticketed sites close at 17:30, or 18:30 in summer.

Buy online through the official WeChat platform, which is faster, or at any of the six gate offices, which take Alipay and WeChat.

Wear shoes you can walk cobblestones in — the wall circuit alone is 6 km.

### The courtyard houses nearby

  • Wang Family Courtyard, about 35 km southwest, ¥55. A fortified hillside of courtyards, far larger than the Qiao compound and much less crowded. Allow three hours.
  • Qiao Family Compound, about 40 km north, ¥115, famous as the set of *Raise the Red Lantern* — and heavily commercialised.

If you only do one, make it the Wang compound. It is cheaper, bigger and quieter.

Datong

  • Yungang Grottoes — ¥145 in peak season (1 April – 31 October), ¥125 low season. UNESCO World Heritage, about 16 km west of the city. Caves 5, 6 and 12 are the highlights, and photography inside is restricted. Remember: book online, there is no counter.
  • Hanging Temple — see above. About 4 km south of Hunyuan, roughly 65 km from Datong.
  • Huayan Temple — ¥40–50 depending on source, and reportedly free during morning chanting from 06:00 to 07:30. The Liao-dynasty Mahavira Hall is one of the largest surviving timber Buddhist halls in China.
  • Datong city wall — free to climb by day, ¥10 for the evening light show. It is a modern reconstruction of the Ming circuit, but a good lit evening walk.

Getting there

This is the easy part, and the reason to go.

Beijing North or Qinghe to Datong South takes about 1 hour 45 minutes on the fastest G trains, with roughly 43 services a day between 06:44 and 20:17. Datong to Taiyuan is about two hours, and Taiyuan is the usual gateway for Pingyao.

A clean three-to-four-day loop: Beijing → Datong (two nights) → Pingyao (two nights) → Xi'an or back to Beijing.

One honest gap

We could not find a reliable source on the best and worst months for Shanxi, so we are not asserting any. It is a continental climate with cold winters and hot summers; check a forecast rather than trusting a guess.

Watch it before you go

Other people's videos, on YouTube — we link, we don't host. Worth knowing: YouTube is blocked in mainland China, so watch these at home, or download them in the YouTube app before you fly.

Videos belong to the channels credited above. We have no affiliation with them and earn nothing from these links.

See how this applies to your trip

Enter your passport and dates and we’ll tell you what you specifically need to do, with the deadlines.

Read next

Sources