How to Reset WordPress Password Through FTP

reset the WordPress password through FTP
WordPress password change

In case you lost your WordPress admin password, you can use the password reset function to recover it. But what if your hosting’s mail server is not working? There may be some other cases including one when you have installed WordPress on your local system and forgot the password. You can not use the password reset function here.

In all these kinds of possibilities, you only have one way to recover the password. Change the password directly in the database. But WordPress use salted hash and store it in the database. So, you can directly update the password using PHPMyadmin or any other SQL client.

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.

Also see: WordPress How-To Guides

Reset WordPress Password Through FTP

Follow these simple steps:

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

Step 2: Now open the folder of the theme your WordPress website is currently using.

Step 3: Open functions.php in a file editor and this line at the top of the file:

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

Step 4: Save the changes.

Step 5: Now Open your WordPress blog in the browser and navigate to the login page. Now you can log in using the password “password”. It will simply redirect the page without opening the WordPress dashboard.

Step 6: Now edit the functions.php again and remove the line you have just added.

Step 6: Now you can log in again using the password “password”. After the successful login, change the password from the WordPress dashboard. Try to have a secure password that contains characters, numbers and the special symbol.

Final Words

Now you know how to reset WordPress admin password without using the native password reset function. If you have access to WordPress files using FTP or Cpanel, you can reset the WordPress password using the mentioned way.

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


Tags: | |

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 | Part of Techlomedia Internet Pvt Ltd Developed By Deepanker