Warning: This function has been deprecated. Use wp_generate_password() instead.

generate_random_password() WordPress Function

The generate_random_password() function allows you to generate a random password for your WordPress account. This is useful if you want to create a strong password that is not easily guessed.

generate_random_password( int $len = 8 ) #

Generates a random password.


Description

Top ↑

See also


Top ↑

Parameters

$len

(int)(Optional) The length of password to generate.

Default value: 8


Top ↑

Source

File: wp-includes/ms-deprecated.php

function generate_random_password( $len = 8 ) {
	_deprecated_function( __FUNCTION__, '3.0.0', 'wp_generate_password()' );
	return wp_generate_password( $len );
}


Top ↑

Changelog

Changelog
VersionDescription
3.0.0Use wp_generate_password()
MU (3.0.0)Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.