How to Host a Website on VPS and When You Should Consider Doing So

Every website needs web hosting to store its files and make them accessible to the public. There are many different types of web hosting available, with shared and Virtual Private Server (VPS) hosting services among the most popular.

Thus, it can be tricky to decide which is the best option for your site. In this article, we will discuss when you should consider buying from a virtual server host. We will also talk about the three essential steps to host a website on VPS:

  1. Pick the right VPS hosting plan.
  2. Learn how to connect to your VPS using Secure Shell (SSH).
  3. Use the command line to manage your VPS.

The Differences Between Shared and VPS Hosting

Shared and VPS hosting have one fundamental similarity – they both use one physical server to host multiple websites. This is the most cost-effective approach, resulting in prices lower than a dedicated hosting or cloud hosting service. However, the similarities end there.

A web server has limited system resources available, such as RAM, CPU power, and disk space. In the shared hosting environment, multiple clients use the resources of a single physical server, which can create bottlenecks and slow down your site in these two situations:

  • When the hosting provider sets up too many websites on the same server space.
  • When a website on the server is getting too much traffic and taking up more resources.

The first situation shouldn’t be an issue if you choose a reputable web hosting provider. As for the second, you cannot really avoid it, especially if it happens to another site.

Pro Tip

Are you looking for a HostGator alternative with more comprehensive VPS plans and features? Read our review to learn more about Hostinger and our vps solutions.

This is where VPS hosting may help. Unlike shared hosting, the web host compartmentalizes the server resources for each VPS hosting client. In other words, these compartments act like individual servers. Feel free to read our beginner-friendly guide to understand what VPS hosting is and how it works.

Another key difference between shared and VPS hosting lies in the level of control.

In a shared hosting environment, the web host configures the server for its clients. Thus, users don’t have access to the web server settings. Instead, they get a user-friendly control panel that provides features like the WordPress auto-installer, a file manager, and backups.

The Dashboard page on hPanel

While these features are helpful for beginners or website owners who don’t want to deal with server maintenance, they fall short compared to the level of control VPS hosting provides.

VPS comes with server root access, so it’s possible to install custom web applications and a preferred operating system, such as Ubuntu or CentOS. Additionally, you might want to consider a VPS manager like Cyberpanel to help with the management of your server.

Shared hosting is slightly cheaper than VPS hosting and more user-friendly as the host configures the servers. However, it offers more limited resources and may compromise the site’s performance.

Thus, this type of web hosting is more suitable for static or small sites that use content management systems (CMS) like WordPress and Joomla.

On the other hand, VPS hosting requires more technical experience as most of the options are self-managed. That said, VPS hosting is the best solution for web applications that require more permissions or a custom server configuration.

When You Should Move From Shared Hosting to VPS

Shared web hosting may become less suitable as the site grows and gets more traffic or requires better security measures, as all of these need more server resources.

However, how soon it’ll need VPS hosting depends on how the website performs and your current shared hosting plan. For example, if you use our Business Shared Hosting, which can handle thousands of visitors per month, it may take time before you experience performance issues.

Since no two providers offer the same experience, it can be hard to know when to upgrade to VPS hosting. Here are some indications you need to consider moving to VPS:

  • The site receives at least 100-200 visits per day.
  • There’s a sustained increase in the site’s bounce rate.
  • The website speed is getting slower, or it is starting to experience downtime.

It’s also worth noting that there are many other factors that can impact your site’s performance in addition to the type of hosting plan you’re using.

That’s why we recommend proactively optimizing your site speed. However, if the website starts getting more traffic and still feels sluggish after you’ve tried different methods to optimize it, it might be time to upgrade to VPS hosting.

Another factor to consider when deciding to move to VPS hosting is your budget. Fortunately, it’s easy enough to find reasonably priced VPS hosting plans.

For example, Hostinger’s web hosting plans start at ₱89.00/month, while VPS hosting plans start at ₱299.00/month.

Ultimately, it’s necessary to consider your website’s needs. Security and complete control over the server are the main benefits of VPS hosting, but those might not be the main priorities, depending on the type of website you run.

However, if you operate an eCommerce site that processes transactions and customer data, the greater security of VPS hosting is essential. Even if you collect this information for email marketing purposes, VPS hosting will help keep the visitors’ data safe.

In addition to that, determine if you will benefit from complete control over the server. Generally, installing custom web applications or configuring server software requires root access.

Without it, you’ll need permission and help from your web hosting provider to complete the installation. Not only will it take more time, but the host might not always support or allow such changes.

Since hosts offer various services and features suitable for different purposes, choosing one can be difficult. To help you make an informed decision, check out our list of the 11 best VPS hosting providers.

Pro Tip

Check out our guide on how to buy a domain name if you need one for your website.

How to Get Started With VPS (In Just 3 Steps)

If you have decided to move your website from shared hosting to VPS, the first step is to select the right VPS hosting plan. Since the process of starting a website using VPS hosting is different from doing this on shared hosting, we’ll guide you through each step.

1. Choose the Right Type of VPS

When you start looking into VPS hosting, you’ll notice that each host offers different options.

