3 Ways How To Host a Website (One-Click-Install, Manually, Home Server)

John Stevens  — No Comments
How to host a website
Below are 3 ways to host a website

How to host a website is one of those questions you are first confronted with when building your own web presence. Once you have a finished site (whether it’s self-built or created by a professional), you need to house it somewhere.

There are several ways to start hosting your site online. To make it easier on you, in this article you will learn everything you need to know about how to do so. The post will go over three different possibilities, namely using web hosting that offers one-click install, uploading your site via FTP and creating your own server.

In the end, we want to you be able to confidently go ahead and put your site online. But first, a little caveat.


1. Using 1-Click-Install (Beginners)

One Click Install Website
Many web hosts offer 1-click-install for CMS

When asking yourself how to host a website, one of the easiest options is to go for a hosting provider that offers a one-click install.

This is especially true if you are using a content management system or w, which is becoming more and more common. In this tutorial, we will mainly use WordPress as an example.

But first, what does one-click install mean?

Usually, when you create a website, there are several steps involved. First of all, you need to upload the website files to the server. If you are using WordPress, you also need to create a MySQL database and connect your site to it.

While none of that is particularly hard (in fact, we will talk about it further below), it can be a little time-consuming. For that reason, many hosts offer to do all of it automatically for you. This makes hosting your own website much easier, so let’s go over this first.

1.1 Sign up with web hosting

We’re recommending Bluehost, see our homepage for best web hosting list.

Because of that, we will be using Bluehost to show you how to host a website with one-click install.

It’s one of the hosting providers we recommend especially because they enable you to start your own website for less than $3/month including a free domain for 1 year, too.

Once you have signed up to the hosting provider, you can find options to install WordPress in your account under My Sites or cPanel (depending which host you chose).

1.2 Look for Create Site or Install WordPress or One-Click-Install Icon

Once you’ve signed up and logged in you’ll be able to host your website immediately.

For Bluehost, a simple click on Create Site will start the process. Bluehost will first ask you to input a site title and tag line.

bluehost enter site title and tagline

Once you have done that and clicked on Next, it will then prompt you to choose which domain to use, if you want to install WordPress in a subdirectory and also offer a number of free plugins.

bluehost select domain

You can disable the plugins because if you have an existing website, you just need a simple site to act as a receptacle for it. Again, click Next to finish the process. You will get a success message from which can go back to your hosting account or log in to WordPress.

bluehost finish setting up wordpress website

When you have that, it’s time for the next step which is to move over your website to the new location. Here, the work you have to do depends on the type of site you are dealing with.

1.3 Transferring Your Website Content

If you have a very basic site, it might make sense to simply move your content.

a) Transfer Your WordPress Website

This is ideal, if you are using a standard theme, have only set up some pages, posts and menus, uploaded some images but aren’t using any plugins, custom design or functionality. In that case, you can use options built into WordPress. Access them on the site you want to move under Tools > Export.

wordpress export content

Here, simply click on Download Export File to save a file that contains all of your content. Then, go to the site you just created via one-click install and navigate to Tools > Import. Here, scroll down to the WordPress section and click Install Now. This will install the WordPress importer on your site.

install wordpress importer

When it’s finished, click Run Importer to open up the following screen.

wordpress import content

Hit Browse… and find the file you downloaded earlier, then hit the big blue button.

On the next screen, you need to assign the imported content to a user on your site.

wordpress import content assign user

You can either create a new one or choose a user that already exists. Be sure to check the box where it says Download and import file attachments, otherwise, your media files will not be included in the move. Finally, hit Submit. It might take a little while until the page is done loading (depending on the amount of content transferred) but after that, you are all set.

b) Use “Backup Plugin” for Transfer

While the above is a valid option, it’s more likely that you will want to move more than merely your site content. Most people looking how to host a website already have a finished web presence that includes a theme, plugins and more. If that is the case for you, you need to make sure that everything is moved at the same time so that the site on your server ends up the same as what you already have on hand.

One of the easiest ways to do so is to use a backup plugin. There are a bunch of offers out there that allow you to import a site backup into another website, such as All-in-One WP Migration. To take advantage of it, the first thing you need to do is install and activate the plugin on the site to be moved.

