How to replace cPanel server main IP

  This is for CentOS/RHEL based servers. Steps in WHM: Log into WHM and go to Basic cPanel & WHM Setup Change the Primary IP here with the option that says “The IP address (only one address) that will be used for setting up shared IP virtual hosts“ Note: This might not actually be necessary. Log …

is already an active IP (cPanel /WHM)

Solving WHM Add a New IP Address error: Skipping xx.xxx.xx.xx .. 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 …

Run SSL on localhost for windows

Anyone running a recent Linux distribution is probably already OK, because they get the curl libraries bundled in through their package managers and recent curl libraries come with the latest CA root certificate bundle from Mozilla.org. This means you can just turn CURLOPT_SSL_VERIFYPEER on and you won’t get any errors. For a PHP installation that …

add wp-cli to cageFS

Login to your server as root. Install wp-cli as stated here: http://wp-cli.org/#installing 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.