Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Change a cPanel username on a VPS or dedicated server

This guide shows how to rename a cPanel account in WHM. It needs root access, so it is for VPS and dedicated server customers.

cPanel2 min read13 steps5 screenshots

What is WHM?

WHM stands for WebHost Manager. It is the admin panel above cPanel. Server owners use it to create and manage many cPanel accounts. A cPanel username is the login name of one account. It is also the name of the home folder, such as /home/username.

This guide needs root access to the server. Ordinary shared hosting users cannot do it. Those users can open a support ticket instead.

Warning: Renaming an account changes its home folder and database names. Scripts or settings that use the old name may stop working. Take a full backup of the account first.

Before you start

  • Pick a new username. It is usually up to 16 characters, with letters and numbers, starting with a letter.
  • Make a backup of the account.
  • Note any files in your site that mention the old path, such as /home/oldname.

Steps

  1. Log in to WHM as root. The address is usually your server name or IP followed by :2087. Your welcome email has the details.
    Screenshot: Log in to WHM as root. The address is usually your server name or IP followed by :2087 . Y
  2. In the search box at the top left, type Modify an Account.
  3. Click Modify an Account.
    Screenshot: Click Modify an Account .
    Screenshot: Click Modify an Account .
  4. Pick the account you want to change from the list.
  5. Click Modify.
  6. Find the Username field under Basic Information.
  7. Delete the old name and type the new one.
  8. Scroll to the bottom and click Save.
  9. Wait for the confirmation message.

Check after the change

  1. Log in to cPanel with the new username and the same password.
    Screenshot: Log in to cPanel with the new username and the same password.
  2. Open File Manager. The home folder should now use the new name.
  3. Open your website and check that it loads.
  4. Go to MySQL Databases. Database names and users that began with the old name are normally renamed. Look at them closely.

Fix things that still use the old name

  • In wp-config.php, update the database name and user if they changed.
  • Check cron jobs for paths with the old name.
  • Check custom PHP settings such as .user.ini for old paths.

Quick recap

  • This task needs root access to WHM.
  • Back up the account first.
  • Use Modify an Account, change the Username and click Save.
    Screenshot: Use Modify an Account , change the Username and click Save .
  • Log in again with the new name and fix any old paths.