This page redirects to an external site: https://developer.wordpress.org/reference/functions/generate_random_password/
This function has been deprecated. That means it has been replaced by a new function or is no longer supported, and may be removed from future versions. All code that uses this function should be converted to use its replacement if one exists. See also wp-includes/deprecated.php.
Use
any of these functions instead.
Description
Generates a random password of the specified length (up to a maximum of 32 characters).
Replace With
Parameters
- $len
- (integer) (Optional) The length of the password to generate. Values over 32 will return a 32 character password.
- Default: 8
Return values
- (string)
- A random password of length $len.
Usage
<?php generate_random_password($len) ?>
Examples
<?php
echo 'Random password: '.generate_random_password( );
?>
Notes
This function executes the random_password filter after generating the password.
Change Log