Location: 50 miles (80 km) from Yosemite entrance; 67 miles (108 km) from Yosemite Valley; via Highway 120 (map)
Sonora: Population 4,610; elevation 1,796 feet (547 meters)
Jamestown: Population 3,017; elevation 1,427 feet (435 meters)
Sonora and Jamestown are former mining towns a few miles apart in the foothills along Highway 49, California's aptly numbered gold rush highway. Both have historic downtown districts and vintage buildings (and in the case of Jamestown, trains) that have served as sets or exteriors in various films and tv shows, including High Noon, Back to the Future III, Hidalgo, and hundreds of others.
Shopping & Supplies: Two full-sized grocery stores here, a Safeway and a SaveMart, plus several gas stations. Sonora's boutiquey gold rush district has the usual antiqueries, coffee shops, and tuxedo rentals, plus a bookstore, sporting goods, and - a sure sign of a fun town - multiple bail bondsmen.
Pro: Sonora has a handsome, bustling gold-rush-era downtown district that's an attraction of its own. Jamestown has one as well, shorter but more peaceful. (Sonora's is along Highway 49 and can get heavy automobile traffic - it starts the other side of the stoplight in the above photo.)
Con: It's a long drive to make twice a day, especially given one extremely serpentine section of Highway 120 you'll have to navigate. Sonora and Jamestown probably work better as bases for exploring the gold rush area than Yosemite.
Lodging TLDR: Reviews on the area's hotels are decidedly mixed, but the 1859 Historic National Hotel, Miner's Motel, Best Western Plus Sonora Oaks, and Gunn House Hotel all score 80% or better on TripAdvisor, and the Barretta Gardens Inn tops 95%.
1859 Historic National Hotel
18183 Main Street · (800) 894-3446 · (209) 984-3446 · Reviews · Website
9 guest rooms, $140 weekdays and some weekends; breakfast buffet included; restaurant & saloon onsite; built in 1859
Americas Best Value Inn & Suites - Royal Carriage
18239 Main Street · (888) 315-2378 · (209) 984-5271 · Reviews · Website
Queen guest rooms and kitchenette-equipped cottages, $70 - $150; free Internet, free continental breakfast
Country Inn Sonora
18730 Highway 108 · (800) 847-2211 · (209) 984-0315 · Reviews · Website
63 guest rooms; free Internet and continental breakfast; outdoor pool; $60 - $375
Jamestown Hotel
18153 Main Street · (800) 205-4901 · (209) 984-3902 · Reviews · Website
8 guest rooms, $90 - $200 (see rates page); free breakfast; restaurant onsite
Jamestown Railtown Motel
10301 Willow Street · (800) 252-8299 · (209) 984-3332 · Reviews · Website
20 guest rooms, summer rates $80 - $100; outdoor pool; some pets allowed ($10 fee)
Miner's Motel
18740 Highway 108 · (800) 451-4176 · (209) 532-7850 · Reviews · Website
18 guest rooms; outdoor pool; some pets allowed ($10 fee)
Victorian Gold Bed & Breakfast
10382 Willow Street · (888) 551-1851 · (209) 984-3429 · Reviews · Website
8 guest rooms, $110 - $185; free Internet; some pets welcome; built 1890s
Barretta Gardens Inn Bed & Breakfast
700 South Barretta Street · (209) 532-6039 · Reviews · Website
8 non-smoking guest rooms, all with private baths, $110 - $390 (see rates page); restored Victorian farmhouse built in 1903
Best Western Plus Sonora Oaks
19551 Hess Avenue · (866) 856-2797 · (209) 533-4400 · Reviews · Website
101 guest rooms & 17 suites, summer rates $125 - $200; free Internet and continental breakfast; outdoor pool; some pets allowed ($25 fee)
Days Inn
160 S. Washington Street · (800) 872-3297 · (209) 532-2400 · Reviews · Website
double/queen/king rooms and suites, summer rates $80 - $150; free Internet and breakfast
Gold Lodge
480 W. Stockton Street · (800) 363-2154 · (209) 532-3952 · Reviews · Website
42 guest rooms, some smoking, summer rates $50 - $90; free Internet and breakfast
Gunn House Hotel
286 S. Washington Street · (209) 532-3421 · Reviews · Website
19th-century hotel with 12 guest rooms, $80 - $115 per night
Inns of California
350 S. Washington Street · (866) 856-4556 · (209) 532-3633 · Reviews · Website
Two double/two queen/one king room types, summer rates $80 - $180; free Internet and breakfast; pets allowed ($100 deposit, $25 fee)
Sonora Aladdin Motor Inn
14260 Mono Way · (800) 696-3969 · (209) 533-4971 · Reviews · Website
Two queen or one king room types, $80 - $145 (see rates page); free Internet and breakfast; pets allowed in some rooms