To give you an idea of what difference 4 GB of RAM and twice the CPU power can make, here is an overview of the capabilities of Hostinger’s KVM 1 and KVM 2 plans:

  • KVM 1 – with 4 GB of RAM, you can run a simple WordPress or similar CMS site with moderate traffic and excellent performance. However, this amount of RAM won’t be enough to set up multiple applications or a control panel.
  • KVM 2 with 8 GB of RAM, you have enough resources to set up cPanel. It is also possible to run multiple websites on the same virtual server without any issues.

With Kernel-based virtualization (KVM) hypervisor, Hostinger already ensures better performance and stability than container-based Virtual Private Servers. All that’s left to do is to pick the right plan that fits your needs.

Hostinger’s KVM 1 and KVM 2 plans are suitable for running CMS-based websites with moderate traffic and excellent performance.

Meanwhile, KVM 4 and KVM 8 plans are recommended for running and managing multiple application containers like Docker and Kubernetes.

WordPress on VPS

Learn how to optimize your WordPress website with KVM VPS at Hostinger.

2. Learn How to Connect to VPS Using SSH

Managing a VPS is completely different than using shared hosting. Configuring the latter involves using a control panel, such as Hostinger’s hPanel.

On the other hand, VPS hosting usually doesn’t come with control panels, so users get to interact with the server directly. To do that, you need to use the command line, which we’ll go over in a moment.

First, connect to your server using a Secure Shell (SSH) client.

An SSH client is an application that enables you to connect directly to the server. If your computer runs on a Unix-based operating system, you can do this right from the command line without needing a dedicated client. If this is the case, you can skip to the next step.

However, for those using Windows, software such as PuTTY will be necessary. It’s free and easy to download and install on your computer. Once PuTTY is installed, run the client and you’ll see a window like this:

Screenshot of PuTTY configuration.

To connect PuTTY to the server, you’ll need to know its IP address, SSH port, SSH username, and SSH password.

All this information should be available on the web hosting control panel. If you’re using our VPS hosting service, access the server by logging in to your Hostinger account. Find your VPS hosting account and click on it.

The main hPanel VPS page

The SSH details will be available on the server management panel.

The VPS access section on hPanel

If you don’t know the password for the SSH access, scroll down to the Root password section to create a new one.

Enter the details into the PuTTY Configuration and hit the Open button to establish a connection. If the address is correct, a command line window will pop up asking for your login information:

Screenshot of PuTTY SSH client.

Alternatively, use Hostinger browser-based terminal that is located on the VPSOverview page:

The VPS information page on hPanel. The Browser terminal window is highlighted

With a new server, use the root user account and password located within your web hosting VPS panel. Once you successfully log into the server, start running commands to manage it.

3. Use the Command Line to Manage Your VPS

Some people may not like the command line because it doesn’t provide a graphical interface. Every server management task uses text commands, so at the very least you’ll need to learn some of the basic ones.

There are plenty of resources and lists of essential commands to get you through basic server management tasks. Here are some examples:

  • ls – this command shows all the files and folders within the directory you’re viewing.
  • mv – with this command, move files from one folder to another.
  • cd – use this command to navigate between directories.
  • mkdir – this command comes in handy when you need to create a new folder.
  • nano modify files with the Nano editor without leaving the command line.

At this point, you’re ready to start managing the web server. Keep in mind that the account has full privileges and access, which means you may accidentally change things that shouldn’t be altered.

Conclusion

VPS hosting is the perfect option if you want complete control over the server at a price lower than dedicated hosting. It lets you configure the server settings and install your preferred operating system and web applications.

With dedicated server resources, your website’s performance won’t be compromised because of other sites on the same machine.

However, hosting a website on VPS requires more technical expertise compared to shared hosting. You’ll need an SSH client such as PuTTY or the command line to manage the server. We hope this article helps you decide whether you should use VPS hosting. If you have more questions about hosting a website on VPS, feel free to leave a comment below or contact our Customer Success team.

How to Host a Website on VPS FAQs

Is VPS Good for Website?

Yes, a VPS is often a good choice for websites. It offers more resources, control, and flexibility compared to shared hosting, resulting in improved performance and scalability. It is especially suitable for websites with higher traffic volumes or specific resource requirements.

What Are the Benefits of Using a VPS to Host a Website?

Using a VPS to host a website offers several benefits: increased performance, scalability, customization options, dedicated resources, improved security, and root access. It provides a balance between cost-effectiveness and higher control compared to shared hosting, making it suitable for growing websites or those with specific requirements.

Can I Host a WordPress Website on VPS?

Yes, you can host a WordPress website on a VPS. Many VPS hosting providers, such as Hostinger, offer easy installation options for WordPress. With a VPS, you have full control over the server and can optimize it specifically for WordPress, ensuring better performance and customization capabilities.

Author
The author

Leonardus Nugraha

Leo is a Content Specialist and WordPress contributor. Armed with his experience as a WordPress Release Co-Lead and Documentation Team Representative, he loves sharing his knowledge to help people build successful websites. Follow him on LinkedIn.