Impossible to set a bandwith limit on subsites? Ok, why not limit the number of daily visitors?


When running a big network we are hosting a lot of sites and content. While growing we are facing the same problems than any hosting company: increasing bandwidth needs. Most of serious shared hosting companies set a bandwidth limit for each of their customers. This a way to protect their whole service from high bandwidth consuming (can we say that?) websites.

In WordPress multisite, limiting the size of the storage space and the allowed file size might be a first step to prevent bandwidth issues. However it’s impossible to control the bandwidth on a per site basis.

So what do you think of the following idea:

Limiting the number of DAILY VISITORS on each subsite!

This could be an incredible nice addon to the “Pro-sites” (Supporter) plugin: for example, free members would have a xxx limit of daily visitors while paying members would have an unlimited number of visitors. I think this could be a good strategy as new and free customers won’t notice this limit as their site/blog doesn’t have a lot of traffic. And when they reach the limit we can assume that they have spent a lot of time building their site/blog and thus would not be very happy to move to a different service. They would probably accept to be charged at this point.

I don’t know how complex that would be. Maybe this would require a complete stats solution (but aren’t you working on such a project?)… maybe not. But I’m sure this could become a MUST-HAVE plugin (or add-on) for every network owner.

What do you think? Would you be interested?



  • Philip John
    • DEV MAN’s Apprentice

    Hiya Laurent,

    Interesting suggestion!

    Just thinking out loud…. obviously tracking every single visit to every single site would be required, which could create bloat and would need to be managed well.

    Considerations would include whether to exclude site admins from the count of visits and how to space out the visits. For example, I might reach my limit before 10am which wouldn’t be ideal. Could I schedule to ensure my site is always online at lunchtime? Etc…


  • koff
    • Site Builder, Child of Zeus

    Hi Phil!

    I want to add to the Idea, auto-upgrade option.

    Now the different levels of premium site are the page views limit,

    And this could be a really “pay as you go” feature.

    That solves the “limit before 10am” problem.

    and I think the information is already available with “Multisite Analytics” plugin isn’t it?

  • Gary M. Gordon
    • Site Builder, Child of Zeus

    I would also like to see a per subsite bandwidth limit (if possible). But the limit of visitors per month is also a good option (whether this is in addition or separate from the bandwidth limit option).

    Either of these would be important and very useful options to be added to Pro Site.


  • Matt F
    • Site Builder, Child of Zeus

    As Phil stated here:

    How to Cotrol Bandwidth Usage

    Because each site is on one installation you cannot limit the amount of bandwidth of invidividual sites on a WPMS install.

    However the page views idea is a viable option but needs some figuring out.

    I am in fact working with a developer to solve this issue but I would like to know how and other sites such as and handle this issue.

    It is something that I myself need to figure out before I move forward.

    What if someone is getting a lot of traffic and using up a lot of bandwidth costing me a lot of money (unknown to a lot of people is that unlimited bandwidth is a myth)

    Any feedback would be greatly appreciated.



  • Lorange
    • The Incredible Code Injector

    More than one year later it would be interesting to get a better feedback from some WPMUDEV tech guys. I think this would be a fantastic feature on multisite networks, a good way to sell more paid accounts (prosites) and a good way to protect our servers at the same time.

    Technically: Maybe it could be easier to track the number of pageviews instead of the number of unique visitors. This could be done with a simple sql auto-increment field and could eventually be limited to the homepage in order to limit the impact on the database. Of course hits generated by logged-in users could be ignored.

    What do you think WPMUDEV guys and other members?

    Sorry for my limited English.

  • Fullworks
    • The Bug Hunter

    Limiting the number of visitor might not be as hard, or as bloated as it sounds. For instance, most multi-sites use Analytics (Google or PiwIk), which creates an ‘off server’ count of visitors. Both GA & Piwik have API’s.

    For instance, I use Piwik (using the plugin) and it works very well with MU, giving each site it’s own analytics and ‘in admin’ graphs etc. I wouldn’t be beyond the with of man to hook into the data that is creating the graphs and apply ‘pro-site’ level limits.

    I’m a bit busy creating my next Multi-site project, but this is definitely one that would be interesting for the future.

  • phillipfx
    • Design Lord, Child of Thor

    +1 from me. @llocally you make a good point. You can always make the request cached, chroned or passive so load on the server is minimal. There is alot of ways to go about this.

    I think since this seems to not be a demanding new feature for Incsub someone should try modifying a free wordpress bandwidth monitor plugin to work with multisites and work from there….


  • us-Sunnah
    • The Incredible Code Injector

    Our team researched this and the data is not readily available directly from WordPress (especially for linked files that never involved WP/PHP). We enabled logging for each server block (vhost) in our nginx and used bytes_sent to catch all this data and then roll it into a MySQL table every minute and use scripts to prune and store into daily, weekly, monthly, etc. so we don’t have too much data.

    We still use visits per month as our hard limits on plans with customers but have built a new page into the Pro Sites admin area that gives us something like:

    + owner_username | Plan: 3 | Sites: 2 | Storage: 3GB | Hits: 40,000 (of 50,000) | BW: 3.3GB

    — | hits, bw, etc

    — | hits, bw, etc

    We haven’t open-sourced it as much of it is written for our specific use-case but we could consider refactoring it for other users if anyone was willing to pay for it.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.