If your VestaCP installation is damaged or you need a fresh start, follow these steps to completely remove and reinstall VestaCP on your VPS.
1 Backup Your Data (Before Reinstallation)
If you have important websites, databases, or email accounts, create backups of them before proceeding.
Backing Up Websites and Files
Use tar to compress website data:
admin with your VestaCP username if it's different.
Backing Up Databases
For MySQL/MariaDB:
You will be prompted to enter the MySQL root password.
Backing Up Email Accounts
Your backups are now ready.
2 Uninstall VestaCP Completely
Remove all VestaCP files and configurations.
Stop VestaCP Services
Remove VestaCP Packages
For CentOS/RHEL:
For Debian/Ubuntu:
Remove VestaCP Directories
rm -rf /etc/vesta
rm -rf /var/lib/vesta
rm -rf /home/admin/web
Remove VestaCP User (If Needed)
Clean Up Dependencies
For CentOS:
For Debian/Ubuntu:
VestaCP is now completely removed from your server.
3 Reinstall VestaCP
Download the Latest VestaCP Installer
Make the script executable:
Run the Installation Script
Follow the on-screen instructions to set up the admin name, email, and domain.
4 Log in to VestaCP
After installation is complete, access the VestaCP control panel at:
Log in using your new credentials.
5 Restore Backups (If Needed)
If you created backups of your websites, databases, or mail, restore them:
Restoring Websites
Restoring Databases
Restoring Email
Your VestaCP is now fully reinstalled and restored.
6 Troubleshooting Installation Issues
| Problem | Solution |
|---|---|
| VestaCP is not accessible | Check if port 8083 is open: sudo ufw allow 8083/tcp |
| Login not working | Reset password: v-change-user-password admin new_password |
| Websites not loading | Restart Nginx & Apache: systemctl restart nginx httpd |
| Mail not working | Check exim and dovecot services: systemctl status exim dovecot |
| Installation error | Ensure your server meets VestaCP requirements |
7 Summary
| Task | Command/Action |
|---|---|
| Backing up VestaCP data | tar -czvf for websites, mysqldump for databases |
| Uninstalling VestaCP | Remove vesta packages and delete directories |
| Reinstalling VestaCP | bash vst-install.sh |
| Logging into VestaCP | https://your-server-ip:8083 |
| Restoring backups | Extract website files and import databases |
VestaCP is now reinstalled and fully functional!


