This is part of our question and answers series, and this question is from one of the Shouter Mohit related to Hostgator placing a temporary block on the database.
Here is exact Email Mohit received from Hostgator hosting:
This message is to advise you of a temporary block placed on your database for site hosted on Hostgator.
The database was found to be consuming an inordinate amount of processor time, to the point of degrading overall system performance. While we do limit each account to no more than 25% of a system’s CPU in our terms of service, we do not actively disable accounts until they greatly exceed that number, which is what happened in this case.
Requests to this database may become degraded by limiting the maximum number of queries or connections for a limited amount of time, or if there are sustained issues, ultimately we may be forced to block access to this database until the issue has been resolved.
Resolving this situation may be as simple as adding additional indexes to your database, optimizing the queries used, or something equally easy.
If not, it may simply be a matter of moving this database to dedicated services, as it may have outgrown a shared environment.
If you believe you have a solution to this overuse, we are happy to discuss the situation with you and possibly reinstate the database on the server.
Otherwise, we will be happy to assist you with the upgrade process if a dedicated server is the most appropriate solution. Thank you, and we look forward to hearing from you shortly.
Solution to Hostgator Blocking your Site Access:
First of all, you need to understand, when you are on shared hosting, you are bound by the rules of the hosting company. Hostgator is a reliable hosting company, and when they put such kind of block, it’s usually because of your website is consuming more resources regarding CPU usage, which is allowed on a shared hosting.
I have a couple of sites hosted on Hostgator, and I faced this issue just once in last 4 years, and recently one of my blogger friend “Karan Batra” faced the similar issue, and I helped him to fix this issue. Before I will share the fix to this problem, here are few things which you need to keep in mind:
- Hostgator is not tricking you by sending this Email, and they are not even trying to scam you by forcing you to upgrade to VPS or dedicated server plan.
- Your Website (Mostly WordPress) is consuming a lot of resources due to many reasons. It could be any bugged script; any script might be exceeding maximum execution time, misconfigured plugin or using an outdated version of WordPress or theme.
- Shifting to different shared hosting may not be an idle solution. When I faced similar issue years back, I shifted to VPS, and it didn’t solve my problem. So don’t rush into changing your hosting company.
- The solution is to identify the problem and fix it.
- Changing hosting or upgrading to higher plan like VPS or dedicated hosting is suggested, when the issue is coming due to a consistent increase in traffic, and not due to your CPU usage.
- Avoid using too many scripts, and do not force HTML to handle server-side code (like PHP and SHTML).
Contact Hostgator customer support:
Very first thing which you should do is to contact Hostgator customer support, and ask them to give you a solution on optimizing your website. If you are in luck, a good tech representative, will ask you for login and will try to fix the issue himself, else you can simply ask him to whitelist your computer I.P. so that you can work on the optimization of your site.
I’m assuming you are technical, and if you not, hire someone to do the optimization of your site. In anyways, you need to whitelist the I.P. so that you or person who is working on your behalf, can login and start fixing your site. Simply Google “what is my IP”, and you will get your system I.P address, or use this website.
You should also ask Hostgator Tech support to look into your Error log, and let you know which script is consuming maximum resources, as this will be helpful for you to get a quick fix.
First few quick solutions:
Take a quick backup of your WordPress database. (First and most important thing)
- Upgrade your WordPress to the latest version.
- Upgrade your plugins to the latest version.
- Disable and completely delete the plugins that you are not using.
- Take help of Advanced DB cleaner plugin and delete all orphan tables. ( Not necessary, but it’s useful)
- Temporary revert to default WordPress theme.
- Configure Cloudflare. This is free & it blocks spam bot traffic which significantly lowers down your site usage. This has worked like charm for many bloggers like you. Here is a guide to help you configure CloudFlare.
Check settings of your cache plugin:
In most of the cases, the issue is because of your cache plugin is not configured correctly. Go to your cache plugin settings, and check if all settings are proper or not. I mostly recommend any of these two plugins for WordPress caching:
If you believe that settings are perfect, and still the site is going down, you should shift to other cache plugins. For example; as I mentioned above, when I fixed my friend site recently, he was using W3 Total cache, and it had few bugs in an earlier version, shifting to Super cache fixed the issue. (Note: Latest version of W3 total cache is perfect).
Optimize your Database:
Install WP-optimize plugin, and get rid of post revisions, auto-draft posts, spam comments, and optimize your database. This will ensure that your database will work smoothly.
You can also take help of WP DB-manager plugin to drop some of the tables which are taking too much space in database index. For example, plugins like redirections, broken link checker consume too much size. (be careful with this step, and make sure to take backup of your database).
In 80% of the cases, above solution will fix the issue and you can again contact Hostgator Support via Chat or Email to remove the temporary ban. Even if it doesn’t help your issue, here are additional things which you could do:
2nd step to Fix Hosting Temporary database block problem:
Check your plugins, and remove memory consuming plugins:
I have already explained that you can use any number of plugins on your WordPress blog until they are coded well. A poorly coded plugin usually slows down your blog, and increase the execution time. You can install P3 Profile plugin, which checks the performance of plugins installed on your WordPress blog, and will give you an idea about which plugin is taking maximum time to execute, which plugin is consuming maximum resources. Now, all you need to do is either find an alternative to that plugin or get rid of memory hogging plugin.
Check your WordPress theme:
Are you using year old themes? Something which you have installed years back? It’s time to install a theme, which is coded for today’s date and work well with the current version of WordPress well.
If you are using a Theme like Genesis, make sure you are running the latest version of the theme. If you are using free theme or theme from any other theme provider, ensure that your theme has been updated recently.
If you think, you need time to choose your WordPress theme, simply switch back to default WordPress theme, and when Hostgator removes the database and site block, you can plan on a new theme.
Last but not the least, time to upgrade or Change hosting:
If nothing of these worked for you, and Hostgator team is suggesting you to upgrade to VPS or Dedicated server, it’s time for you to change your hosting or upgrade. Here are few suggested hosting, according to my experience which is good, reliable & cost similar to HostGator.
- Dreamhost or Bluehost: Bluehost and Dreamhost are two hosting company that I can recommend. They are good and reliable. At Dreamhost, you have to ask tech support team to do stuff for you, whereas Bluehost are more WordPress-centric.
- WPEngine for Managed WordPress Hosting: If you don’t like any tech hassles, and quality of hosting is top-priority, you should shift to WPEngine. The only downside is they are costly, but quality comes with a price. You can read my experience of moving to WPEngine over here.
- Kinsta: This one starts at about $100/month & I recommend this only when you are getting a traffic of 1 million per month of running a super memory extensive site. ShoutMeLoud is hosted on Kinsta hosting.
In any of these, you can take help of my guide to change WordPress hosts, for moving your site.
Do let me know on which step your issue got resolved, or have you tried any additional step to remove database ban imposed by your Hosting. If you find this tutorial useful, consider sharing it on Facebook and Google plus.
Subscribe on YouTube