{"id":1974,"date":"2017-08-29T10:54:44","date_gmt":"2017-08-29T05:24:44","guid":{"rendered":"https:\/\/pheonixsolutions.com\/blog\/?p=1974"},"modified":"2026-09-08T11:51:18","modified_gmt":"2026-09-08T06:21:18","slug":"limitingthrottling-bandwidth-cpanel-user-account","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/limitingthrottling-bandwidth-cpanel-user-account\/","title":{"rendered":"Limiting\/throttling bandwidth for cPanel user accounts"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Some cPanel accounts may consume a large amount of server bandwidth, which can affect other websites hosted on the same server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This guide explains how to <strong>limit or throttle bandwidth for a specific cPanel account<\/strong> using Apache bandwidth modules and cPanel&#8217;s virtual host configuration.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Before starting, make sure you have:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>cPanel\/WHM access.<\/li>\n\n\n\n<li>Root access to the server.<\/li>\n\n\n\n<li>Apache bandwidth modules installed.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Check whether the required modules are available:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/usr\/local\/apache\/bin\/apachectl -M |grep bw<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Expected output:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">bwlimited_module (shared)\nbw_module (shared)<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Implementation<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Create a Configuration Directory<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Create a custom Apache userdata directory for the cPanel account and domain:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">mkdir -p \/usr\/local\/apache\/conf\/userdata\/std\/2_4\/username\/domain.tld\/<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Replace:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>username<\/code> with the cPanel account username.<\/li>\n\n\n\n<li><code>domain.tld<\/code> with the domain name.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Change to the Configuration Directory<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Navigate to the newly created directory:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">cd \/usr\/local\/apache\/conf\/userdata\/std\/2_4\/username\/domain.tld\/<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Create the Bandwidth Configuration File<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Create a configuration file:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">vi cp_bw_all_limit.conf<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Add the following configuration:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;IfModule mod_bw.c>\n\n  BandWidthModule On\n\n  BandWidth all 512000\n\n&lt;\/IfModule>\n\n&lt;IfModule mod_bandwidth.c>\n\n  BandWidthModule On\n\n  BandWidth all 512000\n\n&lt;\/IfModule><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>BandWidth all 512000<\/code> setting defines the bandwidth limit applied to the account.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Ensure the Virtual Host Includes<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Run the following command to apply the custom configuration to the user&#8217;s virtual host:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/scripts\/ensure_vhost_includes --user=username<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Replace <code>username<\/code> with the cPanel account username.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 5: Verify the Virtual Host Configuration<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Verify that the Apache virtual host includes are correctly configured:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/scripts\/verify_vhost_includes<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Make sure there are no configuration errors before restarting Apache.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 6: Restart Apache<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Restart the Apache service:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">service httpd restart<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The bandwidth configuration should now be applied to the specified cPanel account.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Apache bandwidth modules can be used to control the bandwidth consumed by individual cPanel accounts. By creating a custom userdata configuration and applying it to the required virtual host, you can throttle bandwidth without modifying the main Apache configuration.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This approach is useful on shared hosting servers where one account is consuming significantly more bandwidth than other hosted accounts.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">FAQs<\/h2>\n\n\n\n<h4 class=\"wp-block-heading\">1. How can I check whether the bandwidth modules are installed?<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Run:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/usr\/local\/apache\/bin\/apachectl -M |grep bw<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This displays the installed Apache modules matching <code>bw<\/code>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">2. Can I limit bandwidth for only one cPanel account?<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Yes. The userdata configuration can be created specifically for the required cPanel username and domain.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">3. Where should the bandwidth configuration file be created?<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Create it under:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/usr\/local\/apache\/conf\/userdata\/std\/2_4\/username\/domain.tld\/<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">4. What does <code>BandWidth all 512000<\/code> do?<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">It applies the configured bandwidth value to all traffic handled by the corresponding Apache virtual host.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">5. Do I need to restart Apache after making the change?<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Yes. After applying and verifying the virtual host configuration, restart Apache:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">service httpd restart<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Related Articles<\/h2>\n\n\n\n<h4 class=\"wp-block-heading\">Configure Multiple PHP with LiteSpeed cPanel Server<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Learn how to configure and manage multiple PHP versions on a cPanel server running LiteSpeed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/configure-multiple-php-litespeed-cpanel-server\/\">https:\/\/pheonixsolutions.com\/blog\/configure-multiple-php-litespeed-cpanel-server\/<\/a><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Install mod_evasive Module on cPanel EasyApache<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Learn how to install and configure the Apache <code>mod_evasive<\/code> module on a cPanel server to help handle excessive requests.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/install-mod-evasive-module-cpaneleasy-apache-4\/\">https:\/\/pheonixsolutions.com\/blog\/install-mod-evasive-module-cpaneleasy-apache-4\/<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Talk to our experts<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Looking for the right technology solution for your business? Our team of experts can help you with development, cloud, DevOps, design, and a wide range of other technology needs. Get in touch with our team&nbsp;<a href=\"https:\/\/pheonixsolutions.com\/contact\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Some cPanel accounts may consume a large amount of server bandwidth, which can affect other websites hosted on the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1019],"tags":[371,263,261],"class_list":["post-1974","post","type-post","status-publish","format-standard","hentry","category-cloud-aws","tag-bandwidth","tag-cpanel","tag-linux","psol-cat-cloud-aws"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/phn2x7-vQ","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/1974","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=1974"}],"version-history":[{"count":1,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/1974\/revisions"}],"predecessor-version":[{"id":11532,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/1974\/revisions\/11532"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=1974"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=1974"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=1974"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}