Trump administration officials have been discussing the executive order in various forms since 2018, as the president grew increasingly frustrated with tech companies, people familiar with the discussions said. In recent weeks, those discussions have picked up again. In mid-May, Mr. Trump tweeted that the "Radical Left" was in "total command & control" of Facebook, Instagram, Twitter and Google and said the administration was "working to remedy this illegal situation."

Senate Democratic Leader Chuck Schumer of New York said in a tweet on Thursday: "If President Trump doesn't like Twitter, he can do everyone a favor and stop tweeting."

Deepa Seetharaman and Jeff Horwitz contributed to this article.

Write to John D. McKinnon at john.mckinnon@wsj.com and Rebecca Ballhaus at Rebecca.Ballhaus@wsj.com