Team OS : Your Only Destination To Custom OS !!

Welcome to TeamOS Community, Register or Login to the Community to Download Torrents, Get Access to Shoutbox, Post Replies, Use Search Engine and many more features. Register Today!

Tutorials cPanel to CWP server conversion script

Uncle Mac

🤴 Super Admin
Downloaded
91.3 GB
Uploaded
306.3 TB
Ratio
3435.5
Seedbonus
3,467,745
Upload Count
333 (352)
Member for 10 years
tired of paying money for bloated cpanal?

Here is the solution in a finely tuned script that I've used twice now with 100 percent success
You will be converting to CWP Web panel, this only works with centos or redhat clones:

Here is the powerfull free panel screenshot:
QA3Hkj.png


My Panel right now:

QA3yeK.png



How does this work?
- First, we export from cPanel all user account details into temporary files so we can later import them into CWP.
- Second, we create a backup of cPanel and uninstall it.
- Third, we install CWP, this is the regular CWP installation process.
- Fourth, we import data into CWP from the exported files of the first step.


REQUIREMENTS
- CentOS 7 latest version
- MySQL 5.7+ or MariaDB (Recommended MariaDB)
- Make sure you don't have any MySQL connection timeout limits
- Change MySQL root password to something without special characters
- Remove CloudLinux
- Mailbox format should be maildir, those using mdbox will need to convert to maildir before removing cpanel
* Info about mailbox format you can check in WHM under Mailbox Conversion


How safe is this?
- On the first step after the script run, you get information about exported data from the cPanel.
- First script run doesn't make any changes to the system so you can check and confirm that all is covered.
- User Accounts: All user files in /home/USERNAME are not touched so server accounts are safe.
- MySQL Database: We don't make any MySQL changes on the databases so your databases are safe.
- MySQL version: currently installed from cPanel is left without any changes.
- User Home Files: nothing is touched except for migration of emails to /var/vmail folder.
- Cronjobs are kept the same.
** It's always smart to have account backups before starting with the major changes.


Imported data
- User accounts, domains, subdomains, parked domains
- Email accounts-mailboxes, forwarders-aliases, autoresponders-autoreply, alias pipe to script
- Resellers
- Hosting packages
- FTP accounts
- SSL Certificates
- Hostname SSL Certificates for (cwp, mail, ftp, webservers)
- All PHP versions (5.3 - 7.3) and we have added handlers of cPanel


Not Imported
- Postgres databases


Required:
- /var/vmail will be the new location for your emails so make sure /var partition has the required size or you can symlink it to /home/vmail


FAQ
- How long this conversion takes: from 10min to 4h depends on the data and server performances
- You should first remove CloudLinux (if you have it) before starting with step 1.


Migration Instructions​


Download migration scripts

Code:
wget dl1.centos-webpanel.com/files/s_scripts/el7/cpanel-converter/1-cpanel-data-export.sh

wget dl1.centos-webpanel.com/files/s_scripts/el7/cpanel-converter/2-cpanel-uninstall.sh

wget [URL]http://centos-webpanel.com/cwp-el7-latest[/URL]

wget dl1.centos-webpanel.com/files/s_scripts/el7/cpanel-converter/4-import-into-cwp.sh

wget dl1.centos-webpanel.com/files/s_scripts/el7/cpanel-converter/5-mail-sni.sh

Now run the first script
** If you have CloudLinux make sure it was removed before

Code:
sh 1-cpanel-data-export.sh

** Check that all data is listed there before proceeding to the next steep


Uninstall cPanel (This can take long time) for me around 30 seconds with 8 Gigs of ram on my server

Code:
sh 2-cpanel-uninstall.sh

Install CWP (CentOS 7)
Default installer, bellow you have optional instructions

Code:
sh cwp-el7-latest

Optional arguments for installer


–phpfpm [5.3|5.4|5.5|5.6|7.0|7.1|7.2|7.3] (you can use only one)
–softaculous yes (install softaculous – script installer)


Available short name arguments
-p [5.3|5.4|5.5|5.6|7.0|7.1|7.2|7.3] (you can use only one)
-s yes (install softaculous – script installer)


Example for centos 7 (you can combine short and long name arguments)

Code:
sh cwp-el7-latest --phpfpm 7.2 --softaculous yes


Import all exported data into CWP

Code:
sh 4-import-into-cwp.sh

Generate Mail Certificates Postfix/Dovecot

Code:
sh 5-mail-sni.sh

That is it, reboot the server and you are ready!


OTHER NOTES & SUPPORT
This tool is provided at no cost and without warranty.


If you need to migrate CentOS 6 it's recommended first to migrate all accounts on another cpanel server with CentOS7 and then convert CentOS7 to CWP7.


In case some of your clients don't get satisfied you can make a cpanel backup without the homedir for all users before starting cpanel removal so they can easily return to cpanel.

for i in `cat /etc/trueuserdomains |awk -F: {'print $2'}`;do /scripts/pkgacct --skiphomedir $i /home;done
 
Last edited by a moderator:

PsyTom

Power User
✅ Verified Member
Member
Downloaded
1.4 TB
Uploaded
502.1 TB
Ratio
367.69
Seedbonus
1,662,990
Upload Count
0 (0)
Member for 3 years
thank you for sharing this information, sounds fascinating.
 

Uncle Mac

🤴 Super Admin
Downloaded
91.3 GB
Uploaded
306.3 TB
Ratio
3435.5
Seedbonus
3,467,745
Upload Count
333 (352)
Member for 10 years
Also your site will seem alot faster as it will be LoL
 

mobi0001

The Power Is Yours!!!
Uploader
Power User
✅ Verified Member
Member
Downloaded
62.3 GB
Uploaded
11.3 TB
Ratio
186.26
Seedbonus
1,043
Upload Count
89 (104)
Member for 4 years
Finally something of interest to me and in my line. Only trouble is I have a shared hosting and not otherwise.
But anyways I use local panel on my local host.
 

Uncle Mac

🤴 Super Admin
Downloaded
91.3 GB
Uploaded
306.3 TB
Ratio
3435.5
Seedbonus
3,467,745
Upload Count
333 (352)
Member for 10 years
It has proved invaluable to me, as really there is no easy solution to uninstall cpanel without loosing everything or having to re install
your server.
 
Top