Nearly 12 million are permitted to go outdoors, according to health official Wu Ganyu.
Wu told reporters that the virus was “under effective control” for the first time in some parts of the city.
More than 4 million reside in areas where the status shifted from closed to controlled.
Wu said some are not allowed to leave their neighborhoods and large gatherings are prohibited.
While China’s case numbers are still relatively low, the ruling party is enforcing a “zero-COVID” strategy.
On Wednesday, the government reported 19,927 new cases in China’s mainland. Shanghai accounted for 95% of the total, or 18,902 cases.
The Shanghai city health agency reported seven people who had COVID-19 died Tuesday but said the deaths were due to cancer, heart disease and other ailments. All but two of those who died were over 60.
The shutdowns of Shanghai and other industrial centers following a spike in infections in March led to complaints about a lack of access to supplies of food and medicine.
People in Shanghai who test positive but have no symptoms have been ordered into quarantine centers and other public buildings.
The Ministry of Agriculture ordered local officials Wednesday to avoid measures that might interfere with spring planting by farmers who feed China’s 1.4 billion people.
The International Monetary Fund reduced its forecast of global-economy” target=”_blank”>Chinese growth<
The lockdowns in China “will likely compound supply disruptions elsewhere” and might add to pressure for inflation to rise, the IMF said.
The Associated Press contributed to this report.