Install JQ on Windows

The Windows binary file for jq can be downloaded fromhttps://stedolan.github.io/jq/download/ At the time of writing, the latest version ishttps://github.com/stedolan/jq/releases/download/jq-1.6/jq-win64.exe If you want the jq command to be available from everywhere within windows there are 3 steps to be followed: $jqFolderPath = “C:\Program Files\JQ” $jqExePath = “$jqFolderPath\jq.exe” $jqDownloadUrl = “https://github.com/stedolan/jq/releases/download/jq-1.6/jq-win64.exe” # Step 1: Create the folder … Read more

Activate / deactivate individual cPanel feature

For example, if you want to enable or disable JetBackup 5, in the feature named default To enable, run: sed -i ‘s/jb5=0/jb5=1/’ /var/cpanel/features/default To disable, run: sed -i ‘s/jb5=1/jb5=0/’ /var/cpanel/features/default If you want to enable for all feature sets, the target should be /var/cpanel/features/*

Bulk update PHP handler cPanel

List existing handlers /usr/local/cpanel/bin/rebuild_phpconf –current Example Output: DEFAULT PHP: ea-php74 alt-php44 SAPI: cgi alt-php51 SAPI: cgi alt-php52 SAPI: cgi alt-php53 SAPI: cgi alt-php54 SAPI: cgi alt-php55 SAPI: cgi alt-php56 SAPI: cgi alt-php70 SAPI: cgi alt-php71 SAPI: cgi alt-php72 SAPI: cgi alt-php73 SAPI: cgi alt-php74 SAPI: cgi alt-php80 SAPI: cgi alt-php81 SAPI: cgi ea-php51 SAPI: cgi … Read more

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 google.com: openssl s_client -host google.com -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:https://john-dugan.com/wamp-vhost-setup/ Install OpenSSL on Windows guide:https://tecadmin.net/install-openssl-on-windows/ Enable SSL on WAMP guide:https://bobcares.com/blog/enable-ssl-in-wamp-server/ Export OPENSSL … Read more