You can read the full executive order here.
It also directs Defense Secretary Jim Mattis to find housing for these families and to build facilities if necessary.
A 2015 court order currently prevents the federal government from detaining children with their parents in detention centers for more than 20 days. This decision was in a case that established standards for the care of migrant children — what is known as the Flores settlement. In the order, the president also directs Attorney General Jeff Sessions to file a request in U.S. District Court in California to modify the Flores settlement so that the families could be detained together until their court dates.
The order also provides that the Department of Homeland Security won't detain an immigrant family together "when there is a concern that detention of an alien child with the child's alien parent would pose a risk to the child's welfare."
Reaction to the executive order began coming almost immediately. Trump's daughter, Ivanka, thanked her father on Twitter for "taking critical action ending family separation at our border."
Democrats, however, indicated they were not satisfied with the action.
"This Executive Order doesn't fix the crisis," said Sen. Kamala Harris, D-Calif., on Twitter. "Indefinitely detaining children with their families in camps is inhumane and will not make us safe."
Harris also noted that the executive order does not say anything about reuniting the more than 2,000 children who have been separated from the parents as part of the policy.
"When will they see their parents again?" she said. "They must be reunited immediately."
In a conference call with reporters Wednesday evening about the order, Gene Hamilton, counselor to Sessions, referred questions about families that have already been separated to DHS and the Department of Health and Human Services.
Before the president signed the order, lawmakers from both parties, mindful of how frequently Trump reverses course — particularly on immigration, where he has repeatedly shifted positions within the course of hours — waited to see the details of what it would do.
Sen. Robert Menendez, D-N.J., repeatedly shrugged his shoulders when asked about Trump's announcement. "I don't have much hope with the president that he'll do something that's actually good."
"He's thinking of doing something?" asked Sen. Chris Coons, D-Del. "I need to see what he actually does to have any real comment."
Sen. Pat Roberts, R-Kansas, one of 13 Senate Republicans who signed a letter urging Trump to end his administration's separation policy, was also waiting on the yet unknown details. "If that's what he's done, then that's a good thing," he said.
Former President Barack Obama also released a statement via Facebook Wednesday morning.
"To watch those families broken apart in real time puts to us a very simple question: are we a nation that accepts the cruelty of ripping children from their parents' arms, or are we a nation that values families, and works to keep them together?" he said. "Do we look away, or do we choose to see something of ourselves and our children?"
During his remarks Wednesday morning, Trump again called on Congress to pass legislation to address the issue of family separations, which was created by his administration's policy. Since early May, 2,342 children have been separated from their parents after crossing the Southern U.S. border, according to the Department of Homeland Security.
Trump's decision to reverse course comes despite the fact that administration officials have insisted for days that only Congress could fix the problem.
House Speaker Paul Ryan, R-Wis., said Wednesday morning that the House will vote on immigration legislation, despite signs that the bills up for consideration cannot pass.
The House is expected to vote Thursday on the pair of immigration proposals. The first will be a hard-line option written by Rep. Bob Goodlatte, R-Va., to cut back on both legal and illegal immigration. The second option is a compromise between conservatives and Republican moderates.
Both bills include language to end the controversial White House policy of separating migrant parents from their children at the border.
"Tomorrow we're going to have a vote on legislation that makes sure we can enforce our laws and keep families together," Ryan told reporters at a weekly press briefing. "We don't think families should be separated."
Ryan said it is a "ridiculous choice" to decide between separating families and enforcing laws, and that both bills up for consideration would take steps to solve the issue.
But multiple House Republicans say they don't believe that either bill can pass, even after Trump told GOP members he would support them on immigration.
Conservative Rep. Warren Davidson, R-Ohio, told NPR's Rachel Martin that both bills represent a compromise, and neither has sufficient support.
"I don't think either of them can pass right now," Davidson said. "The compromise that's most recent is a compromise within a compromise."
Trump told Republicans during a closed-door meeting Tuesday night that he would support them "1,000 percent" on immigration but did not specifically back either bill.
Meanwhile, Democrats spent Wednesday morning calling on Trump and congressional Republicans to end the policy in speeches on the House floor. Civil rights icon Rep. John Lewis, D-Ga., opened a series of speeches saying "as we stand here, a 5-year-old woke up in a cage."