Prerequisites
Before renaming a domain, make sure you have:
- Admin access to HestiaCP
- SSH access to your VPS
⚠️ Renaming a domain is complex and requires manual migration. Consider creating a new domain and moving files instead.
Method: Create New Domain and Migrate
Recommended approach:
- Add new domain in HestiaCP
- Copy files from old to new domain:
cp -r /home/admin/web/olddomain.com/public_html/* /home/admin/web/newdomain.com/public_html/
- Export old database and import to new database
- Update configuration files with new domain
- Add redirect from old to new domain
- Delete old domain after verification
Rename Domain via SSH (Advanced)
If you must rename, use Hestia CLI (dangerous):
/usr/local/hestia/bin/v-rename-web-domain admin olddomain.com newdomain.com
Also rename database prefix if needed:
/usr/local/hestia/bin/v-rename-database admin old_db new_db
Update WordPress Domain After Rename
If moving WordPress:
wp search-replace 'olddomain.com' 'newdomain.com' --allow-root
Update .htaccess or Nginx config with new domain.
Update DNS Records
After rename:
- Add A records for new domain
- Keep old domain redirected initially
- Update email settings if using domain for email
✅ Domain migration has been completed.