Title: register_initial_settings
Published: December 6, 2016
Last modified: August 20, 2026

---

# register_initial_settings()

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/register_initial_settings/?output_format=md#description)
 * [Source](https://developer.wordpress.org/reference/functions/register_initial_settings/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/register_initial_settings/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/register_initial_settings/?output_format=md#changelog)

Registers default settings available in WordPress.

## 󠀁[Description](https://developer.wordpress.org/reference/functions/register_initial_settings/?output_format=md#description)󠁿

The settings registered here are primarily useful for the REST API, so this does
not encompass all settings available in WordPress.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/register_initial_settings/?output_format=md#source)󠁿

    ```php
    function register_initial_settings() {
    	register_setting(
    		'general',
    		'blogname',
    		array(
    			'show_in_rest' => array(
    				'name' => 'title',
    			),
    			'type'         => 'string',
    			'label'        => __( 'Title' ),
    			'description'  => __( 'Site title.' ),
    		)
    	);

    	register_setting(
    		'general',
    		'blogdescription',
    		array(
    			'show_in_rest' => array(
    				'name' => 'description',
    			),
    			'type'         => 'string',
    			'label'        => __( 'Tagline' ),
    			'description'  => __( 'Site tagline.' ),
    		)
    	);

    	if ( ! is_multisite() ) {
    		register_setting(
    			'general',
    			'siteurl',
    			array(
    				'show_in_rest' => array(
    					'name'   => 'url',
    					'schema' => array(
    						'format' => 'uri',
    					),
    				),
    				'type'         => 'string',
    				'description'  => __( 'Site URL.' ),
    			)
    		);
    	}

    	if ( ! is_multisite() ) {
    		register_setting(
    			'general',
    			'admin_email',
    			array(
    				'show_in_rest' => array(
    					'name'   => 'email',
    					'schema' => array(
    						'format' => 'email',
    					),
    				),
    				'type'         => 'string',
    				'description'  => __( 'This address is used for admin purposes, like new user notification.' ),
    			)
    		);
    	}

    	register_setting(
    		'general',
    		'timezone_string',
    		array(
    			'show_in_rest' => array(
    				'name' => 'timezone',
    			),
    			'type'         => 'string',
    			'description'  => __( 'A city in the same timezone as you.' ),
    		)
    	);

    	register_setting(
    		'general',
    		'date_format',
    		array(
    			'show_in_rest' => true,
    			'type'         => 'string',
    			'description'  => __( 'A date format for all date strings.' ),
    		)
    	);

    	register_setting(
    		'general',
    		'time_format',
    		array(
    			'show_in_rest' => true,
    			'type'         => 'string',
    			'description'  => __( 'A time format for all time strings.' ),
    		)
    	);

    	register_setting(
    		'general',
    		'start_of_week',
    		array(
    			'show_in_rest' => true,
    			'type'         => 'integer',
    			'description'  => __( 'A day number of the week that the week should start on.' ),
    		)
    	);

    	register_setting(
    		'general',
    		'WPLANG',
    		array(
    			'show_in_rest' => array(
    				'name' => 'language',
    			),
    			'type'         => 'string',
    			'description'  => __( 'WordPress locale code.' ),
    			'default'      => 'en_US',
    		)
    	);

    	register_setting(
    		'writing',
    		'use_smilies',
    		array(
    			'show_in_rest' => true,
    			'type'         => 'boolean',
    			'description'  => __( 'Convert emoticons like :-) and :-P to graphics on display.' ),
    			'default'      => true,
    		)
    	);

    	register_setting(
    		'writing',
    		'default_category',
    		array(
    			'show_in_rest' => true,
    			'type'         => 'integer',
    			'description'  => __( 'Default post category.' ),
    		)
    	);

    	register_setting(
    		'writing',
    		'default_post_format',
    		array(
    			'show_in_rest' => true,
    			'type'         => 'string',
    			'description'  => __( 'Default post format.' ),
    		)
    	);

    	register_setting(
    		'reading',
    		'posts_per_page',
    		array(
    			'show_in_rest' => true,
    			'type'         => 'integer',
    			'label'        => __( 'Maximum posts per page' ),
    			'description'  => __( 'Blog pages show at most.' ),
    			'default'      => 10,
    		)
    	);

    	register_setting(
    		'reading',
    		'show_on_front',
    		array(
    			'show_in_rest' => true,
    			'type'         => 'string',
    			'label'        => __( 'Show on front' ),
    			'description'  => __( 'What to show on the front page' ),
    		)
    	);

    	register_setting(
    		'reading',
    		'page_on_front',
    		array(
    			'show_in_rest' => true,
    			'type'         => 'integer',
    			'label'        => __( 'Page on front' ),
    			'description'  => __( 'The ID of the page that should be displayed on the front page' ),
    		)
    	);

    	register_setting(
    		'reading',
    		'page_for_posts',
    		array(
    			'show_in_rest' => true,
    			'type'         => 'integer',
    			'description'  => __( 'The ID of the page that should display the latest posts' ),
    		)
    	);

    	register_setting(
    		'discussion',
    		'default_ping_status',
    		array(
    			'show_in_rest' => array(
    				'schema' => array(
    					'enum' => array( 'open', 'closed' ),
    				),
    			),
    			'type'         => 'string',
    			'description'  => __( 'Allow link notifications from other blogs (pingbacks and trackbacks) on new articles.' ),
    		)
    	);

    	register_setting(
    		'discussion',
    		'default_comment_status',
    		array(
    			'show_in_rest' => array(
    				'schema' => array(
    					'enum' => array( 'open', 'closed' ),
    				),
    			),
    			'type'         => 'string',
    			'label'        => __( 'Allow comments on new posts' ),
    			'description'  => __( 'Allow people to submit comments on new posts.' ),
    		)
    	);
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/option.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-includes/option.php#L2743)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/option.php#L2743-L2962)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/register_initial_settings/?output_format=md#related)󠁿

| Uses | Description | 
| [register_setting()](https://developer.wordpress.org/reference/functions/register_setting/)`wp-includes/option.php` |

Registers a setting and its data.

  | 
| [__()](https://developer.wordpress.org/reference/functions/__/)`wp-includes/l10n.php` |

Retrieves the translation of $text.

  | 
| [is_multisite()](https://developer.wordpress.org/reference/functions/is_multisite/)`wp-includes/load.php` |

Determines whether Multisite is enabled.

  |

[Show 1 more](https://developer.wordpress.org/reference/functions/register_initial_settings/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/functions/register_initial_settings/?output_format=md#)

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/register_initial_settings/?output_format=md#changelog)󠁿

| Version | Description | 
| [6.0.1](https://developer.wordpress.org/reference/since/6.0.1/) | The `show_on_front`, `page_on_front`, and `page_for_posts` options were added. | 
| [4.7.0](https://developer.wordpress.org/reference/since/4.7.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fregister_initial_settings%2F)
before being able to contribute a note or feedback.