Bulk Delete cPanel Subdomains by Matching String
Warning: this is a dangerous script, that deletes in bulk, matching string subdomains from a cpanel account. It is designed as one liner.
Tips, tricks, how-to, tutorials – all about Information Technology – Since 2004
Warning: this is a dangerous script, that deletes in bulk, matching string subdomains from a cpanel account. It is designed as one liner.
Managing and Cleaning up the Eximstats SQLite Database in cPanel What Is the Eximstats Database? The eximstats database is used by cPanel servers to store statistics about email traffic. It captures data such as messages sent, failed deliveries, deferrals, and more. This data is useful for mail reporting in WHM or for scripts parsing mail … Read more
WordPress plugins play a crucial role in extending the functionality of websites. However, from a security perspective, it is important to be aware of the plugins installed on a server, as outdated or vulnerable plugins can be exploited by attackers. This guide provides a simple Bash one-liner to search for a specific WordPress plugin across … Read more
Troubleshooting the Imunify360 Agent Understanding the Imunify360 Agent vs. imunify360-agent Command For system administrators working with Imunify360, it is important to differentiate between the Imunify360 Agent as the core functionality of the security suite and the imunify360-agent command-line tool. The Imunify360 Agent is a service that runs continuously in the background, providing real-time security monitoring, … Read more
The command is using whmapi1 and jq and needs to run as root. whmapi1 listaccts want=user –output=json | jq ‘.data.acct | length’ This command does:
There is no excerpt because this is a protected post.
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
There is no excerpt because this is a protected post.
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
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
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
In order to manually clear the database usage cache you can use the following command: /usr/local/cpanel/scripts/update_db_cache