Choosing the Right Web Hosting Plan for Your Online Store

FoundationChoosing the right web host is very important because it serves as the foundation for your store. If that foundation doesn’t hold up, your store can come crashing down.

This can jeopardize sales, put you out of business and may even hurt your organic search engine rankings.

Why it’s important to choose wisely:

Gone in the blink of an eye:

I have read all kinds of horror stories online and one in particular really stood out. I recall a forum post by a marketplace owner that was complaining about their web host going out of business.

The host (I forgot the company name) just decided to go out of business one day and didn’t even bother to notify their customers.

As a result, the marketplace owner lost their entire site because they had no backup of their own… Therefore, it was a total loss.

Now, can you imagine how much of a pain that can be? You put all that hard work into creating a site, promoting it and building a brand only to have it taken away in the blink of an eye.

Sure, you can purchase a backup plan from the web host, but what good is that if the host goes out of business? After all, that backup is still located on the web host’s server(s)!

Unreliable hosts can cost you a lot of money:

A hosting company that provides an unreliable service can also hurt your business.

Imagine a potential customer shows up at your site only to find that it’s down or taking forever to load… Do you think that the customer will just hang around?

Personally, I think some may give it another shot but most will go elsewhere…

So if you run into such a problem, you can miss out on sales and if you are running any type of paid advertising campaigns, you can end up losing that money as well.

Organic search engine rankings affected?

People often talk about whether a slow or occasionally unresponsive site can hurt your organic search engine rankings.

I can’t really say whether this is true because I don’t work for Google or Bing, but I can imagine that this does have some effect.

After all, it would be in the search engine’s best interest to give better rankings to a site that performs well.

Recently, I actually received a message from Google about my site being non-responsive which proves that Google takes this seriously. Below I have added an image of this message:

Message in webmaster tools

Luckily, I managed to fix this pretty easily and my web host wasn’t to blame for the poor performance. Instead, I just needed to optimize my database a little more often — further down in this article, I explain how I did this.

How to choose the right hosting:

If you are planning on installing any of the software mentioned in my articles (or any other software for that matter), pay close attention to the system requirements of the software provider.

In general most software these days run on PHP and MYSQL so make sure that the version installed on you shared hosting or server is compatible.

Also, some software installations require certain extensions, like PHP GD or Curl, the ability to run scheduled jobs (crontab), the ability to override .htaccess files, as well as certain memory limits — so make sure that everything is setup properly.

If you need to adjust the memory limits or enable certain extensions, you can find most of this information by searching Bing, Google or even the host’s FAQ page.

From my experience though, most leading web hosts have their plans preconfigured so that they are compatible with most popular software installations, but be sure to check anyway.

With a store, you will most likely need an SSL certificate. An SSL certificate basically protects your customer’s personal information when they visit certain pages.

For example, login pages, account creation pages, shopping cart pages etc. are usually SSL protected.

You can tell when a page is SSL protected by looking at your browser’s address bar. If the URL starts with https you are on a protected page, if the page starts with http you are not

As for how your store decides on whether to use https or http, this is typically preconfigured and done automatically by your shopping cart software.

Be sure to get a plan that is powerful enough to handle your site:

If you are just starting out, you can probably get away with a shared hosting plan.

While a shared hosting plan is common for small sites, you may decide to go with cloud hosting, a virtual server or even a dedicated server for your business. This of course depends on your goals, traffic, the size of your site and whether you’re looking to spend money on advertising. 

Now, I know some people will ask me what this has to do with advertising, so I will explain…

If you are planning to spend a significant amount of money on advertising, wouldn’t it make sense to spend a little extra money on a hosting plan that makes your site a bit more responsive?

Do you want your customer to show up and find a site that doesn’t load or one that loads slowly? My answer is no. Sure you can afford to risk organic traffic but can you afford to risk paid traffic?

Below I have listed the differences between some popular types of hosting:

