WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How to set a Static page (example Sample Page with every WordPress install) as default fron page for every newly created site on multisite network. I mean when a new user creates a site on my multisite network a Page with custom name sets as front page automatically. Please tell me how to accomplish that.

share|improve this question

1) To set Your first page you can add new page as home.php in your directory. Wordpress by default take home.php as its first page if it is declared.

2) Go to settings->Reading->Front page display. You can set here your front page which will display when your site open.

share|improve this answer

Try the following code. Based on these two Q&A's (not tested):

add_action( 'wpmu_new_blog', 'process_extra_field_on_blog_signup', 10, 6 );

function process_extra_field_on_blog_signup( $blog_id, $user_id, $domain, $path, $site_id, $meta ) {
    $homepage = get_page_by_title( 'Sample Page' );   
    if ( $homepage )
        update_blog_option( $blog_id, 'page_on_front', $homepage->ID );
        update_blog_option( $blog_id, 'show_on_front', 'page' );

Use it as a Must Use plugin.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.