is already an active IP (cPanel /WHM)

Solving WHM Add a New IP Address error: Skipping .. already added.   If you recently changed server main IP, make sure to update this file with the new main IP: /var/cpanel/mainip   And make sure the IP is not mentioned in this file: /etc/ips Then try again.

find&replace text with bash on CENTOS/RHEL

You can find and replace text on one or multiple file at once using sed RHEL command   sed -i ‘s/TEXT-TO-FIND/REPLACE-WITH/g’ filename.txt   Find and replace text on multiple files with .txt extention sed -i ‘s/TEXT-TO-FIND/REPLACE-WITH/g’ *.txt Replace TEXT-TO-FIND and REPLACE-WITH with the text you’re looking for and its replacment Example: sed -i ‘s/thursday/friday/g’ weekdays.txt The …

add wp-cli to cageFS

Login to your server as root. Install wp-cli as stated here: After installing WP-CLI Open file: /etc/cagefs/conf.d/wpcli.cfg using: $ nano /etc/cagefs/conf.d/wpcli.cfg Add the following content to that file and save. [wp-cli] comment=wp-cli paths=/usr/local/bin/wp And then run: $ cagefsctl –force-update Now all users who have SSH access can use wp-cli.

change ssh port on CentOS 7

Edit /etc/ssh/sshd_config $ nano /etc/ssh/sshd_config Look for: #Port 22 Change to any port number of your choice, for example, 1234 Port 1234 (remove # from the beginning and change 22 to 1234, make sure not to use a port number that’s already used by another service like 80,21,443,53,25 etc..) 2) Add the port number to the …