What's new

Welcome to ServerProofs

Join us now to get access to all our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, and so, so much more. It's also quick and totally free, so what are you waiting for?

Namecheap - What to do after the cPanel account's username change

Changing the username of a cPanel account has certain consequences. This article covers what you’ll need to keep in mind after requesting this change within our Shared Hosting servers. In this case, the username of the cPanel account is changed from cpuser1 to cpuser2. The post-change changes to your setup are as follows:

1. Home Directory


change_user.png


Changing the username of a cPanel account affects the path to the Home Directory. This is important because some scripts rely on absolute paths (those starting from the root, “/”) e.g. /home/cpuser1/public_html/.

But if your website script incorporates paths related to the current working directory (called relative paths), you won’t need to make any changes.​

2. MySQL databases and MySQL users


change_user2.png


All MySQL databases and database usernames created in cPanel are associated with the cPanel username. They are formatted as: cPanelUsername_DatabaseName for databases (e.g. cpuser1_db1), or cPanelUsername_DatabaseUser (e.g. cpuser1_dbuser1) for database users.

When the cPanel username is changed, the database names and usernames are updated automatically too. However, the update is applied within the server configuration files only. That means if you have an active connection set up on one of the hosted MySQL databases (e.g., Workbench or Navicat MySQL client), the connection and its settings need to be changed. Otherwise, MySQL client software may not work as expected.

Namecheap suggests keeping the new cPanel username the same length or shorter. A longer name may cause MySQL service to truncate the account’s database names and database usernames, which may cause unexpected problems in the future.​

3. PostgreSQL databases and PostgreSQL users


change_user3.png


Similar to MySQL databases, PostgreSQL databases have similar layouts for their database names and users: cPanelUsername_DatabaseName and cPanelUsername_DatabaseUser. So you’ll also need to change the connections to the PostgreSQL server.

PostgreSQL users may not be able to log in until their passwords are reset using the cPanel PostgreSQL Databases >> Current Users >> Change Password menu. The Grants will also need to be synchronized after the cPanel username change is applied:

change_user4.png


If you get the error message “Login to PostgreSQL failed” while attempting to reach the interface of the cPanel >> phpPgAdmin menu, resetting the cPanel account’s password should resolve it.​

4. Website configuration scripts

Because of changes to the naming of the Home Directory and database access credentials (as mentioned in sections 1 to 3), certain website scripts may stop working as expected and display random error messages.

Please note that the cPanel username is changed on the hosting server only. Website-specific files and directories remain unaffected.

If your website depends on the MySQL-based databases or other connections, configuration files will need to be updated to align with the applied cPanel username change. For instance, a website based on the WordPress Content Management System (CMS) will keep displaying the “Error Establishing A Database Connection” message unless its wp-config.php file is edited to match the new cPanel configuration.

NOTE: Each CMS has its own location for configuration files. The following list of popular CMS platforms provides their locations. Ensure the configuration files match the database connection setup. If the CMS or framework of your website is not listed below, contact your site platform provider or refer to the software specifications.

Content Management System (CMS)​
Default location of the configuration file​
AbanteCart​
/system/config.php​
Concrete5​
/application/config/database.php​
CubeCart​
/includes/global.inc.php​
Dolphin​
/inc/header.inc.php​
Drupal​
/sites/default/settings.php​
Joomla​
/configuration.php​
Magento 1.x​
/app/etc/local.xml​
Magento 2.x​
/app/etc/env.php​
myBB​
/inc/config.php​
OpenCart​
/admin/config.php and /config.php​
phpBB​
/config.php​
PrestaShop​
/config/settings.inc.php​
SMF​
/Settings.php​
WHMCS​
/configuration.php​


5. Primary (default) cPanel FTP account


change_user5.png


cPanel username always matches the primary FTP account of the hosting account. The latter provides access to the whole file system of cPanel. They strongly recommend using it, along with the SFTP (SSH-based secure FTP, encrypted) type of connection.

However, the change of the cPanel username will require updating the settings of FTP clients, such as FileZilla, Cyberduck, Dreamweaver, CoreFTP, iWeb, Adobe Muse, CuteFTP, etc.​

6. Primary (default) cPanel Email account


change_user6.png


The default cPanel email account (cPanelUsername@server.hostname) catches all unrouted emails. It cannot be deleted and has no quota. Its username and password will always be the same as your cPanel account’s login.

If there are any outgoing email scripts set up using the PHP mail() function, or no custom email address set up has been specified for cron jobs, you may receive notifications to cpuser2@server.hostname after the cPanel username is changed from cpuser1 to cpuser2.​

7. Primary (default) cPanel Web Disk account


change_user7.png


The purpose of the Web Disk utility and its accounts is to manage and manipulate files within the Home Directory of your hosting account, on multiple types of devices (such as your computer, mobile device, or certain types of software).

This interface allows you to manage the file system using the Web Distributed Authoring and Versioning (WebDAV) protocol. The username of the main Web Disk account always corresponds to that of the cPanel account.

This WebDisk account can access all of the files in your Home Directory. So if you use WebDav protocol to manage the files of the hosting account through the main Web Disk account, make sure to update the connection’s configuration after the cPanel username is changed.​
 

Top resources

Top Bottom