What to do if you forgot your WordPress password

If you can't log into your WordPress admin panel, there are several ways to restore access. This guide will cover all available options.

Option 1. Password recovery via the login form

  • Go to the login page: https://yourdomain.kz/wp-login.php
  • Click the "Forgot your password?"
  • Enter the administrator's login or email
  • Check your email and follow the recovery link.
  • Set a new password

If you haven't received the email, check your spam folder. Also, make sure the website is sending email correctly.

Option 2: Reset your password via phpMyAdmin

  • Log in to ispmanager (via your Unihost.kz account → Products/Services → Website Hosting → Go)
  • Open the Databases
  • Select the required database and click Web interface DB
  • In phpMyAdmin, find the wp_users
  • Click Edit next to the desired user.
  • In the user_pass enter a new password and select the MD5
  • Click OK to save.

Option 3. Creating a new administrator via functions.php

This method can be used if there is no access to mail and database:

  • Go to /wp-content/themes/your_theme/
  • Open the functions.php and add the following code to the end:
function  create_new_admin () { $user = 'newadmin' ; $pass = 'securepass123' ; $email = 'admin@example.com' ; if (!username_exists($user)) { $user_id = wp_create_user($user, $pass, $email); $user = new WP_User($user_id); $user->set_role( 'administrator' ); } } add_action( 'init' , 'create_new_admin' ); Code language:  PHP  ( php )

After logging into WordPress, remove this code from functions.php .

Security after recovery

  • Delete temporary or test accounts
  • Update your administrator email address
  • Set a unique and complex password
  • Consider enabling two-factor authentication

If you suspect a hack, be sure to check the site for malicious code and update all passwords.

If nothing helps

If you can't restore access on your own, you can contact Unihost.kz technical support. We'll help you restore your WordPress admin login and set up secure access.