Tag - Host

How to Host a Website (Simple Guide for Beginners) in 2019


Do you want to learn how to host a website? Self-hosted website builders like WordPress offer you full freedom to build any kind of website.

The challenge is that most beginners don’t know the best way to host a website. Many even believe that it requires special technical skills to host their own websites.

That’s simply not true.

If you choose the right approach, then you can easily host your own website within just a few minutes. In most cases, it is just as easy as creating a facebook account.

In this beginner’s guide, we’ll show you the exact steps on how to host a website without learning any technical skills.

We will also explain how it all works behind the scenes. This would help you gain a basic understanding of different ways to host a website.

Ready? Let’s get started.

How to host a website

Here is what you’ll learn in this guide.

What Does it Mean to Host a Website?

Hosting a website means that you put your website files on a special computer called server. This computer makes your website files publicly accessible on the internet, so anyone can visit it.

In order for other people around the world to see the website, these special computers have a particular set of software installed. This software is called a web server.

A web server’s basic job is to receive incoming requests and respond by sending the requested page to the user’s browser.

Hosting a website

Now all of this may sound like bunch of technical jargon, and it is.

However, you don’t need to learn how to do all these things in order to host your website. Luckily, there are thousands of companies that offer this as a service (at very low cost).

All websites on the internet use a web hosting company to host their websites. Even tech giants like Netflix (hosted on Amazon) and PayPal (hosted by Google Cloud hosting) use third-party service providers for their hosting.

There are only a handful of companies like Google, Microsoft, and Amazon that completely host all their services on their own platforms.

They can do this because they have the technical and financial resources to take on such a huge task. All other businesses (including us) use a web hosting company to host their website.

What Do You Need to Host a Website

You will need the following two things to host a website.

  • Web hosting service provider
  • Domain name

Web hosting service providers offer you ready-to-use web servers to host your website. They take care of all the technical stuff and provide website owners with easy to use tools to manage their hosting.

Now, how do users reach your self-hosted website? This is where domain names come in.

A domain name is the address of your website that people type in the browser to visit your website. For example, wpbeginner.com will bring you to this website.

Basically, a domain name is a human-friendly way to connect user’s browsers to the website server associated with that domain name. To learn more, see our guide on what is a domain name and how do domains work.

how domain names work

You can purchase a domain name from one of these top domain registrars. These are companies licensed to sell domain name registrations.

To understand the relationship between hosting and domains, see our guide on the difference between web hosting and domain name.

Note: later in this article, we will show you how to get a domain name for free.

But first, let’s take a look at different types of web hosting plans and evaluate which one would be the right fit to host your website.

Types of Website Hosting Services

Not all websites are the same. Some are smaller and have low traffic while others are larger with more content and visitors.

A smaller website requires fewer resources. On the other hand, a larger and more popular website will need more resources to run efficiently.

Website hosting companies provide different types of hosting offers designed to address specific website needs. Here are some of the most common hosting services.

1. Shared Hosting

A shared hosting service is suitable for small websites, blogs, and small businesses who are just starting out.

They are able to keep their costs down by allowing multiple websites to share the same server resources. This makes hosting your website affordable.

Pricing: Starting from 2.75 per month to $7.99 per month

Suitable for: Starting a new blog, small business website

Our recommended shared hosting provider: Bluehost

To learn more see our guide on the truth about best shared web hosting.

2. VPS Hosting

VPS hosting (Virtual Private Server hosting) is still a shared hosting environment. However, it offers a flexible set of resources to handle large traffic spikes.

You get a partitioned of private server for your website that you can manage from your hosting control panel. This gives you the best of both worlds, the low cost of shared hosting with the flexibility of dedicated resources.

Pricing: Starting from $29.99 / month

Suitable for: Medium-sized businesses, popular blogs, and eCommerce stores.

Our recommended VPS hosting company: HostGator

To learn more, see our article about when you need VPS hosting for your site.

3. Managed WordPress Hosting

Managed WordPress hosting is a specialized hosting service made specifically for WordPress. It is like a concierge service for your WordPress website.

On a managed hosting platform, the hosting company takes care of updates, backups, and caching of your website. This allows you to focus on creating content and growing your business.

