Support article
How to Move Domains Between Hosting Accounts in DirectAdmin
DirectAdmin doesn't let you move a domain between accounts from the panel: it's done from the command line with move_domain.sh. Here's the step-by-step process.
Introduction
As usual, DirectAdmin doesn’t include this kind of action inside the control panel: it has to be run from the command line. That’s just how DirectAdmin works, whether we like it or not — but it’s entirely possible, and much easier than it would be in cPanel.
Before you start
- Take a full backup of the source account before moving anything.
- Verify the destination user exists on the server.
- Check that the domain isn’t already created on the destination account.
- If the site is in production, make the change during low-traffic hours.
Databases first
This matters, because databases don’t move along with the domain. That’s why you need to move the databases before moving the domain.
DirectAdmin has a script ready for this. Go to the scripts folder:
cd /usr/local/directadmin/scripts
Then run rename_database_with_user.sh with the database name and the new name:
./rename_database_with_user.sh databaseName newDatabaseName
Keep in mind the new database name must be prefixed with the username of the new hosting account.
Now move the domain to the new hosting account
DirectAdmin uses the move_domain.sh script, found in the same folder:
cd /usr/local/directadmin/scripts
./move_domain.sh domain.com oldHostingAccount newHostingAccount
If the account that held the moved domain is now empty, you can delete the user. Before deleting it, verify you’ve moved the databases to their final destination — otherwise you’ll lose them for good unless you have a backup.
What to check after moving
- Website files. Confirm the content moved to the correct path under the new user.
- Permissions and ownership. Verify the files belong to the destination user.
- Email. Check that email accounts and mailboxes still work.
- Databases. Confirm credentials and permissions are still valid.
- SSL. Check the domain’s certificate and reissue it if needed.
- DNS. Review the DNS zone if the domain relies on custom records.
Common problems
The website shows an error after moving it
Check permissions, absolute paths inside the application, and database credentials.
Email stops working
Check that the accounts exist under the destination user and that the MX records still point correctly.
The domain already exists under the destination user
Remove or rename the duplicate entry before running the move, always taking a backup first.
Frequently asked questions
Can I move a domain from the panel?
Not in DirectAdmin: this action is done over SSH with move_domain.sh, using administrator privileges.
Does email move too?
The script moves the structure associated with the domain, but it’s always worth checking the mailboxes after the change.
Can there be downtime during the process?
There can be a brief interruption from the permission and configuration changes. That’s why it’s best to do it during low-traffic hours.
Conclusion
To move a domain between users in DirectAdmin, move the databases first with rename_database_with_user.sh, then the domain with move_domain.sh, using administrator privileges. Check files, email, databases, SSL, and DNS after the change, and always take a backup before starting.