Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

WordPress How to Install WordPress on Your Computer How to Install WordPress on Your Computer How to Enable Email for WordPress on Your Computer

KaviArasu N S
KaviArasu N S
4,185 Points

Forgot Wordpress password

Have logged out of Wordpress and forgot the password before setting up the SMTP plugin! What should I do now?

2 Answers

Roberto Correale
Roberto Correale
1,539 Points

There are different ways to edit it. You can change it via phpmyadmin, editing the old password with a new one. You need to crypt it in MD5 (there are many tools online for this). Another solution is to insert this code in you functions.php file inside you theme, and upload it via ftp :

wp_set_password( 'new_password', 1 );

1 is the id of your account (you can see it in wp_users, if you account was the first one created is 1). You can also check other methods in the wordpress documentation : https://codex.wordpress.org/Resetting_Your_Password

Question, how did you setup your local environment?