SEOS THEMES

Free WordPress Themes
logo My Account
Buy All 40 Premium Themes For the Price Of €79.98

How to set default front page in WordPress

Get page by title and set on front page

$homepage = get_page_by_title( 'Front Page' );
if ( $homepage ) {
update_option( 'page_on_front', $homepage->ID );
update_option( 'show_on_front', 'page' );
}

^