Some hosting companies offer “unlimited” MySQL database size (see my article on the pitfalls of unlimited server resources).
Other hosts limit the size of a single database, usually to between 500 MB and 2 GB.
Many of you are probably wondering how big your site’s MySQL database can get. I’ll try to answer that question in this article.
I will assume that you’ll be using WordPress, a beginner-friendly and robust system for managing websites.
WordPress hosting plans with unlimited MySQL size:
Disclosure: if you purchase through any links on this web page, I earn referral fees from partners. These fees do not influence my recommendations.
Quick answer for beginners: how much database size will you need?
If you’re a beginner looking for a quick answer, here it is:
As long as your hosting company offers at least 200 MB of database storage, this will be more than enough for your first few years of running a website, even if you actively work on growing it.
The good news is that almost all hosts offer more than 200 MB. In fact, the lowest limit I’ve seen so far is the 500 MB limit per database at SiteGround.
As a result, beginners shouldn’t worry about MySQL database size at all.
Yup! Beginners can afford to forget about this limit altogether and choose their hosting provider based on other important factors (price, support quality, money-back guarantee, and speed). If you’re just starting out, head over to our cheap web hosting rankings for recommendations on where to go from here.
If you’re an advanced user or a beginner who would like to learn more, read on.
How big is the database of a basic WordPress installation?
As of June 2020, the MySQL database of a simple WP blog is around 10 MB (Megabytes).
This is assuming you do not install any plugins and that you use the latest version of WordPress.
However, this figure is not very useful. After all, nobody wants to install a basic WP installation and just leave it at that.
You want to grow and expand your website. And as you do so, the size of your MySQL database will slowly increase.
How big will my WordPress MySQL database get as my site grows?
Just like it’s difficult to determine how many Inodes a growing website will need in the future, it’s difficult to determine how big your database will get.
Consider the following examples, based on two personal websites that I operate outside of Berkaweb:
- A website with 250 posts has a 100-MB database.
- Another website with barely 20 posts has a 110-MB database.
Some of you may have expected the website with more posts to have a larger database. So why isn’t this what we are seeing?
Because the number of posts on your website is just one of multiple factors that determine the size of your MySQL database.
Factor #1: the WP plugins that you use
WordPress plugins can have a significant impact on the size of your database.
For example, WP Cerber (a security plugin) uses the WordPress database to keep logs of various website activities, including incorrect admin login attempts by hackers, and tons of other security data.
These logs can significantly inflate the size of a MySQL database.
Factor #2: WordPress post and page revisions
Each time you modify a post or page and save the changes, WordPress stores a backup of the previous version of that post/page for future restoration.
This inflates the size of your database because all previous versions of a page/post are stored in it!
If you frequently edit your WordPress posts/pages, stored revisions could be using up a significant portion of the database storage room allotted by your hosting company.
If this is the case, try the WP-Sweep plugin, which allows you to manage and delete your revisions periodically to free up database space.
Factor #3: spam comments
Every comment left on your website inflates the size of your database – this includes unwanted comments left by spammers.
It’s not unusual even for a relatively small website to receive dozens or hundreds of spam comments per day. On top of that, some of these comments can be lengthy, meaning they take up even more database space than is typical for a comment.
Left unchecked, spam comments can easily add tens or even hundreds of Megabytes to your database per year.
To avoid this problem, regularly delete all comments in your WordPress “spam” folder.
You should also install the free Akismet plugin which will prevent the majority of spam comments from making it into your WP database in the first place.
Factor #4: user-generated content
User-generated content, such as comments or customer reviews, are stored in the MySQL database.
However, this is unlikely to have a big impact on the size of your DB unless your users are extremely involved with your website (if that’s the case, congrats on your successful website!)
Remember: files are not stored in the MySQL database
Files, such as videos and images that you upload to your website, are not stored in the database.
So you can upload as many of them as you need to without worrying about MySQL database size limits.
Instead, the number of files you can store will be limited by:
- How much server storage your hosting company provides, and
- Your hosting plan’s Inode limit
If a host offers unlimited storage, do I also get unlimited database size?
Unfortunately, that’s not always the case.
Many website hosts that offer “unlimited” storage capacity impose a separatelimit on the size of individual MySQL databases.
The same is true for hosts that do limit storage. For example, a hosting company with a 5 GB storage limit could also have a one-GB database limit.
The bad news is that many hosting companies do not advertise their MySQL database limits – you often won’t hear about them until you read the terms of service or ask a support agent.
When in doubt, see my hosting reviews – I always list the MySQL database limit for each hosting plan offered by a provider.
What happens if my database size exceeds the limit?
Usually, your host won’t allow this to happen.
If there’s a danger of exceeding the limit, most hosts will contact you via email and provide specific recommendations to help you slim your database down.
If reducing the size is impossible and you end up going over the limit, one of the following will happen:
- Your provider will ask you to upgrade to a hosting plan with a higher database size limit
- If the above isn’t possible, they might temporarily increase the limit – until a solution to the problem can be found
- Your website will be suspended until you can comply with the limits
Final thoughts and my recommendations
Again, if you’re a beginner and plan to launch your first website, any host that allows you to have a 200-MB database will suit your needs for a long time. Fortunately, this includes the vast majority of hosts.
If you are an advanced user, the best you can do is:
- Be aware of the database size limit imposed by your host (see my reviews)
- Regularly monitor the size of your database in phpMyAdmin, vDeck, or whatever control panel you are using
- If you approach your limit, refer to my earlier recommendations for reducing the size of your database
- If step (3) doesn’t help, contact your host and ask them if there’s anything you can do to reduce the size of your DB
Remember: a large database not only put you at risk of getting into trouble with your host; it also has a negative impact on your website’s performance and load speed.