Action hook 'wp_install'

in WP Core File wp-admin/includes/upgrade.php at line 152

View Source

wp_install

Action Hook
Description
Fires after a site is fully installed.

Hook Information

File Location wp-admin/includes/upgrade.php View on GitHub
Hook Type Action
Line Number 152

Hook Parameters

Type Name Description
WP_User $user The site owner.

Usage Examples

Basic Usage
<?php
// Hook into wp_install
add_action('wp_install', 'my_custom_function', 10, 1);

function my_custom_function($user) {
    // Your custom code here
}

Source Code Context

wp-admin/includes/upgrade.php:152 - How this hook is used in WordPress core
<?php
 147  		 *
 148  		 * @since 3.9.0
 149  		 *
 150  		 * @param WP_User $user The site owner.
 151  		 */
 152  		do_action( 'wp_install', $user );
 153  
 154  		return array(
 155  			'url'              => $guessurl,
 156  			'user_id'          => $user_id,
 157  			'password'         => $user_password,

PHP Documentation

<?php
/**
		 * Fires after a site is fully installed.
		 *
		 * @since 3.9.0
		 *
		 * @param WP_User $user The site owner.
		 */
Quick Info
  • Hook Type: Action
  • Parameters: 1
  • File: wp-admin/includes/upgrade.php
Related Hooks

Related hooks will be displayed here in future updates.