Posts

bench vps/dedicate

by @DEV • 2025-10-21 10:26:55

wget -qO- bench.sh | bash

How to Mass suspend or unsuspend mailboxes of a domain

by @DEV • 2025-10-21 10:26:07

Introduction

There may be times you need to suspend more than one email account. Doing this through the interface and clicking each item can take a while. Using the API, can help you quickly automate that process and suspend the users in question.


Procedure

If you wish to suspend the entire domain, you can use

whmapi1 suspend_outgoing_email user=example

If you prefer to suspend a specific email account login, you can use the suspend_login API call.

uapi --user=username Email suspend_login email=user%40example.com

To suspend incoming mail, you can use the suspend_incoming

uapi --user=username Email suspend_incoming email=user%40example.com

And to suspend outgoing mail, use the suspend outgoing command:

uapi --user=username Email suspend_outgoing email=user%40example.com

If you need to unsuspend the account, change suspend to unsuspend in the API call.

You can use those commands to suspend or unsuspend the Incoming, Outgoing, or mail login for a user, and you can utilize those to help automate and speed up your process.

Server is inaccessible once rebooted after installing the cPanel software AlmaLinux/CloudLinux/Rocky 8 servers

by @DEV • 2025-10-21 10:25:18

Access the server's command line as the 'root' user via SSH or "Terminal" in WHM.
Disable the Network service.

/usr/bin/systemctl disable network

Enable the NetworkManager service.

/usr/bin/systemctl enable NetworkManager

Stop the Network service and start the NetworkManager service.

/usr/bin/systemctl stop network; /usr/bin/systemctl start NetworkManager

Reboot the server.

shutdown -r now

How to enable MySQL® 8 with new installations

by @DEV • 2025-10-21 10:24:24

Introduction

The default SQL server installed in cPanel version 122.0.1 and higher is MariaDB® 10.11. This article provides the procedure to install MySQL® 8 durring cPanel & WHM installation.


Procedure

Access the server's command line as the 'root' user via SSH.
Create the /root/cpanel_profile folder.

mkdir /root/cpanel_profile

Create the cpanel.config file in the /root/cpanel_profile folder.

touch /root/cpanel_profile/cpanel.config

Open the cpanel.config file in your preferred text editor.
Add the following line to the cpanel.config file.

mysql-version=8.0

Save the changes and exit the text editor.
Initiate the cPanel installation.

cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest

OS check

by @DEV • 2025-10-21 10:23:55

cat /etc/os-release

IPAddress is already an active IP

by @DEV • 2025-10-21 10:22:30

Sometimes, when something odd happens to your server (most of the time intentionally, though not in an ideal situation) when you go to add an IP address to your server, you’ll see this error:

$IPADDRESS is already an active IP. Skipping $IPADDRESS .. already added !

And then when you check the cPanel logs (because you’re a good admin like that), you’ll see this error:

[2013-10-26 15:21:41 -0500] info [xml-api] $IPADDRESS is already an active IP. [addips] version [1].

Well, when that happens there are a plethera of things to check and correct. Hopefully one of these will fix it for you.

Make sure that the IP address you’re trying to add has been removed from these files:

/etc/hosts
/etc/ips
/etc/mail_reverse_dns

If you happen to also be trying to add back the IP that was previous the primary IP address, you will also need to update this file:

/var/cpanel/mainip

This one cannot be manually edited, however, because if you leave the extra space at the end of your line, WHM will still choke. These are the steps I would recommend. First, copy mainip to a new file.

cp /var/cpanel/mainip /var/cpanel/mainip.new

Then, edit /var/cpanel/mainip.new to reflect the new IP address.

vi /var/cpanel/mainip.new

Then cat the new ip into the existing mainip file.

cat /var/cpanel/mainip.new |tr -d "\n" |tr -d "\r" > /var/cpanel/mainip

Once all of that is complete, run these commands and you should be able to add the IP address to WHM again.

/etc/init.d/network restart
/etc/init.d/ipaliases restart
/scripts/rebuildhttpdconf

Server FireWall issue offline

by @DEV • 2025-10-21 10:21:07

iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
iptables -t nat -F
iptables -t mangle -F
iptables -F
iptables -X

How to Install WHM/cPanel in Almalinux?

by @DEV • 2025-10-21 10:06:15

yum update -y

yum upgrade -y

yum install perl curl -y

cd /home
curl -o latest -L https://securedownloads.cpanel.net/latest
sh latest