How to Change WP Password With FTP (without DB access)

There's going to be a time, where you forget the password, and other series of problems like:

  • Lost your password
  • You have no access to DB
  • It's difficult to access DB (you have to install phpmyadmin etc)
  • Your server is not set up for email.
  • No mail goes out of the system.

I know I have. So here's what you can do.

1. Copy to functions.php, remember to change "Hello World". Change user ID accordingly.

$user_id = 1;
$password = 'HelloWorld';
wp_set_password( $password, $user_id );

Paste this under <?php in functions.php.

2. Go to default URL.

3. Go back to function and delete what you've pasted.

4. Go to wp-admin, use the new password.

A share would be, Sublime.

Hi, I'm Edwin

I'm a multilayer Marketer + Designer that helps businesses get more leads. My core skills are web design, SEO and Copywriting. I work at Web Design, Laman7

WP Debug True - Life Saver

Notes on Wed, 09 Jan 2019

Runcloud Force SSL TLS HTTP to HTTPS

Notes on Tue, 31 Dec 2019
Malaysia Website Awards