On the heels of President Trump’s European visit, Angela Merkel is now convinced the continent “must take its fate into its own hands.” Given Trump’s belief that Germany is “very bad for the U.S.,” one can hardly fault Mrs. Merkel for opting to distance herself from the new president. Unfortunately, Americans are stuck with Mr. Trump and his policies for the foreseeable future. That is, unless Democrats are up to the challenge of adjusting their message and policy priorities.

As Mrs. Merkel and France’s recently-elected Emmanuel Macron move to shore up the defense of liberalism in Europe, the same tide of right-wing populism they are holding at bay is alive and well in the United States. Many are now looking to the Democratic Party to offer solutions and a new path forward. One way Democrats can do that is to rethink their march towards far-left political progressivism and start fashioning a broader, more centrist vision for America. To do so, they should look to inspiration from two sources: continental Europe and Silicon Valley.

Embracing the ethos and politics of Silicon Valley will help the Democrats stay relevant. This is because most Valley types don’t fit neatly in either political camp,  and their philosophical ethos isn’t quite as libertarian as some might believe. Rather, they can be described by a term coined by journalist Greg Ferenstein: civicrats. This ideology places a premium on the value of markets and innovation as forces for good. However, it also recognizes that government has a role to play as an investor in its citizens in order to help them maximize their full social and economic potential.

Unfortunately, Democrats haven’t done a good job exporting this mentality outside of the Valley. If they can capitalize on a message that exhorts civic inclusion, economic dynamism, and an optimism surrounding technological progress (techno-optimism), the party can finally counter the pessimistic narrative of an America in decline that is being trumpeted by the populist right.

This messaging has already proven effective in Europe.

In Germany, Mrs. Merkel has enabled the emergence of a centrist, non-ideological political community. Political polarization is a non-issue. The government, and Mrs. Merkel in particular, tends towards a weaker and inoffensive form of elite governance while ignoring the temptation to embrace the toxic rhetoric and issue priorities of the progressive far left. As a result, the country has remained a bastion of liberal democracy, open to immigrants and trade, while retaining a strong and growing economy.

In France, meanwhile, we are witnessing a glimpse of just how effective the unity of political centrism and Silicon Valley techno-optimism can be.

Like Mrs. Merkel, Mr. Macron has expressed support for more open and liberal immigration policies as well as free trade. Like most in Silicon Valley, he is a pro-business, pro-innovation optimist with the energetic vibrancy typical of a young startup entrepreneur. He embraces labor market reforms, lowering corporate taxes, and is committed to the transatlantic cosmopolitan mentality that has been a hallmark of the post-war order.

He is everything the Democrats need in a candidate to counter the populist groundswell.

Democrats need to learn the lessons of Europe’s liberals, and adjust their strategies and messaging accordingly. Rather than shifting further left in their economic policy prescriptions, they need to embrace more market-friendly policies to counter the fears of economic fatalism that plague the working middle class. They need to start addressing the concerns of average Americans living in the political center, not issues that live on the fringe or gain credence only on university campuses. Mr. Macron is proof that a narrative focused on moderate economic reform that paints a picture of a better world for everyone can trounce a populist rival.

Now, more than ever, is the time for moderate liberals to shine. But to do that, they need to concentrate their efforts on reorienting the Democratic Party’s priorities. That means focusing their attention on moderate policies that can make a better world for all Americans, not just urban elites. By marrying the politics of European centrism with the optimistic narratives that animate Silicon Valley, the Democratic Party could stand to make impressive gains in future elections.

Mr. Macron and Mrs. Merkel have provided Democrats a blueprint for how they can start winning again. If Democrats don’t want Mr. Trump to hold the destiny of America in his hands, they’ll need to get serious about embracing that blueprint. Failure to do so will render Democrats politically catatonic for the foreseeable future.