Pricing: Starting from $35.00 per month

Suitable for: Popular blogs, business websites, membership websites

Our recommended managed WordPress hosting company: WP Engine

For more details, see our article explaining when do you really need a managed WordPress hosting.

4. Dedicated Hosting

A dedicated server hosting gives you the entire server dedicated to your own website. You get all the resources of the server, advanced tools for server management, ability to install your own software and even your own operating system.

You’ll be managing your own server which may require some technical skills. It is an advanced option for larger websites that need high-performance to tackle higher traffic volume.

Pricing: Starting from $79.99 month

Suitable for: Enterprise level businesses, hugely popular websites, eCommerce stores

Our recommended Dedicated hosting company: SiteGround or HostGator

Note: We use HostGator custom dedicated servers to host the WPBeginner website.

Choosing The Right Plan to Host a Website

As you can see, all different hosting plans come with different server configuration and pricing. You’ll need to choose a plan that suits your needs and budget.

At WPBeginner, we recommend users to start with a low cost shared hosting plan and then upgrade as their business grows. This allows you to save money and only pay for the services that you actually need.

Shared hosting plans start from $7.99 per month (paid annually) and $14.99 for a domain name.

Now if you are just starting out, then this is still a significant investment.

Luckily, Bluehost has agreed to offer our users a discount on hosting and free domain name. Basically, you’ll be able to get started for $2.75 per month.

They are one of the largest hosting companies in the world and an officially recommended WordPress hosting provider.

→ Click Here to Claim This Exclusive Bluehost Offer ←

For other shared hosting plans, see our comparison of the best hosting companies.

Once you have signed up for a hosting account, the next step is to create your website. For detailed instructions, see our guide on how to make a website.

How Much It Cost to Host a Website

So far we have covered the costs of web hosting companies. However, your costs of hosting a website may vary depending on several factors.

The first thing is the hosting plan you choose. We recommend starting with smaller shared hosting plans and then upgrade as your business and website grows.

Once you start building a website, you may need to spend money on other things as well such as website templates, software extensions, and other services.

Your goal would be to only buy what you actually need and use free tools whenever you can.

We have an excellent guide on the cost of building a WordPress website and how to avoid overspending.

How to Host a Website on Your Computer

We are often asked by our users if they can host a website on their own computer.

Yes, you can.

However, the only reason you should host a website on your computer is when you want to test a site locally before putting it on the internet.

A lot of beginners find it useful to learn web development, WordPress, and coding by installing a local server on their computer.

See our tutorials on how to set up local server on Windows and Mac.

This will allow you to install a local server without making it publicly available.

We don’t recommend using a local server to host a website and make it publicly available. However, we will show you how to do that for users who are feeling adventurous.

Putting Your Local Host Server Online

Once you host a website on your local server, it will only be available to you. You’ll need to change its settings to put your website on the internet.

First, locate your web server software’s configuration file called httpd.conf.

