How to check bandwidth usage for user on cPanel serve from command line
To see user’s bandwidth for certatin period run next:
whmapi1 showbw searchtype=user search=Username year 2022 month 2
Enjoy!… Read the rest
Notes
To see user’s bandwidth for certatin period run next:
whmapi1 showbw searchtype=user search=Username year 2022 month 2
Enjoy!… Read the rest
Run the following to change your master domain:
whmapi1 modifyacct user=USERNAME domain=NEWDOMAIN.COM
Enjoy!… Read the rest
Useful if you have plan limited by:
– limitation by amount of cPanel accounts
– bandwidth limitation
– disk space limitation
– overselling disabled
Update reseller’s packages with new limits via command line
sed -i -e "s/QUOTA=.*/QUOTA=2000/g" /var/cpanel/packages/resellerusername_* sed -i -e "s/BWLIMIT=.*/BWLIMIT=20000/g"… Read the rest
You may use whmapi1 tool to reach this from command line
whmapi1 resetzone domain=domain.com
This will remove all custom settings and other garbage if any… Read the rest
Example of the command:
whmapi1 modifyacct user=XXXX QUOTA=XXXX
Some popular parameters:
BWLIMIT=unlimited QUOTA=unlimited CGI=y CPMOD=paper_lantern DIGESTAUTH=n FEATURELIST=default HASSHELL=n MAXADDON=unlimited MAXFTP=unlimited MAXLST=unlimited MAXPARK=unlimited MAXPOP=unlimited MAXSQL=unlimited MAXSUB=unlimited MAX_DEFER_FAIL_PERCENTAGE=100 MAX_EMAILACCT_QUOTA=unlimited MAX_EMAIL_PER_HOUR=100 FRONTPAGE=n IP=n LANG=en domain=domain.com user=cpaneluser MAX_DEFER_FAIL_PERCENTAGE=5 MAX_EMAILACCT_QUOTA=100 BACKUP=0 HASCGI=1 FEATURELIST=featurelist OWNER=owner HASDKIM=1 HASSPF=1 [email protected]… Read the rest
Go to your WHM –> Home –> Software –> MultiPHP Manager
You should be able to resolve this by changing the domains to use an available version of PHP, or by installing the missing PHP versions.
You need to either install missed PHP version or set it to inherit
Command line solution:
Find main domain of account in issue and run:
whmapi1 php_set_vhost_versions version=inherit vhost=domainname.com… Read the rest
Check bandwidth for a user:
whmapi1 showbw searchtype=user search=USERNAME year 2018 month 8
Change account's master domain:
whmapi1 modifyacct user=USERNAME domain=NEWDOMAINNAME
Change username:
whmapi1 modifyacct user=USERNAME newuser=NEWUSERNAME
Change package:
whmapi1 changepackage user=USERNAME pkg=NEWPKG
Show account's info:
whmapi1 accountsummary user USERNAME
Enable shell access:
whmapi1 modifyacct user=USERNAME HASSHELL=1
read -p "Username: " u; whmapi1 modifyacct user=$u HASSHELL=1
Update hostname:
whmapi1 sethostname hostname=HOSTNAME
Generate self signed SSL certificate:
whmapi1 generatessl domains=example.com… Read the rest
Just run
/usr/local/cpanel/bin/setsiteip -u $user $ip
or using whmapi1
whmapi1 setsiteip ip=11.12.13.14 user=$user
to add IP onto the server
whmapi1 addips ips=11.12.13.14 netmask=255.255.255.248
to remove IP
whmapi1 delip ip=11.12.13.14
to check IP usage
whmapi1 get_shared_ip user=$user
to check server’s IP addresses
whmapi1 listips… Read the rest