Nov 02, 2020 in Drupal 8

Snippet to programmatically set the frontpage

\Drupal::configFactory()
      ->getEditable('system.site')
      ->set('page.front', '/home')
      ->save();

 

Comments