The short order came after the discovery last weekend of a cluster of six infected people at a residential compound in the city, the first new cases in more than a month.
China has moved quickly to snuff out new outbreaks wherever they pop up, even as it relaxes restrictions on the movement of people and reopens public attractions to limited numbers of visitors.
Jilin province, which borders North Korea in China's northeast, has suspended all public transport and imposed other restrictions as it battles a fresh outbreak.
In neighbouring Heilongjiang province, which dealt with its own outbreak recently, the city of Harbin is quarantining anyone coming from Jilin for 14 days and banning them from hotels.
The sudden order appeared to confuse local officials. A man who answered the mayor's hotline in Wuhan said that districts have 10 days to arrange the testing in their respective jurisdictions.
But a woman who answered later Wednesday said the tests must be done in the next 10 days.
A major state-owned news website, Jiemian, said it had obtained an implementation plan for the city's Wuchang district that said all residents should be tested by May 20.
Wuhan was the area hit hardest by the coronavirus
in China. Of the 4,633 reported deaths nationwide, 4,512 were in Hubei province, including 3,869 in Wuhan, the provincial capital.
China imposed a lengthy lockdown on most of Hubei in late January to stem the spread of the virus. People were forbidden from entering or leaving the province, public transportation suspended and residents were mostly restricted to their homes.
The lockdown was lifted outside of Wuhan after two months, and in Wuhan itself on April 8, after 2 1/2 months.
The new cases appear to have shocked city officials into action. They dismissed the Communist Party secretary of the neighbourhood where the cluster was found for poor management of the residential community, the official Xinhua News Agency said.
The order said the testing should focus on the elderly, densely populated areas and those with mobile populations, according to the media reports.
It wasn't clear if that meant only some people would be tested or if they would be prioritised.
One expert at Wuhan University told the Global Times newspaper that 3 million to 5 million residents have already been tested, which could leave 6 to 8 million others
for a citywide test.