Since servers are needed for all hosting plans, I figured I’d explain what a server does but I’ve decided not to go into details. So to get to the point, a server is basically just a computer…

It runs applications which are needed to deliver your site to the web and in general, is no different from your own computer — it has a hard drive, processor(s), memory, an operating system etc.

In fact, some people even host sites on their personal computers… Of course, this is not all that practical so I don’t recommend going this far…

Shared hosting:

This is usually the most affordable because your site shares a server with many other sites. As a result, your site also shares RAM and CPU which can make your site slow when the server is waiting on additional RAM and CPU usage to be freed.

Cloud based hosting:

Unlike with traditional servers — which are limited to their own resources — cloud servers pool resources from many servers. Many cloud hosting plans allow you to pay by the hour only for what you use.

Therefore, if you get a lot of visitors at certain hours during the day, you will pay a higher price only during those hours.

Virtual dedicated server:

With this type of plan, you are basically buying virtual space on a server. But unlike with shared hosting, you are guaranteed a set amount of the server’s resources — so as long as you don’t use up all those resources, your site will perform well.

Virtual servers also allow you to reboot and gives you access to your system’s files. This makes it possible to install software and configure the system in a way that a shared hosting plan might not allow you to.

Dedicated server:

You get a server all to yourself and your site’s performance relies solely on the amount of system resources that your site uses. You basically get access to the system files and you can reboot the system at anytime. This also allows you to configure the system to your needs.

Some web hosts also offer managed virtual dedicated servers and dedicated servers. These managed servers allow you to focus on your site while the web host worries about software installations, server setup, security and more.

You are basically hiring someone to do all the technical stuff for you… But of course this comes at a price and from what I’ve seen, it’s not cheap. 

Another option is to hire a server administrator to do this job, which can be cheaper.

As far as choosing the right plan, it depends… Especially since each site is different and has different needs.

For example, I have sites hosted on shared hosting, virtual dedicated servers and dedicated servers. Creatingawebstore.com is actually on a shared hosting plan because it doesn’t use up too many resources, and if it does go down briefly, I won’t stress over it.

Also, with such a small site, it’s not a big deal upgrading to a better plan if I were to need to later on.

Now, with a very large site, I do try to choose wisely from the start because it can be difficult making a switch later on.

Especially since you may need to take down the site temporarily, configure the new hosting plan and move all the files to it.

Of course, planning too far ahead isn’t always cost efficient so do what works best for your business at the moment.

It’s also important to evaluate each web host thoroughly. When I need to find a host, I basically look at how long they have been in business, their uptime guarantee as well as the specs of their plans.

I also check out their reputation by reading online reviews, Facebook comments, Tweets, blogs etc. If I see too many people complaining about the company, I don’t even bother with them. 

The host’s reputation says a lot about their service:

I have learned one valuable lesson over the years and this is to go with a company that actually has a reputation. Do your homework and make sure that they’ve been around for a while and know what they are doing.

Personally, I have learned from my mistakes and will pass on my site being used as a guinea pig by hosts that are trying to get their act together. Below, I’ve listed a few of hosts that I actually trust:

Also, if you’re looking to install Magento, osCommerce or any other free shopping cart for that matter, you may want to read this article because it covers a couple of hosts that offer easy installations.

There are also many things that you should not blame your host for… Below I have listed a few things.

Your host is not to blame if you lose your data:

Like many others, I have learned the hard way to never, ever risk my data. On 2 occasions I have managed to delete my entire database, all because I was too lazy to backup. As a result, I ended up having to redo all the work.

As embarrassing as this may seem, I have even managed to accidentally delete an article on this site — an article which took me nearly a week to write…

Luckily since the site was on a shared hosting plan with Godaddy, a backup was automatically created and I managed to recover. Of course, I lost a couple of hours of data since the backups are only created once a day, but it was still better than losing days worth of data.

Also try to keep a recent copy of your site on your local computer just in case something happens to the host.

