New Customers: 50% OFF Your First Month on All VPS Servers & Web Hosting Plans!

How to access the WordPress admin account?

Learn how to access your WordPress admin account and what to do if you cannot log in. This guide covers the standard login process, password reset by email, command line reset with WP-CLI, and direct database password changes for when other methods fail.

HostworldWindows & remote desktop 4 min read Updated 23 Sep 2026

Go to https://yourdomain.tld/wp-login.php or /wp-admin and sign in with your WordPress admin credentials. If you cannot log in, use Lost your password? on that page, or reset the account with WP‑CLI or phpMyAdmin below.

Before you start

  • Know your site’s correct URL. If you used a plugin to change the login URL, use that custom address instead of /wp-login.php or /wp-admin.
  • Confirm the real username before you run anything. The examples below use admin as a placeholder, and a command or query aimed at a username that does not exist will match no account. With WP‑CLI, list the accounts with wp user list. In phpMyAdmin, open the <prefix>_users table and read the user_login column.
  • Have access to the admin user’s email inbox, or server/database access if the reset email will not arrive.
  • For WP‑CLI on Windows Server 2022, ensure PHP’s command line is installed and on PATH, and WP‑CLI is installed. See the official guidance: PHP CLI on Windows, Install WP‑CLI on Windows.
  • For WP‑CLI on AlmaLinux or Ubuntu, check whether it is already there by running wp --version. If the command is not found, follow the official steps to download wp-cli.phar, make it executable and move it into your PATH: Installing WP‑CLI.

Step 1: Open the WordPress login page

This takes you to WordPress’ authentication screen. Visit one of:

  • https://yourdomain.tld/wp-login.php
  • https://yourdomain.tld/wp-admin (redirects to the login page when logged out)

If a security plugin changed the login URL, the defaults will be blocked while it is active, so use your custom address.

Step 2: Reset the password by email

  1. This sends a password reset link to the email address stored on the WordPress user profile. On the login page, click Lost your password?.
  2. Enter the admin username or email address and submit. Check the inbox and spam folder, then follow the link to set a new password.

If the email does not arrive, WordPress documents these fallbacks. Work down the list until one fits the access you actually have:

  1. WP‑CLI (Step 3), if you have SSH or Remote Desktop access to the server.
  2. phpMyAdmin or SQL (Step 4), if you have database access.
  3. Over FTP or the cPanel File Manager, by adding a temporary wp_set_password( 'newpassword', 1 ); line to your active theme’s functions.php, loading the site once, then removing the line again. The number is the user ID of the account you are resetting.
  4. The emergency password reset script described in Reset your password. It needs the admin email address, and you should delete the file from the site root once you are back in.

Step 3: Reset the admin password with WP‑CLI

This generates or sets a new password directly on the server. Run it from the WordPress installation directory, and if you host multiple sites, target the correct one with --path or --url to avoid changing the wrong account. Replace admin with the username you confirmed earlier.

Windows Server 2022

To generate a new password, suppress the email, and display it on screen:

wp user reset-password admin --skip-email --show-password

To set a specific password without putting it in your command history, this prompts safely:

wp user update admin --prompt=user_pass

If you are not in the WordPress folder, add --path="C:\path\to\wordpress". If needed, target a site URL with --url="https://example.com".

AlmaLinux

Run the same commands from your WordPress directory. To generate a new password and show it:

wp user reset-password admin --skip-email --show-password

To set a specific password via a prompt:

wp user update admin --prompt=user_pass

Ubuntu

Run the same commands from your WordPress directory. To generate a new password and show it:

wp user reset-password admin --skip-email --show-password

To set a specific password via a prompt:

wp user update admin --prompt=user_pass

Step 4: Reset the password in the database

This writes a new value into the user_pass field. Back up the database first. Editing the database is high risk and WordPress advises doing this at your own risk. The table prefix may not be wp_, so confirm it before running anything.

Hostworld cPanel hosting

  1. This opens phpMyAdmin so you can edit the WordPress tables. In cPanel, go to Home > Databases > phpMyAdmin.
  2. Open your site’s database, find the <prefix>_users table, and identify the admin row by its user_login value before you edit it.
  3. In user_pass, enter the new password text and set the Function to MD5. Save. Log in once and WordPress will upgrade the hash to a stronger one.

Any server via SQL

This SQL updates the password using MD5, which WordPress will replace with a stronger hash on next successful login. Replace the prefix, the username and the password. If you are not sure of the username, run SELECT ID, user_login, user_email FROM <prefix>_users; first.

UPDATE <prefix>_users
SET user_pass = MD5('new_password')
WHERE user_login = 'your_admin_username';

If it does not work

  • “Cookies are blocked or not supported”: Enable cookies in your browser, avoid logging in through a cached page, and exclude wp-login.php and /wp-admin from any caching or proxy. If you hard coded WP_HOME or WP_SITEURL, or changed the database’s siteurl/home, make sure they match the real site URL.
  • The update ran but nothing changed: check the row count the query reported. Zero rows updated means the username did not match, so list the accounts and try again with the correct user_login.
  • Redirect loops or “too many redirects”: Verify WP_HOME/WP_SITEURL and the database’s siteurl/home values are correct for your domain and protocol. On IIS, if you changed permalinks, install the IIS URL Rewrite Module to enable clean URLs and avoid broken redirects.
  • Security plugin changed the login URL: Use the custom login address you set in the plugin. The defaults are intentionally disabled while it is active. If you cannot recall it, you will need to disable that plugin to regain access.

If you are stuck at any point, open a support ticket and tell us the site URL, what you tried, and any error messages you saw.

What next

For a broader walk through of server access and WordPress administration on a VPS, see our VPS guides. If you need Windows or Linux capacity for WordPress, see our UK VPS range. For help choosing the right route for your setup, please open a support ticket.

Common questions

Where do I go to log in to WordPress?

Visit https://yourdomain.tld/wp-login.php or https://yourdomain.tld/wp-admin in your browser. If a security plugin changed the login URL, use the custom address you configured instead.

How do I reset my WordPress admin password if I forgot it?

Click Lost your password? on the login page, enter your username or email, and follow the reset link sent to your inbox. If the email does not arrive, you can reset it with WP-CLI or directly in the database.

What do I do if the password reset email does not arrive?

Check your spam folder first. If it still does not arrive, you can reset the password using WP-CLI from the command line or by editing the database directly with phpMyAdmin or SQL.

How do I reset the WordPress password using WP-CLI?

Run wp user reset-password admin --skip-email --show-password from your WordPress directory to generate a new password, or wp user update admin --prompt=user_pass to set one interactively.

Can I reset the password by editing the database?

Yes, but only as a last resort. Back up the database first, then update the user_pass field to MD5('new_password') in the users table. WordPress will upgrade the hash to a stronger algorithm on next login.

Was this article helpful?