{"id":3503,"date":"2009-02-27T18:05:30","date_gmt":"2009-02-27T23:05:30","guid":{"rendered":"http:\/\/underhost.com\/blog\/?p=3503"},"modified":"2026-10-23T08:46:59","modified_gmt":"2026-10-23T12:46:59","slug":"ssh-cpanelwhm-command","status":"publish","type":"post","link":"https:\/\/underhost.com\/blog\/ssh-cpanelwhm-command\/","title":{"rendered":"cPanel and WHM Scripts: How to Find and Use Them Safely"},"content":{"rendered":"<div class=\"uh-blog-hero\" style=\"margin:0 0 40px;text-align:center;padding:48px 24px;border-radius:20px;background:linear-gradient(135deg,#0D1F3C 0%,#125A8A 58%,#176EA5 100%);color:#ffffff;box-shadow:0 20px 40px -15px rgba(13,31,60,0.28);position:relative;overflow:hidden;\">\n<div style=\"display:inline-flex;align-items:center;gap:8px;padding:7px 14px;margin-bottom:16px;border:1px solid rgba(0,212,255,0.32);border-radius:999px;color:#DFF8FF;font-size:12px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;background:rgba(0,212,255,0.10);\"><i class=\"fas fa-sliders-h\" style=\"color:#00D4FF;\"><\/i> Control Panels<\/div>\n<h1 style=\"color:#ffffff;font-size:clamp(32px,5vw,46px);line-height:1.12;margin:0 0 14px;font-weight:800;\">cPanel and WHM Scripts: How to Find and Use Them Safely<\/h1>\n<\/div>\n<div class=\"uh-blog-excerpt\" style=\"border-left:4px solid #00D4FF;padding:18px 20px;margin:0 0 34px;background:#F8FAFC;color:#1F2937;border-radius:0 14px 14px 0;box-shadow:0 8px 28px rgba(13,31,60,0.08);line-height:1.75;\"><strong style=\"color:#0D1F3C;\">Short answer:<\/strong> cPanel installs its management scripts in <code>\/scripts<\/code>. The list depends on your cPanel version, so check your own server rather than relying on a fixed list:<\/div>\n<nav class=\"uh-toc\" aria-label=\"Table of contents\" style=\"background:#ffffff;border:1px solid #E5E7EB;border-radius:16px;padding:20px 22px;margin:0 0 34px;box-shadow:0 4px 12px rgba(13,31,60,0.08);\">\n<div style=\"font-size:12px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#176EA5;margin-bottom:10px;\"><i class=\"fas fa-list\" style=\"color:#00D4FF;\"><\/i> In this guide<\/div>\n<ol style=\"margin:0;padding-left:20px;columns:2 260px;column-gap:28px;line-height:1.9;\">\n<li><a href=\"#list-the-scripts-on-your-server\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">List the scripts on your server<\/a><\/li>\n<li><a href=\"#use-the-whm-interface-where-possible\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Use the WHM interface where possible<\/a><\/li>\n<li><a href=\"#before-you-run-any-script\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Before you run any script<\/a><\/li>\n<li><a href=\"#why-scripts-need-care\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Why scripts need care<\/a><\/li>\n<li><a href=\"#a-checklist-before-you-run-a-script\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">A checklist before you run a script<\/a><\/li>\n<li><a href=\"#prefer-the-supported-interface\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Prefer the supported interface<\/a><\/li>\n<li><a href=\"#do-not-run-unknown-scripts-as-root\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Do not run unknown scripts as root<\/a><\/li>\n<li><a href=\"#what-to-do-if-a-script-went-wrong\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">What to do if a script went wrong<\/a><\/li>\n<li><a href=\"#what-to-look-for-when-you-read-a-script\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">What to look for when you read a script<\/a><\/li>\n<li><a href=\"#keep-a-record-of-what-you-change\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Keep a record of what you change<\/a><\/li>\n<li><a href=\"#when-you-write-your-own-script\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">When you write your own script<\/a><\/li>\n<\/ol>\n<\/nav>\n<div class=\"uh-post-content\" style=\"color:#1F2937;font-size:16px;line-height:1.75;\">\n<div style=\"background:#FFF7ED;border:1px solid #FDBA74;border-radius:16px;padding:20px 22px;margin:24px 0;\">\n<h3 style=\"margin:0 0 10px;color:#9A3412;font-size:20px;\"><i class=\"fas fa-exclamation-triangle\" style=\"color:#F97316;\"><\/i> Run scripts with care.<\/h3>\n<p style=\"margin:0;color:#7C2D12;line-height:1.7;\">Some scripts change files on the server. Do not run a script unless you can name what it changes.<\/p>\n<\/div>\n<h2 id=\"list-the-scripts-on-your-server\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-server\" style=\"color:#00D4FF;\"><\/i> List the scripts on your server<\/h2>\n<pre style=\"background:#0D1F3C;color:#EAF6FF;padding:18px 20px;border-radius:14px;overflow-x:auto;line-height:1.7;font-size:15px;\"><code>ls \/scripts | less<\/code><\/pre>\n<h2 id=\"use-the-whm-interface-where-possible\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-angle-double-right\" style=\"color:#00D4FF;\"><\/i> Use the WHM interface where possible<\/h2>\n<p style=\"margin:0 0 18px;\">Most tasks in this guide, such as adding accounts, editing quotas and managing DNS, are also available in WHM. The WHM interface checks input and shows what will change.<\/p>\n<h2 id=\"before-you-run-any-script\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-clipboard-check\" style=\"color:#00D4FF;\"><\/i> Before you run any script<\/h2>\n<ul style=\"margin:0 0 24px;padding-left:22px;\">\n<li style=\"margin:0 0 8px;\">Read its help output, or the cPanel documentation for it.<\/li>\n<li style=\"margin:0 0 8px;\">Take a backup, and run it on a test server first if it changes files.<\/li>\n<li style=\"margin:0 0 8px;\">Never run a script you downloaded from an unknown source as root.<\/li>\n<\/ul>\n<p style=\"margin:0 0 18px;\">Need help? Open a ticket through <a href=\"https:\/\/customerpanel.ca\/client\/\">@CustomerPanel<\/a>.<\/p>\n<h2 id=\"why-scripts-need-care\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-info-circle\" style=\"color:#00D4FF;\"><\/i> Why scripts need care<\/h2>\n<p style=\"margin:0 0 18px;\">Many cPanel and WHM scripts change files, restart services or delete data. Running one without understanding it can break a server in seconds. Before you run any script, find out what it does and whether a supported option already exists.<\/p>\n<h2 id=\"a-checklist-before-you-run-a-script\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-clipboard-check\" style=\"color:#00D4FF;\"><\/i> A checklist before you run a script<\/h2>\n<ol style=\"margin:0 0 24px;padding-left:22px;\">\n<li style=\"margin:0 0 8px;\">Find the script&#8217;s source, and confirm it comes from a trusted vendor or from cPanel itself.<\/li>\n<li style=\"margin:0 0 8px;\">Read it. Look for commands that delete, overwrite, change permissions or send data to another server.<\/li>\n<li style=\"margin:0 0 8px;\">Check whether a checksum or signature is published, and verify it.<\/li>\n<li style=\"margin:0 0 8px;\">Test on a staging or spare server first.<\/li>\n<li style=\"margin:0 0 8px;\">Take a backup, and write down how to undo the change.<\/li>\n<\/ol>\n<h2 id=\"prefer-the-supported-interface\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-angle-double-right\" style=\"color:#00D4FF;\"><\/i> Prefer the supported interface<\/h2>\n<p style=\"margin:0 0 18px;\">Most tasks that scripts used to do now have an option in WHM or cPanel. The interface logs the change, checks the input and is updated with the product. Use it where you can:<\/p>\n<ul style=\"margin:0 0 24px;padding-left:22px;\">\n<li style=\"margin:0 0 8px;\">Service restarts and configuration: WHM &gt; Service Configuration and Restart Services.<\/li>\n<li style=\"margin:0 0 8px;\">Account tasks: WHM account functions and cPanel tools.<\/li>\n<li style=\"margin:0 0 8px;\">Software installs: EasyApache 4 and the Software section.<\/li>\n<\/ul>\n<h2 id=\"do-not-run-unknown-scripts-as-root\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-angle-double-right\" style=\"color:#00D4FF;\"><\/i> Do not run unknown scripts as root<\/h2>\n<p style=\"margin:0 0 18px;\">A script from a forum or a copied command can contain anything. Never paste a command you do not understand into a root shell, and never run a script that downloads and executes code from a second address without reviewing both.<\/p>\n<h2 id=\"what-to-do-if-a-script-went-wrong\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-info-circle\" style=\"color:#00D4FF;\"><\/i> What to do if a script went wrong<\/h2>\n<ol style=\"margin:0 0 24px;padding-left:22px;\">\n<li style=\"margin:0 0 8px;\">Stop the script if it is still running.<\/li>\n<li style=\"margin:0 0 8px;\">Check the change log and the files it touched, using your backup for comparison.<\/li>\n<li style=\"margin:0 0 8px;\">Restore the affected files or service configuration, and test the site.<\/li>\n<\/ol>\n<h2 id=\"what-to-look-for-when-you-read-a-script\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-info-circle\" style=\"color:#00D4FF;\"><\/i> What to look for when you read a script<\/h2>\n<ul style=\"margin:0 0 24px;padding-left:22px;\">\n<li style=\"margin:0 0 8px;\">Commands that delete or move files, especially with wildcards or variables that could be empty.<\/li>\n<li style=\"margin:0 0 8px;\">Permission changes that use recursive flags on system folders such as \/usr, \/etc or \/var.<\/li>\n<li style=\"margin:0 0 8px;\">Downloads that run straight into a shell, which skip your chance to read the code first.<\/li>\n<li style=\"margin:0 0 8px;\">Requests that send passwords, keys or configuration files to another address.<\/li>\n<li style=\"margin:0 0 8px;\">Changes to services, firewall rules or cron jobs that you did not ask for.<\/li>\n<\/ul>\n<p style=\"margin:0 0 18px;\">If you find any of these, do not run the script until you understand why it is there and who wrote it.<\/p>\n<h2 id=\"keep-a-record-of-what-you-change\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-angle-double-right\" style=\"color:#00D4FF;\"><\/i> Keep a record of what you change<\/h2>\n<p style=\"margin:0 0 18px;\">Write down the command or script you ran, the date, the reason and the files it touched. A short note in a shared document saves time when someone asks why a setting changed weeks later.<\/p>\n<h2 id=\"when-you-write-your-own-script\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-info-circle\" style=\"color:#00D4FF;\"><\/i> When you write your own script<\/h2>\n<ul style=\"margin:0 0 24px;padding-left:22px;\">\n<li style=\"margin:0 0 8px;\">Use the least privilege you need: a regular user with sudo for one command beats a root session.<\/li>\n<li style=\"margin:0 0 8px;\">Check the input before you use it, and quote variables so spaces and special characters do not break the command.<\/li>\n<li style=\"margin:0 0 8px;\">Print what the script will do before it does it, and ask for confirmation before any delete or restart.<\/li>\n<li style=\"margin:0 0 8px;\">Test on a copy of the server, and keep the script under version control.<\/li>\n<\/ul>\n<div aria-hidden=\"true\" class=\"uh-section-divider\" style=\"width:min(100% - 32px, 1080px);margin:44px auto;display:grid;grid-template-columns:1fr 32px 1fr;align-items:center;gap:18px;pointer-events:none;\"><span style=\"height:1px;background:linear-gradient(90deg,transparent,rgba(0,212,255,0.40),rgba(23,110,165,0.24),transparent);\"><\/span><img alt=\"\" decoding=\"async\" height=\"32\" loading=\"lazy\" src=\"https:\/\/cdn.underhost.com\/android-chrome-192x192.webp\" style=\"width:32px;height:32px;display:block;border-radius:8px;filter:drop-shadow(0 0 14px rgba(0,212,255,0.30));\" width=\"32\"\/><span style=\"height:1px;background:linear-gradient(90deg,transparent,rgba(23,110,165,0.24),rgba(0,212,255,0.40),transparent);\"><\/span><\/div>\n<\/div>\n<div class=\"uh-blog-cta\" style=\"background:linear-gradient(135deg,#0D1F3C 0%,#125A8A 58%,#176EA5 100%);color:#ffffff;padding:36px 24px;border-radius:20px;text-align:center;margin:44px 0;box-shadow:0 20px 40px -15px rgba(13,31,60,0.32);\">\n<h2 style=\"margin:0 0 12px;font-size:28px;line-height:1.25;color:#ffffff;\">Need help putting this into practice?<\/h2>\n<p style=\"font-size:17px;margin:0 auto 22px;color:#EAF6FF;max-width:720px;line-height:1.7;\">Our team can review your setup and help you choose the right plan. Contact @CustomerPanel for support.<\/p>\n<p><a href=\"https:\/\/underhost.com\/shared-hosting.php\" style=\"background:linear-gradient(90deg,#00D4FF,#0077FF);color:#ffffff;padding:13px 28px;border-radius:10px;text-decoration:none;font-weight:800;display:inline-block;margin:8px;\">View hosting plans<\/a><a href=\"https:\/\/customerpanel.ca\/client\/\" style=\"background:transparent;color:#ffffff;padding:12px 28px;border-radius:10px;text-decoration:none;font-weight:800;display:inline-block;margin:8px;border:1px solid rgba(255,255,255,0.32);\">Contact @CustomerPanel<\/a><\/div>\n<div class=\"uh-faq-section\" id=\"faq\" style=\"margin:34px 0;scroll-margin-top:90px;\">\n<h2 style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:0 0 18px;border-bottom:2px solid rgba(0,212,255,0.22);padding-bottom:10px;\">Frequently asked questions<\/h2>\n<div style=\"margin-top:18px;background:#F8FAFC;padding:18px 20px;border-radius:14px;border:1px solid rgba(23,110,165,0.14);\">\n<h3 style=\"color:#0D1F3C;margin:0 0 8px;font-size:19px;\">Can I run cPanel scripts on a shared hosting account?<\/h3>\n<p style=\"margin:0;color:#1F2937;line-height:1.7;\">Usually not. Scripts that change server settings need root access, which shared accounts do not have.<\/p>\n<\/div>\n<div style=\"margin-top:18px;background:#F8FAFC;padding:18px 20px;border-radius:14px;border:1px solid rgba(23,110,165,0.14);\">\n<h3 style=\"color:#0D1F3C;margin:0 0 8px;font-size:19px;\">How do I check a script before running it?<\/h3>\n<p style=\"margin:0;color:#1F2937;line-height:1.7;\">Read it, check its source and checksum, and test it on a copy of the server first.<\/p>\n<\/div>\n<div style=\"margin-top:18px;background:#F8FAFC;padding:18px 20px;border-radius:14px;border:1px solid rgba(23,110,165,0.14);\">\n<h3 style=\"color:#0D1F3C;margin:0 0 8px;font-size:19px;\">Are old WHM scripts still safe?<\/h3>\n<p style=\"margin:0;color:#1F2937;line-height:1.7;\">Some are obsolete, and some change files in ways that are hard to undo. Use the current interface or the supported documentation.<\/p>\n<\/div>\n<div style=\"margin-top:18px;background:#F8FAFC;padding:18px 20px;border-radius:14px;border:1px solid rgba(23,110,165,0.14);\">\n<h3 style=\"color:#0D1F3C;margin:0 0 8px;font-size:19px;\">Is it better to write my own script or use a published one?<\/h3>\n<p style=\"margin:0;color:#1F2937;line-height:1.7;\">For routine tasks, a published and maintained tool is usually safer. Write your own only when you understand every line and can test it.<\/p>\n<\/div>\n<\/div>\n<p><script type=\"application\/ld+json\">{\"@context\": \"https:\/\/schema.org\", \"@type\": \"FAQPage\", \"mainEntity\": [{\"@type\": \"Question\", \"name\": \"Can I run cPanel scripts on a shared hosting account?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"Usually not. Scripts that change server settings need root access, which shared accounts do not have.\"}}, {\"@type\": \"Question\", \"name\": \"How do I check a script before running it?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"Read it, check its source and checksum, and test it on a copy of the server first.\"}}, {\"@type\": \"Question\", \"name\": \"Are old WHM scripts still safe?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"Some are obsolete, and some change files in ways that are hard to undo. Use the current interface or the supported documentation.\"}}]}<\/script><script type=\"application\/ld+json\">{\"@context\": \"https:\/\/schema.org\", \"@type\": \"FAQPage\", \"mainEntity\": [{\"@type\": \"Question\", \"name\": \"Is it better to write my own script or use a published one?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"For routine tasks, a published and maintained tool is usually safer. Write your own only when you understand every line and can test it.\"}}]}<\/script><br \/>\n<!-- uh-related-start --><\/p>\n<div style=\"background:#F4F8FC;border:1px solid #DCE7F3;border-radius:14px;padding:18px 22px;margin:32px 0 8px;\">\n<h2 style=\"margin:0 0 12px;font-size:22px;\">Related guides<\/h2>\n<ul style=\"margin:0;padding-left:20px;\">\n<li style=\"margin:0 0 8px;\"><a href=\"https:\/\/underhost.com\/blog\/the-best-way-to-use-cloudflare-with-cpanel-whm-for-better-performance\/\">The Best Way to Use Cloudflare with cPanel &amp; WHM for Better Performance<\/a><\/li>\n<li style=\"margin:0 0 8px;\"><a href=\"https:\/\/underhost.com\/blog\/how-to-install-clamav-cpanel\/\">How to Install and Use ClamAV Antivirus in WHM\/cPanel<\/a><\/li>\n<li style=\"margin:0 0 8px;\"><a href=\"https:\/\/underhost.com\/blog\/skip-whm-setup-wizard-on-new-servers-install\/\">Skipping the WHM Setup Wizard on Automated Installs: Test First<\/a><\/li>\n<li style=\"margin:0 0 8px;\"><a href=\"https:\/\/underhost.com\/blog\/automatic-cpanel-backup-domain-mysql-with-cron-php\/\">Automatic cPanel Backups: A Safer Way to Schedule Them<\/a><\/li>\n<li style=\"margin:0 0 8px;\"><a href=\"https:\/\/underhost.com\/blog\/cpanel-setup-secure-and-plugins-installer\/\">cPInstall: Legacy cPanel Automation Script (Do Not Use)<\/a><\/li>\n<\/ul>\n<\/div>\n<p><!-- uh-related-end --><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Stay updated with the latest WHM\/cPanel scripts and commands for seamless server management. This comprehensive list includes essential scripts for account management, security, DNS, mail services, and more. Whether you&#8217;re using legacy commands or modern automation tools, this guide ensures your cPanel\/WHM server runs efficiently.<\/p>\n","protected":false},"author":1,"featured_media":4853,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,202,81],"tags":[108,109],"class_list":["post-3503","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-control-panels","category-cpanel-whm","category-hosting-guides","tag-tag-cpanel","tag-tag-whm"],"_links":{"self":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts\/3503","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/comments?post=3503"}],"version-history":[{"count":11,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts\/3503\/revisions"}],"predecessor-version":[{"id":6901,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts\/3503\/revisions\/6901"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/media\/4853"}],"wp:attachment":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/media?parent=3503"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/categories?post=3503"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/tags?post=3503"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}