Your host is not always to blame for slow performance:

Avoid hot-linking images:

If you display images which are hosted on other sites, this could be the reason for your site slowing down because each time your site loads, it’s waiting on the remote images to load as well. Therefore, try to always upload your own images.

Social buttons can slow down your site:

Nearly all of the like and share buttons from social networking sites such as Facebook and Twitter utilize code which is located on their servers. From my experience, this has been a big issue especially with Facebook because when their servers are overloaded or down, my site will slow down as well.

To fix this, you can use plain HTML links to point to your Social profile pages or share pages.

Make sure that your shopping cart script is well coded:

Prior to deciding on a shopping cart script, compare as many as possible because there are many poorly written scripts out there. These scripts can really eat away at your server’s resources and for this reason, choose wisely.

Again, check the reputation of the developer and how long they’ve been in business.

Optimize your database:

Be careful not to select drop or empty from the drop down menu because this will delete your data.

While this is simple, there is very little talk about it. I actually learned about this a while ago when my site became increasingly slow. You see, when your site does a lot of MYSQL deletes, updates and inserts, your database needs to be optimized.

If you are running on a shared hosting plan, your host might do this automatically for you, but if you are on a dedicated or virtual server, you will most likely need to do this yourself. 

Below, I have added info on how this works:

Simply login to MYSQL and click on the database that you want to work with in the left column.

Then when all the tables are shown, click on the Check All link.

MYSQL check all

From there, select Optimize table from the drop down menu.

MYSQL table optimization

You have now optimized your database.

Of course this can be scheduled to run automatically via crontab. Below I have added a simple PHP script that you can use. 

Just create a file named mysql_optimization.php (or name it whatever you’d like) and paste the code below into it — remember to add your “database connection information” and schedule it to run via crontab:

<?php

//database connection information

$host = "localhost";

$username = "YOUR USERNAME";

$password = "YOUR PASSWORD";

$db = "NAME OF YOUR DATABASE";

//connect to the database

$db_connection = mysql_connect($host, $username, $password) or die("Could not connect to db");

mysql_select_db ($db, $db_connection) or die("Could not connect to table");

//get status for the database tables

$sql = "SHOW TABLE STATUS";

$result = mysql_query($sql);

//initialize array

$tables = array();

while($row = mysql_fetch_array($result))

{

// optimize tables

$optimize_mysql = "OPTIMIZE TABLE {$row['Name']}";

$optimization_result = mysql_query($optimize_mysql) or die ("Query failed: " . mysql_error() . " Actual query: " . $optimize_mysql);

}

?>

Maintain your database:

Sometimes your database will crash or run out of resources. For this reason, you should familiarize yourself with database maintenance or hire someone that can do this for you.

Below, I show you how to repair your tables. Please familiarize yourself with the concept prior to doing anything. Also look into the Check table and Analyze table commands.

In the event that you need to repair your tables (if any have been marked as crashed), check the boxes next to the table(s) that need to be repaired and select Repair table from the drop down menu as show below.

MYSQL repair table

To repair all tables automatically with PHP, simply create a file, mysql_repair.php (or name it something else) and paste the below code below into it:

<?php

//database connection information

$host = "localhost";

$username = "YOUR USERNAME";

$password = "YOUR PASSWORD";

$db = "NAME OF YOUR DATABASE";

//connect to the database

$db_connection = mysql_connect($host, $username, $password) or die("Could not connect to db");

mysql_select_db ($db, $db_connection) or die("Could not connect to table");

//get status for the database tables

$sql = "SHOW TABLE STATUS";

$result = mysql_query($sql);

//initialize array

$tables = array();

while($row = mysql_fetch_array($result))

{

// repair tables

$repair_mysql = "REPAIR TABLE {$row['Name']}";

$repair_mysql_result = mysql_query($repair_mysql) or die ("Query failed: " . mysql_error() . " Actual query: " . $repair_mysql);

}

?>