Sections of Commonwealth Avenue in Boston will be closed to traffic for the next few weeks as crews work to replace the part of the roadway that spans over the Mass Pike.

State officials are warning of "hellish" traffic and urging people to stay away from the area if possible.

"If you don't need to be here, don't come anywhere near the area," Transportation Secretary Stephanie Pollack told WBUR.

But, if you're one of the (many) people who need to get around the area, here's what you should know:

Drivers

Commonwealth Avenue

Comm. Ave. will be closed to traffic between Kenmore Square and Packard's Corner from 7 p.m. on July 27 through 5 a.m. on Aug. 14. The Department of Transportation says access for businesses and residents will be maintained between Packard's Corner and St. Paul Street as well as between St. Marys Street and Kenmore Square, though no private vehicle access will be permitted between St. Paul and St. Marys streets.

Here's how MassDOT suggests you get around the closure:

Get full detour details here.

Boston University Bridge

The BU Bridge will be closed to all public traffic from 7 p.m. on July 27 through 5 a.m. on Aug. 14. (MBTA buses will still be permitted to pass. More details on bus detours below.)

Here's how MassDOT suggests you get around the closure:

Get full detour details here.

Storrow Drive

The University Road exit from Storrow Drive will be closed from 7 p.m. on July 27 through 5 a.m. on Aug. 14.

Mass Pike

The Mass Pike between the Allston-Brighton interchange and the Beacon Street overpass went down to three lanes in each direction earlier this month. Starting at 9 p.m. on July 28, travel will be restricted to two lanes in each direction through 5 a.m. on Aug. 7.

There will be further lane reductions during off-peak hours as the bridge replacement project progresses:

Between July 28 and Aug. 1 from 7 p.m. to 5 a.m. there will be just one eastbound lane open and two westbound lanes.

Between Aug. 2 and Aug. 7 from 8 p.m. to 6 a.m. there will be just one westbound lane open and two eastbound lanes.

On weekend days — from 9 p.m. on Fridays to 5 a.m. on Mondays — those lane reduction patterns will occur all day.

There are also a couple of ramp closures:

The eastbound on-ramp from Cambridge Street/Soldiers Field Road will be closed from 9 p.m. on July 28 through 5 a.m. on Aug. 7.

The westbound exit 20 off-ramp will be closed from approximately 9 p.m. on Aug. 1 through approximately 5 a.m. on Aug. 7.

See MassDOT's Mass Pike detour maps here and get the full details here.

Other Notes

-Memorial Drive in Cambridge, which is normally closed to traffic between Western Avenue and Mount Auburn Street on Sundays in the summer, will remain open on July 30 and Aug. 6.

-Carlton Street will be closed to vehicles from 7 p.m. July 27 through 5 a.m. Aug. 14.

Pedestrians and Cyclists

Full access will be maintained for pedestrians and cyclists across Commonwealth Avenue and over the BU Bridge throughout the project. However, Mountfort Street will be closed.

Here's MassDOT's recommended detour route:

There will also be additional Hubway stations on Comm. Ave. during the shutdown, at Babcock Street and Silber Way. That's in addition to the stations already in the area. (See Hubway's station map here.)

MassDOT says Hubway employees will be at the Babcock Street and Silber Way locations to assist customers Mondays through Fridays from 7 a.m. to 10 a.m. and 4 p.m. to 7 p.m. They will also have additional bikes available.

During construction Hubway is offering a single ride pass for $1 or a $20 discount on an yearlong membership via their new app.

MBTA Passengers

Green B Line

The Green B Line will be replaced with shuttle buses between Babcock Street and Blandford Street stations from 9 p.m. on July 26 to 5 a.m. on Aug. 14. Those shuttles will not stop at BU West or BU Central when heading inbound. Get all the details here.

Workers remove MBTA Green Line B branch tracks on Commonwealth Avenue on Thursday, as part of the bridge replacement. The Peter Pan buses, at left, are shuttling MBTA riders. (Kathleen Dubos for WBUR)

Commuter Rail/Amtrak

The Framingham/Worcester Line, which runs under the Comm. Ave. bridge alongside the Pike, will run as normal on weekdays.

During the weekends of July 29/30 and Aug. 5/6, service will terminate at Boston Landing and shuttle service will be provided to Reservoir Station on the Green Line's D branch. There will be additional service around Red Sox games those weekends. Here are the full details.

Bus

MBTA bus routes 47 and CT2 will need to follow detours from 7 p.m. on July 27 to 5 a.m. on Aug. 14, though they are allowed to travel over the BU Bridge.

There will be no service to Mountfort St. at Lenox St. (inbound) and Mountfort St. at Carlton St. (outbound). Instead, inbound passengers will be able to use stops at the BU Bridge at Comm. Ave. and at St. Marys Street at Comm. Ave, and outbound passengers may use stops at Comm. Ave. at St. Marys Street and Comm. Ave. at University Road.

(MassDOT)

Route 57 will operate its normal route, though it will not stop at Comm. Ave. and Carlton Street or Comm. Ave. and St. Marys Street from 7 p.m. on July 27 through Aug. 13.

Get the full bus detour details here.

The state is urging people to bike and walk in the area, especially for short trips, and encouraging the use of Hubway. To that end, they've created this guide for walking and biking times between Babcock Street and Kenmore Square:

You can keep track of the project via this timelapse from Boston University.