all in one wp migration

Once you have done that, go to the Export section under its newly created menu item.

export website in all in one wp migration

If you are changing the URL of your site (which is likely, since the original site is probably in a test environment) be sure to click the top bar in order to replace mentions of the old address with the new. Enter the URL of the current site under Find and the web address of where it’s supposed to end up in Replace with.

all in one wp migration change urls in database

After that, all you need to do is click on Export to and then File. The export will then start automatically. At the end of it, you get a prompt to download the file, which you should follow.

Once done, go to the new website in your hosting account and install and activate All-in-One WP Migration there as well. When you are finished, this time go to the Import section.

import site with all in one wp migration

Here, either click Import From > File and navigate to the file you just downloaded or drag and drop it onto the respective field. Either will start the import process. You will get a prompt that warns you about overwriting existing data. Click Proceed.

overwrite existing site in all in one wp migration

When it’s finished, you will be asked to go to your permalink settings and save them twice. Do so and you are done.

c) Use Your Host’s Migration Service

The final way to move your website to its new home is to take advantage of migration services offered by hosting providers. Especially managed hosting providers do a good job of helping you move your site from where it currently resides to their servers.

wp engine automated migration plugin

This is an especially good solution if your finished website is currently located in an online repository such as a staging environment or a domain subfolder. It usually doesn’t work for sites that are hosted locally. Aside from that, the way hosting providers deal with this differs from company to company, so it makes the most sense that you inquire about this with your host.

 

2. How to Host a Website Manually (Intermediate)

One-click install is not the only way to get your website up and running. You can also go the old-fashioned route and do everything manually. For that, you still need a hosting account, however, deploying your site will work slightly differently.

2.1 Gather Your Files

One of the first things you need is your website files and optionally database. You might already have those from your web developer. If they lie on some server, make sure you download everything to your computer. If your site runs on WordPress, the official documentation can help you with that.

2.2 Change wp-config.php

If your site is running on WordPress, you first need to make an important change to your WordPress installation. For that, go to the WordPress folder on your hard drive and find a file called wp-config.php. Copy the file and save the copy somewhere safe. Then, open the file in the WordPress folder and find these lines:

// ** MySQL settings – You can get this info from your web host ** //
/** The name of the database for WordPress */
define(‘DB_NAME’, ‘database_name_here’);

/** MySQL database username */
define(‘DB_USER’, ‘username_here’);

/** MySQL database password */
define(‘DB_PASSWORD’, ‘password_here’);

/** MySQL hostname */
define(‘DB_HOST’, ‘localhost’);

Update the information with the database name, database username, password and host of the environment where your site will reside in the future. You can get all that information from your hosting provider’s management suite.

For example, in Bluehost, it’s under Home > Databases. You can also get there via Advanced > Databases > MySQL Databases.

bluehost mysql menu

In this screen, you can control your databases, the users associated with them and their passwords. Feel free to create any database, user and password you like or modify any of the existing ones. Then, don’t forget to enter the information in wp-config.php. Just a quick hint: the host name differs from provider to provider but in Bluehost, it is always localhost.

Once you have entered all of this, save the file and proceed.

2.3 Upload Files via FTP

Now it’s time to move your site to the new location. The first step of that is to upload the website files to the new server. For that, you need an FTP client like FileZilla as well as the FTP information from your new hosting provider. This includes:

  1. Your FTP server address
  2. An FTP username
  3. The associated FTP user password

Unsurprisingly, in Bluehost, you find this information under Advanced > FTP.

bluehost ftp menu

Here, create a new account with whatever username and password you like. You can also limit its access to a certain directory if that makes sense for you. Plus, don’t forget to write everything down for later.

Alternatively, when have created the account, you can also go down to the list at the bottom and click on Configure FTP Client next to it. This will allow you to download a configuration file for different FTP clients, including FileZilla.

download ftp configuration file from bluehost

Once you have all of that, fire up your FTP client and find the place where you control the access information. In FileZilla, this is under File > Site Manager. You can also simply click the icon in the upper left corner. Both will get you to this screen.

filezilla site manager

