cPanel release tiers and cPanel version control

cPanel release tiers explained LTS A well-tested and proven version that cPanel, L.L.C. supports for one full year.STABLE A version that is feature-complete, fully tested, and is in widespread use.RELEASE A version that is feature-complete and well tested.CURRENT A “release candidate” version that is tested but may not be feature-complete.EDGE A development version for testing … Read more

Create a list of wp-config.php on a cPanel server.

Sometimes it is necessary to edit in bulk all wp-config.php form all WordPress websites that are present in a cPanel server. We can start build that list first, then we can use commands like sed in order to bulk modify settings. This is just the method to generate this list: find /home -type f -name … Read more

OpenSSL cheatsheet

Display SAN of an SSL connections, example for openssl s_client -host -port 443 | openssl x509 -noout -ext subjectAltName

Add Custom Directory to All cPanel Accounts

Assuming that you have a cPanel server with a CentOS7 or CloudLinux 7 operating system, and you want to insert in each home directory a custom directory, here are the commands that help to do that: cd /home for i in *; do if [[ -d $i/public_html ]]; then mkdir $i/_CUSTOM_DIRECTORY; chown $i: $i/_CUSTOM_DIRECTORY; fi … Read more

WHM / cPanel List IP’s Cheatsheet

List all IP’s, via API whmapi1 listips Count IP’s, including main IP whmapi1 listips | grep public_ip | wc -l List all IP’s, including main IP whmapi1 listips | grep public_ip | awk ‘{print $2}’ List all IP’s from /etc/ips (this doesn’t include the main IP) cat /etc/ips List dedicated IP / domain association cat … Read more

WAMP vhosts and SSL cheat docs

I call them cheat docs, as there is a collection of external docs that help achieve the goal: How to setup vhosts in WAMP (port 80) and how to setup SSL , with vhosts on WAMP (port 443) Setup VHOSTS on WAMP guide: Install OpenSSL on Windows guide: Enable SSL on WAMP guide: Export OPENSSL … Read more

Update cPanel database cache

In order to manually clear the database usage cache you can use the following command: /usr/local/cpanel/scripts/update_db_cache

JetBackup CLI Cheatsheet

List Orphan Accounts jetapi backup -F listAccountsOrphans | grep username: | awk {print’$2′} List available Full Backups (127): jetapi backup -F listBackups -D “type=127” Add to Restore Queue the backup with _id=608238380ce407186963cc9a jetapi backup -F addQueueRestore -D _id=608238380ce407186963cc9a

Merge the content of multiple .htaccess files in one

The script will search the current directory for all htaccess files and will combine in a single text file. find . -name ‘.htaccess’ -exec echo “### START Imported from”.{}.”###” \; -exec cat {} \; -exec echo “#### END Imported from “.{}.”###” \; -exec echo”” \; >> all-htaccess.txt