• April 16

5 Ways to Change Password in WordPress Themes

Your password to WordPress themes admin is the key to your site. As with any other keys, you can forget your password or lose. In this article we will discuss five ways to change the password in WordPress, which will help you regain access to your site in the event of loss of password, email address, and even if you are a victim of burglary.

Change the password via the user profile in your WordPress themes

Change your password in WordPress themes you can through the user profile settings. Once you have logged into the administration panel WordPress, go to the menu Users → Your profile and then search for a new password. Here you can set a new password for the current user.

If you are a site administrator, you can also change the password for another user by selecting it in the user menu → All Users. Note the scale of changes that will help you choose a longer password and reliable.

WordPress themes

This method is the most simple and convenient, but unfortunately not applicable in cases where you cannot log in to the control panel to WordPress themes. Fortunately, other options do not require input.

Password recovery by email

If you have forgotten the password of your site on WordPress, then you can restore it by e-mail. In the login form (at /wp-login.php) you can click the link “Forgot your password” and enter your e-mail address or username.

WordPress themes

Within a few minutes to your e-mail will receive a letter with a special link to reset your password. When you click on this link, you will be presented with a form where you can enter a new password for your user. Just as in the first method, you will be presented indicator changes the password in your WordPress themes.

Change the password using phpMyAdmin

Most hosting providers provide access to phpMyAdmin – a utility for working with databases MySQL, WordPress theme that stores all the information about their users. If you cannot go to phpMyAdmin, advised to seek help from your hosting provider, or try another way to change your password.

Once you are logged in phpMyAdmin, find the database of your site and select it in the left pane. It is easy to recognize by the presence of tables wp_posts, wp_postmeta, wp_comments, wp_commentmeta, wp_users, wp_usermeta etc. Note that the prefix may be different.

Here we are interested in the table wp_users. Once you open it, you will see a list of all users of your website. Select of the user whose password you want to change and click the button “Edit”. You will be given a form of editing user.

User_pass field is responsible for the selected user password. To change the password, it is important to select the MD5 from the drop-down list for the field user_pass, and then enter the new password in the value field.

After saving your changes, you can log in to WordPress administration panel using your new password. Note that changing the password in phpMyAdmin, you will not see it in the clear in the table wp_users, because WordPress stores all passwords in encrypted form.

Change the password via the console MySQL

If your hosting provider does not provide a package of phpMyAdmin, you can try to connect to your MySQL database using MySQL client command line. This method is more advanced and is not recommended for beginners.

Once connected to the server via SSH, log on to the MySQL server from the command line, replacing the values username and password (as well as the localhost, if you connect to a remote database):

mysql -uusername -ppassword -hlocalhost

Specify the user name whose password you want to change, use the UPDATE command to change the password. As well as with phpMyAdmin, here you need to use MD5 when entering a new password.

Changing the password file using PHP

When other methods are not available, the password in WordPress can be changed using a simple PHP file. For this method, you will need access to the FTP server that stores your site. Create a new PHP file with any name (password-recovery.php) and the following contents:

<? php add_action ('init', 'my_password_recovery');
function my_password_recovery () { $ User = get_user_by ('login', 'my-username');
wp_set_password ('my-new-password', $ user-> ID);}

This code is in the user database with the given username, password and change it. Do not forget to replace the values ​my-username and my-new-password for your user name and password.

Then open your FTP client and connect to the server of your site. In the directory where you installed WordPress themes, locate the folder wp-content and go to it. Locate the directory mu-plugins (not to be confused with a directory plugins). If plugins’ directory does not exist – create it. Load the mu-plugins directory you created a PHP file.

The final path to the file should look like this: wordpress / wp-content / mu-plugins / password-recovery.php

Once you have downloaded your file, you can log in to WordPress admin panel using the password that you specified in your PHP file.

Finally, do not forget to re-enter your mu-plugins directory and delete the file you created password-recovery.php. If you do not, WordPress themes will change the password every time you visit your site, significantly reducing its speed.

If you have any problems with changing your WordPress password, please visit our WordPress forum. Our team can help you to get the best password to Wthe ordPress admin panel.

This site use cookies
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.
Nope... I Am on a diet