Create a new site and enter the host address. Under Logon Type, pick Normal, then enter the username and password. Click Ok when you are done. Alternatively, go to File > Import and upload the configuration file you downloaded earlier. The site will then automatically show up in the site manager as well. After that, you can connect to your site from there via a button of the same name or the drop-down menu in the main screen.

filezilla drop down menu

Once you have, navigate to the folder that your URL is pointing at (usually the root directory). Then, on the left side, do the same but for the website files residing on your computer.

how to host a website upload files with filezilla

Mark them all and drag them over to the right side. When you let go, the program will start uploading. Depending on the size of your files, this might take a while.

If you have a pure HTML site, you should be done once the upload finishes. Everyone else needs to do a few more steps.

2.4 Import the Database

Next up is the database. If you are using a content management system, this also part of your website. To import it, go to the database management system of your hosting provider. In most cases this will be phpMyAdmin so you will see a screen that looks like this:

phpmyadmin main screen

Here, be sure to enter the database you plan on using for your site. Then, click the Import menu item on top.

phpmyadmin import menu

In the next screen, use the Browse button and find your database file. When done, simply click Go at the bottom to start the import. When it’s finished, this part is done.

2.5 Update Your Database References

The only problem is that currently all references in your database to pages, images etc. all contain your old URL. For that reason, your new site will not work properly yet and the final step is to change that.

For WordPress, you can do that easily within phpMyAdmin. Just go to the SQL menu.

phpmyadmin sql menu

Here, enter the following code into the field on top (thanks to Chuck Reynolds!).

SET @oldsite=’http://oldsite.com’;
SET @newsite=’http://newsite.com’;
UPDATE wp_options SET option_value = replace(option_value, @oldsite, @newsite) WHERE option_name = ‘home’ OR option_name = ‘siteurl’;
UPDATE wp_posts SET post_content = replace(post_content, @oldsite, @newsite);
UPDATE wp_links SET link_url = replace(link_url, @oldsite, @newsite);
UPDATE wp_postmeta SET meta_value = replace(meta_value, @oldsite, @newsite);

Be sure to replace http://oldsite.com with the URL of your old site location and http://newsite.com with that of the new one. Then, click Go in the lower right corner to execute the statements.

When done, your database references should be updated and your website now comfortable in its new home. The only thing that might be left is to log in, go to Settings > Permalinks and save your permalink structure once.

wordpress permalink settings

That’s it, well done! You have learned an important step in how to host a website.

 

3. Create Your Own Server (Technical)

Another possibility to host a website is to use your own server. The great thing about this is that it gives you complete control over the environment your website resides in unlike other types of hosting. You can make decisions about hardware and software setup and don’t have to deal with interferences from other sites. This is especially suitable for really large sites that have a lot of demand in terms of performance.

If you decide to opt for your own server, you have two options: either build and run a server in your own house or rent it from a hosting provider. The latter is also called dedicated hosting. One provider that offers this kind of setup is GreenGeeks but there are others out there. Check out our list of the best web hosting 2018 has to offer for more.

Be aware, however, that figuring out how to host a website on your own server can be quite complicated. This is because you have the added responsibility of administering the server itself. Depending on which road you have chosen that includes things like basic setup (including the operating system), security, performance and more. Therefore, this is really only a solution for those who know what they are doing or can afford to hire people who do.

Aside from that, once you have your own server all set up, getting your site onto it basically works the same way as when you rent server space from a provider. Consequently, you can follow the advice above.

Conclusion

Learning how to host a website is an important basic step in being a website owner. Hosting provides a location and address for the website so that others can reach it. Without it, you might have a site but you don’t really have a web presence.

Above, you have learned everything you need to know about how to host your own site. You have learned why free hosting is often not a good idea, how to get your site onto a server that offers one-click install as well as doing the same thing manually. In addition to that, we have touched upon hosting your site on your own dedicated server.

By now, you are ready to dive into the world of hosting your own site. We hope to see it online soon! Let us know where you decided to house it.

Do you have additional questions about how to host a website? Don’t hesitate to ask in the comments section below!

Leave a Reply

Your email address will not be published. Required fields are marked *