{"id":3937,"date":"2026-07-22T12:42:04","date_gmt":"2026-07-22T12:42:04","guid":{"rendered":"https:\/\/pheonixsolutions.com\/knowledge-base\/?p=3937"},"modified":"2026-07-22T12:42:45","modified_gmt":"2026-07-22T12:42:45","slug":"how-to-upgrade-or-downgrade-a-hosting-package-via-the-command-line-cli","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/knowledge-base\/2026\/07\/22\/how-to-upgrade-or-downgrade-a-hosting-package-via-the-command-line-cli\/","title":{"rendered":"How to Upgrade or Downgrade a Hosting Package via the Command Line (CLI)"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p>cPanel &amp; WHM provides the <code>whmapi1<\/code> command-line utility, which enables administrators to manage cPanel accounts directly from the server terminal. Using the <code>changepackage<\/code> API command, you can upgrade or downgrade a cPanel account by assigning it to a different hosting package without accessing the WHM web interface. This method is particularly useful for server administrators who prefer command-line management or need to automate account modifications.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<p>Before you begin, ensure that:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You have root SSH access to the cPanel &amp; WHM server.<\/li>\n\n\n\n<li>The target cPanel account already exists.<\/li>\n\n\n\n<li>The hosting package you want to assign has already been created in WHM.<\/li>\n\n\n\n<li>The server is running cPanel &amp; WHM.<\/li>\n\n\n\n<li>You know the exact name of the hosting package to be assigned.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">IMPLEMENTATION<\/h2>\n\n\n\n<p><strong>Step 1: Connect to the Server<\/strong><\/p>\n\n\n\n<p>Log in to the server via SSH as the root user:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ssh root@your-server-ip<\/code><\/pre>\n\n\n\n<p><strong>Step 2: Verify Available Packages<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> whmapi1 listpkgs | grep \"name:\"<\/code><\/pre>\n\n\n\n<p>Review the output and note the exact package name that you want to assign to the cPanel account.<\/p>\n\n\n\n<p><strong>Step 3: Check the Current Hosting Package<\/strong><\/p>\n\n\n\n<p>To view the hosting package currently assigned to a cPanel account, run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>whmapi1 accountsummary user=example | grep \"plan:\"<\/code><\/pre>\n\n\n\n<p>Replace example with the actual cPanel username.<\/p>\n\n\n\n<p><strong>Step 4: Upgrade or Downgrade the Hosting Package<\/strong><\/p>\n\n\n\n<p>To assign a different hosting package to the account, run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>whmapi1 changepackage user=example pkg=PACKAGE_NAME<\/code><\/pre>\n\n\n\n<p>Replace:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>username<\/code> with the cPanel username.<\/li>\n\n\n\n<li><code>PACKAGE_NAME<\/code> with the name of the desired hosting package.<\/li>\n<\/ul>\n\n\n\n<p>Example: Upgrade the Package<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>whmapi1 changepackage user=example pkg=high-package<\/code><\/pre>\n\n\n\n<p>Example: Downgrade the Package<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>whmapi1 changepackage user=example pkg=Low-package<\/code><\/pre>\n\n\n\n<p>If the command is successful, WHM will return a confirmation indicating that the hosting package has been updated.<\/p>\n\n\n\n<p><strong>Step 5: Verify the Package Assignment<\/strong><\/p>\n\n\n\n<p>To confirm that the package has been successfully updated, run:<\/p>\n\n\n\n<p>whmapi1 accountsummary user=username<\/p>\n\n\n\n<p>Verify that the <strong>plan<\/strong> field in the output displays the newly assigned hosting package.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>Upgrading or downgrading a hosting package using the <code>whmapi1<\/code> command-line utility is a quick and efficient way to manage cPanel accounts without using the WHM web interface. This approach is especially beneficial for administrators who automate server management tasks or manage multiple accounts through scripts. After changing the package, always verify the account details to ensure the correct hosting plan has been applied successfully.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction cPanel &amp; WHM provides the whmapi1 command-line utility, which enables administrators to manage cPanel accounts directly from the server terminal. Using the changepackage API command, you can upgrade or downgrade a cPanel account by assigning it to a different hosting package without accessing the WHM web interface. This method is particularly useful for server ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/pheonixsolutions.com\/knowledge-base\/2026\/07\/22\/how-to-upgrade-or-downgrade-a-hosting-package-via-the-command-line-cli\/\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":12,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[1],"tags":[],"class_list":["post-3937","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Upgrade or Downgrade a Hosting Package via the Command Line (CLI) - PheonixSolutions Knowledge-Base<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/pheonixsolutions.com\/knowledge-base\/2026\/07\/22\/how-to-upgrade-or-downgrade-a-hosting-package-via-the-command-line-cli\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Upgrade or Downgrade a Hosting Package via the Command Line (CLI) - PheonixSolutions Knowledge-Base\" \/>\n<meta property=\"og:description\" content=\"Introduction cPanel &amp; WHM provides the whmapi1 command-line utility, which enables administrators to manage cPanel accounts directly from the server terminal. Using the changepackage API command, you can upgrade or downgrade a cPanel account by assigning it to a different hosting package without accessing the WHM web interface. This method is particularly useful for server ..Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/pheonixsolutions.com\/knowledge-base\/2026\/07\/22\/how-to-upgrade-or-downgrade-a-hosting-package-via-the-command-line-cli\/\" \/>\n<meta property=\"og:site_name\" content=\"PheonixSolutions Knowledge-Base\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-22T12:42:04+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-07-22T12:42:45+00:00\" \/>\n<meta name=\"author\" content=\"Naveen Prasad\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Naveen Prasad\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2026\\\/07\\\/22\\\/how-to-upgrade-or-downgrade-a-hosting-package-via-the-command-line-cli\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2026\\\/07\\\/22\\\/how-to-upgrade-or-downgrade-a-hosting-package-via-the-command-line-cli\\\/\"},\"author\":{\"name\":\"Naveen Prasad\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#\\\/schema\\\/person\\\/454bb07a46f62c23ce2b0009aedc0bf3\"},\"headline\":\"How to Upgrade or Downgrade a Hosting Package via the Command Line (CLI)\",\"datePublished\":\"2026-07-22T12:42:04+00:00\",\"dateModified\":\"2026-07-22T12:42:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2026\\\/07\\\/22\\\/how-to-upgrade-or-downgrade-a-hosting-package-via-the-command-line-cli\\\/\"},\"wordCount\":349,\"commentCount\":0,\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2026\\\/07\\\/22\\\/how-to-upgrade-or-downgrade-a-hosting-package-via-the-command-line-cli\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2026\\\/07\\\/22\\\/how-to-upgrade-or-downgrade-a-hosting-package-via-the-command-line-cli\\\/\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2026\\\/07\\\/22\\\/how-to-upgrade-or-downgrade-a-hosting-package-via-the-command-line-cli\\\/\",\"name\":\"How to Upgrade or Downgrade a Hosting Package via the Command Line (CLI) - PheonixSolutions Knowledge-Base\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#website\"},\"datePublished\":\"2026-07-22T12:42:04+00:00\",\"dateModified\":\"2026-07-22T12:42:45+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#\\\/schema\\\/person\\\/454bb07a46f62c23ce2b0009aedc0bf3\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2026\\\/07\\\/22\\\/how-to-upgrade-or-downgrade-a-hosting-package-via-the-command-line-cli\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2026\\\/07\\\/22\\\/how-to-upgrade-or-downgrade-a-hosting-package-via-the-command-line-cli\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2026\\\/07\\\/22\\\/how-to-upgrade-or-downgrade-a-hosting-package-via-the-command-line-cli\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Upgrade or Downgrade a Hosting Package via the Command Line (CLI)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#website\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/\",\"name\":\"PheonixSolutions Knowledge-Base\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#\\\/schema\\\/person\\\/454bb07a46f62c23ce2b0009aedc0bf3\",\"name\":\"Naveen Prasad\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c040d480588ba05e6689aa14fcc899bd3507bbd0fd2e7f7ee38e6b6b8e264f6e?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c040d480588ba05e6689aa14fcc899bd3507bbd0fd2e7f7ee38e6b6b8e264f6e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c040d480588ba05e6689aa14fcc899bd3507bbd0fd2e7f7ee38e6b6b8e264f6e?s=96&d=mm&r=g\",\"caption\":\"Naveen Prasad\"},\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/author\\\/naveen-prasad\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Upgrade or Downgrade a Hosting Package via the Command Line (CLI) - PheonixSolutions Knowledge-Base","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/pheonixsolutions.com\/knowledge-base\/2026\/07\/22\/how-to-upgrade-or-downgrade-a-hosting-package-via-the-command-line-cli\/","og_locale":"en_US","og_type":"article","og_title":"How to Upgrade or Downgrade a Hosting Package via the Command Line (CLI) - PheonixSolutions Knowledge-Base","og_description":"Introduction cPanel &amp; WHM provides the whmapi1 command-line utility, which enables administrators to manage cPanel accounts directly from the server terminal. Using the changepackage API command, you can upgrade or downgrade a cPanel account by assigning it to a different hosting package without accessing the WHM web interface. This method is particularly useful for server ..Read more","og_url":"https:\/\/pheonixsolutions.com\/knowledge-base\/2026\/07\/22\/how-to-upgrade-or-downgrade-a-hosting-package-via-the-command-line-cli\/","og_site_name":"PheonixSolutions Knowledge-Base","article_published_time":"2026-07-22T12:42:04+00:00","article_modified_time":"2026-07-22T12:42:45+00:00","author":"Naveen Prasad","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Naveen Prasad","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2026\/07\/22\/how-to-upgrade-or-downgrade-a-hosting-package-via-the-command-line-cli\/#article","isPartOf":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2026\/07\/22\/how-to-upgrade-or-downgrade-a-hosting-package-via-the-command-line-cli\/"},"author":{"name":"Naveen Prasad","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#\/schema\/person\/454bb07a46f62c23ce2b0009aedc0bf3"},"headline":"How to Upgrade or Downgrade a Hosting Package via the Command Line (CLI)","datePublished":"2026-07-22T12:42:04+00:00","dateModified":"2026-07-22T12:42:45+00:00","mainEntityOfPage":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2026\/07\/22\/how-to-upgrade-or-downgrade-a-hosting-package-via-the-command-line-cli\/"},"wordCount":349,"commentCount":0,"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/pheonixsolutions.com\/knowledge-base\/2026\/07\/22\/how-to-upgrade-or-downgrade-a-hosting-package-via-the-command-line-cli\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2026\/07\/22\/how-to-upgrade-or-downgrade-a-hosting-package-via-the-command-line-cli\/","url":"https:\/\/pheonixsolutions.com\/knowledge-base\/2026\/07\/22\/how-to-upgrade-or-downgrade-a-hosting-package-via-the-command-line-cli\/","name":"How to Upgrade or Downgrade a Hosting Package via the Command Line (CLI) - PheonixSolutions Knowledge-Base","isPartOf":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#website"},"datePublished":"2026-07-22T12:42:04+00:00","dateModified":"2026-07-22T12:42:45+00:00","author":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#\/schema\/person\/454bb07a46f62c23ce2b0009aedc0bf3"},"breadcrumb":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2026\/07\/22\/how-to-upgrade-or-downgrade-a-hosting-package-via-the-command-line-cli\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/pheonixsolutions.com\/knowledge-base\/2026\/07\/22\/how-to-upgrade-or-downgrade-a-hosting-package-via-the-command-line-cli\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2026\/07\/22\/how-to-upgrade-or-downgrade-a-hosting-package-via-the-command-line-cli\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/pheonixsolutions.com\/knowledge-base\/"},{"@type":"ListItem","position":2,"name":"How to Upgrade or Downgrade a Hosting Package via the Command Line (CLI)"}]},{"@type":"WebSite","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#website","url":"https:\/\/pheonixsolutions.com\/knowledge-base\/","name":"PheonixSolutions Knowledge-Base","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/pheonixsolutions.com\/knowledge-base\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#\/schema\/person\/454bb07a46f62c23ce2b0009aedc0bf3","name":"Naveen Prasad","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/c040d480588ba05e6689aa14fcc899bd3507bbd0fd2e7f7ee38e6b6b8e264f6e?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c040d480588ba05e6689aa14fcc899bd3507bbd0fd2e7f7ee38e6b6b8e264f6e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c040d480588ba05e6689aa14fcc899bd3507bbd0fd2e7f7ee38e6b6b8e264f6e?s=96&d=mm&r=g","caption":"Naveen Prasad"},"url":"https:\/\/pheonixsolutions.com\/knowledge-base\/author\/naveen-prasad\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/3937","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/comments?post=3937"}],"version-history":[{"count":2,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/3937\/revisions"}],"predecessor-version":[{"id":3979,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/3937\/revisions\/3979"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/media?parent=3937"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/categories?post=3937"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/tags?post=3937"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}