If you are using WAMP on Windows, then you’ll find it under C:wampbinapacheapache[version#]conf] folder.

MAMP users on Mac will find it inside /Applications/MAMP/conf/apache/ folder.

You can open this file using a plain text editor like Notepad or TextEdit. After that, you need to find the line that begins with

Listen 80

You need to replace it with your IP address and port number. You can find your IP address by simply Googling ‘what is my ip address’ it will show you a numeric string separated by dots. Here’s an example of what that code should look like with your IP:

Listen 64.233.160.1:80

Next, you need to find the following line:

ServerName localhost:80

Go ahead and change it by replacing localhost:80 with your IP address.

ServerName 64.233.160.1

Next, you need to find the following line for WAMP:

<Directory "c:/wamp/www/">

If you are using MAMP, then look for the following line:

<Directory "/Applications/MAMP/htdocs">

Below this line you’ll see the access permissions, which you need to replace with the following:

Order Allow,Deny
Allow from all

You can now save your configuration file and restart your local server with the new permissions.

Now anyone can use your IP address to access your website instead of localhost. This is not an ideal situation as it would be hard for your users to remember the IP address.

That’s where domain names come in handy.

Pointing Your Domain Name to a Locally Hosted Website

Pointing your domain name to a website that you are hosting on your own computer will allow users to access it as they would do with any other site.

First, you need to edit your domain name’s DNS settings. We’re using Domain.com in our screenshots below:

Editing DNS settings for your domain name

After that, you need to edit the A name record with @ sign as the Name. If you don’t have one, then click on Add new record button to proceed.

Adding A record for your domain

In the value field, you need to enter your computer’s IP address and click on the Update DNS button to save your changes.

If the computer with your local server is connected to the internet directly, then you are all done.

However, if your computer is connected to the internet via router then you need to forward ports. To do that, you need to login to your router’s admin interface by entering the router’s IP address in your browser address bar.

Depending on the manufacturer, your router interface may look slightly different. You will need to find the option labeled port forwarding, virtual server, or NAT.

Port forwarding

Next, you need to forward web or HTTP traffic to port 80. In the IP address field, you need to enter the IP address of your computer on the local network. This IP address is the internal address that identifies your computer on the local network.

After that, you need to apply the changes and restart your router.

Disadvantages of Hosting a Website by Yourself

Hosting your website on a local computer is a bad idea. This is why even the tech giants with enough resources, skills, and know-how prefer to go with a hosting service provider.

Following are just a few disadvantages of hosting a website on local computer.

  • In order to run a web server, you need to put it on a computer connected to a high-speed internet connection 24 hours a day.
  • You also need to install updates for the web server software, keep backups, plan on a backup server, and more.
  • The computer hosting your website will also be open to hacking attempts, malware injection, and DDOS attacks. This could also affect the security of all other computers on your network.
  • You will need to purchase a static IP address from your internet service provider, which will cost you extra.

Doing all this will require a lot of time, effort, and technical skills. This is why it is a bad idea to host your website on a local computer by yourself.

FAQs about Website Hosting

Having helped thousands of beginners start their own websites, we have heard every possible question. Following are some of the most commonly asked questions from people who want to host a website.

1. Why do I need a hosting provider to host a website?

Hosting service providers specialize in maintaining a platform to serve websites. They have engineers and system administrators in their staff that monitor their servers 24/7.

This allows you to focus on building your website and growing your business instead of managing server software.

2. Can I buy a domain name and hosting from two companies?

Yes, you can. However, buying them from the same company allows you to manage both of them under the same dashboard. Also some providers like Bluehost even offer a free domain as an incentive to use their service.

3. Can I buy a domain name and host my website later?

Yes, you can buy a domain name alone. However, it will not be pointing to your website until you choose a hosting provider.

We recommend Domain.com for registering a domain name. They offer beginner friendly domain management tools, which will make it easy to connect your domain to any hosting provider later.

4. Can I host my website on my local computer and later move it to a hosting provider?

Yes, you can do that. However, if you are serious about making a website, then it is better to start with a hosting provider.

5. Can I host a website with one provider and then change it to another provider?

Yes, you can move your website to any other hosting company at any time. See our article on how to move your website to a new host for detailed instructions.

6. Where do I host my website?

There are so many hosting companies out there, that it becomes difficult for beginners to make the right choice.

Over the years, we have worked with all the top hosting companies on the market. This has given us insights into what makes a good hosting platform.

For starter websites, we recommend Bluehost. They automatically install WordPress, and they offer a beginner friendly dashboard, built-in caching, security, and more. On top of it, they are offering WPBeginner readers discount on hosting + free domain name.

For more recommendations, see our complete list of the best hosting companies with their pros and cons.

There are few companies offering free web hosting, but we recommend that you be very careful about those.

We hope this article helped you learn how to host your website. You may also want to see our guide on how to get a free business email address for your website.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.



Source link

How to Move WordPress to a New Host or Server With No Downtime


Are you planning to move your WordPress site to a new hosting company or a different server? The biggest risk when switching web hosting or migrating a website to a new server is data loss and downtime.

Both of these can make your website temporarily inaccessible to users and search engines which can result in loss of sales and search engine rankings.

In this step by step tutorial, we will show you how to safely migrate your WordPress site to a new host without any downtime.

We’ll also answer the most frequently asked questions about moving a WordPress site to new hosting provider, so you can avoid making some common mistakes.

Migrating WordPress from one host to another

Important: Before we start, we want you to know that a lot of WordPress hosting companies offer a free migration service. It might not be listed on their website, so all you have to do is ask. Usually it’s free, but some may charge a small fee.

Having that said, let’s take a look at the steps we’ll cover to move WordPress to a new hosting server (without any downtime).

  1. Choose a new WordPress host
  2. Setup the Duplicator Plugin for Easy Migration
  3. Import your WordPress site to the new host
  4. Change the Hosts file to prevent downtime
  5. Create a MySQL database on your new host
  6. Run Duplicator website migration script
  7. Updating your domain name server
  8. FAQs about moving WordPress to new host

Ready? Let’s get started.

Step 1: Choose Your New WordPress Host

If you are stuck with a slow web host even after optimizing WordPress speed and performance, then it’s time to move your WordPress site to a new host that can handle your growing traffic.

When looking for a new WordPress hosting provider, it’s important to choose carefully, so you don’t have to move again any time soon.

Here’s who we recommend:

  • For reliable shared hosting, we recommend going with Bluehost. They’re officially recommended by WordPress.org. Using our Bluehost coupon, WPBeginner users get 60% off and a free domain name.
  • If you’re looking for cloud hosting or location-specific providers, then we recommend you check out Siteground. They have data centers across 3 different continents.
  • If you’re looking for managed WordPress hosting, then we recommend you check out WP Engine. They are the best and most well-known provider in the industry.

After buying your new hosting, do NOT install WordPress. We’ll do that in a later step.

For now, your new web hosting account should be completely empty with no files or folders in your main directory.

Step 2: Setup Duplicator for Easy Migration

The first thing you need to do is install and activate the free Duplicator plugin on the website that you want to move. For more details, see our step by step guide on how to install a WordPress plugin.

Duplicator is a free plugin that we highly recommend. You can also use it to move your website to a new domain name without losing SEO.

However, in this article, we will walk you through how to use it to migrate your WordPress site from one host to another with zero downtime.

Once you have installed and activated Duplicator, go to the Duplicator » Packages page in your WordPress admin area.

Next, you need to click the ‘Create New’ button in the top right corner.

Creating a new package in Duplicator

After that, click the Next button and follow the steps to create your package.

Duplicator create a package wizard

Make sure that your scan results check out (everything should say “Good”), and then click the Build button.

Build package

The process may take several minutes to complete, so leave the tab open as the plugin does its job.

Once the process is complete, you’ll see download options for Installer and the Archive package. You need to click on the ‘One click download’ link to download both files.

Download package files

The archive file is a copy of your complete website, and the installer file will automate the installation process for you.

Step 3: Import Your WordPress Site to the New Host

Now that you have downloaded both the archive and installer files, the next step is to upload them to your new web host.

You can do this by connecting to your new web host using FTP.

If you’ve never done this before, check out our beginner’s guide to uploading files via FTP to WordPress.

Normally, you would enter your website’s domain name as host when connecting your FTP client.

However, since your domain name is still pointing to your old host, you’ll need to connect by entering your server’s IP address or server hostname. You can find this information from your new hosting account’s cPanel dashboard.

Finding server IP or Hostname in cPanel dashboard

If you are unable to find this information, then you can ask for support at your new web hosting company, and they will help you out.

Using the FTP client, you need to upload both installer.php file and your archive .zip file to the root directory of your website.

This is usually /username/public_html/ folder.

Again, if you are not sure, then ask your web hosting company.

Make sure that your root directory is completely empty. Some web hosting companies automatically install WordPress when you sign up.

If you have WordPress installed in your root directory, then you need to delete WordPress first.

Once done, you need to upload both the archive zip file and installer.php file to your site’s root directory.

Step 4: Change The Hosts File to Prevent Downtime

Once you’ve uploaded both files to your new host, you need to access the installer.php file in a browser.

Normally, this file can be accessed using a URL like this:

http://www.example.com/installer.php

However, this URL will take you to your old web host, and you will get a 404 error. This is because your domain name is still pointing to your old web host.

Normally, other tutorials might tell you to change your domain nameservers and point it to your new hosting company, but that’s wrong.

If you do this now, then your visitors will see a broken website as you migrate it.

We’ll show you how you can access your new site temporarily on your computer, without affecting your old site.

This is done with a hosts file on your computer.

The hosts file can be used to map domain names to specific IP addresses. In other words, it lets you trick your computer in thinking that the website is moved even though it’s not.

Let’s take a look at how to add an entry for your domain name in the hosts file, so that it points to your new hosting company.

Making these changes will allow you to access the files on your new host using your own domain name, while the rest of the world will still be accessing your site from the old host. This ensures 100% uptime.

The first thing you need to do is find the IP address of your new web hosting server. To find this, you need to log into your cPanel dashboard and click on expand stats link in the left-hand sidebar. Your server’s address will be listed as Shared IP Address.

On some web hosting companies, you will find this information under ‘Account Information’ heading.

Find shared IP address

In the next step, Windows users need to go to Programs » All Programs » Accessories, right-click on Notepad and select Run as Administrator.

A Windows UAC prompt will appear, and you need to click on Yes to launch Notepad with administrator privileges.

On the Notepad screen, go to File » Open and then navigate to the C:WindowsSystem32driversetc folder. From this folder, select hosts file and open it.

If you’re using Mac, then you need to open the Terminal app and enter this command to edit hosts file:

sudo nano /private/etc/hosts

For both Windows and Mac users, at the bottom of the hosts file, you need to enter the IP address you copied and then enter your domain name. Like this:

192.168.1.22 www.example.com

Make sure that you replace the IP address with the one you copied from cPanel, and example.com with your own domain name.

Once you’re done, save your changes.

You can now access your files on the new host using your domain name on your computer.

Important: Don’t forget to undo the changes you made to hosts file after you have finished the migration (step 6).

Step 5: Creating MySQL Database on Your New Host

Before we run the installer on the new host, you will need to create a MySQL database on your new hosting account. If you have already created a MySQL database, then you can jump to the next step.

Creating a Database in cPanel

Go to your new hosting account’s cPanel dashboard, scroll down to Databases section and click on MySQL databases icon.

MySQL databases in cPanel

You will see a field to create a new database. Enter a name for your database, and click “Create Database” button.

Creating new database

After creating the MySQL database, you need to scroll down to the MySQL Users section.

Next, provide a username and password for your new user and click on the ‘Create a user’ button.

Create a MySQL user

After that, you need to add this user to your database. This will give the username you just created, all the permissions to work on that database.

You can do this by scrolling down to ‘Add User to a Database’ section. Simply select the database user you created from the dropdown menu next to user, then select database, and click on the add button.

Add user to database

Your database is now ready to be used with WordPress. Be sure to make note of the database name, username, and password. You’ll need that information in the next step.

Step 6: Begin the Duplicator Migration Process

Now we’re ready to run the installer. Navigate to the following address in your browser window, replacing example.com with your domain name:

http://www.example.com/installer.php

Duplicator installer initialized

The installer will run a few tests and will show you ‘Pass’ next to archive and validation tests.

You need to check the terms & conditions checkbox and continue by clicking on the Next button.

Now, you will be asked to enter your MySQL host, database name, username, and password.

Your host will likely be localhost. After that, you will enter the details of the database you created in the previous step.

Connect to the database

You can click on the ‘Test Database’ button to make sure you entered the correct information.

If Duplicator is able to connect, then you will see a string starting with Pass. Otherwise, you will see the database connection error details.

Click on the next button to continue.

Duplicator will now import your WordPress database from the archive zip into your new database.

Next, it will ask you to update site URL or Path. Since you are not changing domain names, you DON’T need to change anything here.

Simply click on the next button to continue.

Duplicator will run the final steps and will show you the login button.

Duplicator website migration finished

You can now login to your WordPress site on the new host to make sure that everything is working as expected.

Step 7: Update Your Domain Name Servers (DNS)

At this point, you’ve created a complete copy of your WordPress database and files on your new hosting server, but your domain still points to your old web hosting account.

To update your domain, you need to switch your DNS nameservers. This ensures that your users are taken to the new location of your website when they type your domain into their browsers.

If you registered your domain with your hosting provider, then it’s best to transfer the domain to a new host. If you used a domain registrar like Domain.com, GoDaddy, etc, then you need to update your nameservers.

You will need the DNS nameserver information from your new web host. This is usually a couple of URLs that look like this:

ns1.hostname.com
ns2.hostname.com

For the sake of this guide, we will be showing you how to change DNS nameservers with GoDaddy.

Depending on your domain registrar or web host, the screenshots may look different. However, the basic concept is the same.

You need to look for domain management area and then look for nameservers. If you need assistance with updating your nameservers, then you can ask your web hosting company.

For GoDaddy, you need to login to your GoDaddy account and then click on Domains.

After that, you need to click on the Manage button next to the domain name you want to change.

Manage domain

Under the ‘Additional Settings’ section, you will need to click on ‘Manage DNS’ to continue.

Manage DNS

Next, you need to scroll down to the Nameservers section and click on the change button.

Change nameservers

First, you will need to switch the nameserver type dropdown from ‘Default’ to ‘Custom’. After that, you can fill in the your new hosting provider’s information under Nameservers.

Updating DNS nameservers

Don’t forget to click on the save button to store your changes.

You have successfully changed the nameservers on your domain. DNS changes can take 4 – 48 hours to propagate for all users.

Since you have the same content on your old host and the new host, your users wouldn’t see any difference. Your WordPress migration will be seamless with absolutely no downtime.

To be on the safe side, we recommend that you wait to cancel your old hosting account until 7 days after your migration.

Frequently Asked Questions

Here are a few questions many of our users ask while moving WordPress from one host to another.

1. Can I signup for the new hosting account without registering a domain name?

Yes, you can absolutely signup for a hosting account without registering a domain name.

Domain name and hosting are two different services, and you don’t necessarily need to register a domain name when signing up for new host. For more details see our guide on the difference between domain name and web hosting.

Some hosting providers will ask you to select a domain name as the first step when purchasing hosting. They will also allow you to enter a domain name if you already got one.

2. Do I need to transfer my domain name to the new host?

No, you don’t need to transfer your domain name to the new host. However, transferring your domain name to your new hosting will make it easier to renew and manage under the same dashboard as your new hosting account.

For more on this topic, see our ultimate guide on domain names and how do they work.

3. How do I fix error establishing database connection error in Duplicator?

If you are seeing an error connecting to the database or database connection error in Duplicator, then the most likely reason for this is that you entered incorrect information for your database connection.

Make sure that your database name, MySQL username, and password are correct. Some web hosting companies do not use localhost as the host for their MySQL servers. If this is the case, then you will need to ask your web host’s support staff to provide you with the correct information.

4. How do I check if my website is loading from the new host?

There are several online tools that allow you to see who is hosting a website. After you have transferred your website to the new host, you can use any of these tools, and they will show you the name of the web hosting company hosting your website.

If it hasn’t been long since you migrated your website and made changes to your domain name server (DNS), then chances are that your site may still load from your old host. Domain name changes can take up to 48 hours to fully propagate.

5. Do I need to delete any files or data from old host?

When switching hosting companies, we recommend that you keep your old website for at least a week. After that, you can delete files from your old web host. If you are canceling your account, then your web hosting provider will delete all your data according to their policy.

6. How long should I keep my account active on the old host?

Once you have migrated your website to the new host, and if you don’t have any other websites hosted with your old web host, then you can cancel your old web hosting account.

However, in some cases, you may have already paid them for yearly hosting. You should check their refund policy to see if you are eligible for any refund upon cancellation.

7. How do I move a WordPress site with SSL/HTTPs?

You will need to install SSL certificate on your new hosting provider. After that, you can follow the same steps mentioned above. Just make sure that you use HTTPs in the URLs, like https://example.com

8. Bonus: Free Site Migration by Your New Host

If you’re looking to switch your web hosting, but the steps above sound too complicated, then you can choose the following providers, and they will migrate your website for you.

SiteGround, InMotion Hosting, and WP Engine offer free website migration for WPBeginner users.

We hope that this step by step guide helped you move WordPress to your new host with no downtime whatsoever. If you come across any issues with your WordPress migration, then check out our guide on the most common WordPress errors and how to fix them.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Move WordPress to a New Host or Server With No Downtime appeared first on WPBeginner.



Source link