How to Reset WordPress Password Through FTP


WordPress password changeIn case you lost your WordPress admin password, you can use password reset function to recover passwords. But what if your hosting’s mail server is not working? There may be another case when you have install WordPress on your local system and forget the password. You can not use password reset function because mail server is not there.

In all these kind of possibilities, you only have one way to recover the password. That is change password directly in the database. But WordPress use salted hash and store it in the database. You need to have the advance knowledge to use this process which I will cover later.

If you have FTP access you can use another way to change the password. You can either use FTP or go in file manager direct from cPanel.

How to Reset WordPress Password Through FTP

Follow these simple steps:

Step 1: Navigate to the directory \wp-content\themes\ directory. This directory contains WordPress theme.

Read: How to Backup WordPress Based Website

Step 2: Open Functions.php in file editor and this line at the top of the file:

<?php wp_set_password('password',1); ?>

Step 3: Save the changes.

Step 4: Now Open your WordPress blog in browser and navigate to login page. Login with username (typically admin) and password “password”

Step 5: After login into WordPress dashboard, edit the functions.php again and remove the line you have just added.

Step 6: Now change the password from the WordPress dashboard. Try to have a secure password which contains characters, numbers and the special symbol.

In case you have any problem, you can comment below.

Tags: | |
Nord VPN Sale

Deepanker Verma is the founder of Techlomedia. He is a tech blogger, developer and gadget freak.

Similar Articles


Leave a comment

Comment policy: We love comments and appreciate the time that readers spend to share ideas and give feedback. However, all comments are manually moderated and those deemed to be spam or solely promotional will be deleted.

2020 UseThisTip | Developed By Deepanker