How to host a website on VPS

Sites need web hosting to store data that make them accessible to you and those who land on your website. This can be done through a variety of hosting methods, but the one we’re going to focus on here is hosting a website on a virtual private server, or a VPS. It’s one of the most popular hosting types out there, so let’s dive into the reasons why.

While it may seem daunting, we’ll cover how to host a website on Windows VPS and show you just how easy it is to do.

What is VPS hosting?

If you’re excited to get your website up and running but you’re not sure which server to host it in, a VPS should be your first port of call. But what exactly is a VPS, and how does it work in relation to web hosting?

A VPS offers users their own virtual server space with dedicated resources that aren’t shared with anyone else. Essentially, this means each user has their own dedicated resources, such as CPU, RAM, and SSD space. It’s particularly useful if you run lots of websites, such as sites that need to accommodate high traffic volume or specific applications that need a lot of resources to run smoothly. 

With VPS hosting, you get your own server space with the power and performance of a dedicated server, at a fraction of the cost.

Can you use a VPS for web hosting?

Yes. One of the best things about a VPS is that it provides dedicated resources to host a website on a virtual server. Many businesses choose to do this due to the flexibility it offers over things like SSD, RAM, CPU and other components. Plus, you can run multiple websites on the same VPS – with Fasthosts, our VPS include up to 99 IPv6 and 16 IPv4 addresses.

VPS web hosting vs shared hosting

You might be thinking of choosing shared hosting to host your website instead of a VPS, but each has its pros and cons that need to be considered.

When it comes to shared hosting vs VPS hosting, shared hosting is great for smaller businesses looking for a cheaper alternative where resources are literally shared across all websites you manage. However, with a VPS, you have greater control and can allocate more resources to selected websites to improve things like load speed and increased performance.

Plus, shared hosting means you have to share resources across your server, meaning one of your websites could incur downtime or slow loading speeds due to another site consuming more of the available resource.

Should I move from shared hosting to VPS?

Are you currently hosting your website on a shared hosting provider? While there’s nothing inherently wrong with this, shared hosting can become less viable over time, especially if your website grows. 

A VPS can house thousands of visitors due to the immense resources it provides for both users and admins. So if you’ve noticed that your site experiences more downtime, is slower due to higher traffic, or your bounce rate is much higher as a result of this, then it may be time to switch to a VPS. 

Plus, if you plan on adding a shopping element to your site, then a VPS provides far more security than shared hosting. This is particularly important for keeping sensitive information safe, as well as building trust with your customers.

Why host a website on a VPS?

The pros of VPS for web hosting are clear, but if you’re still not sure, here’s why you should host a website on a VPS.

1. It’s cheaper

Hosting your website on a VPS is a cheaper alternative than hosting it on a dedicated server, because you don’t have a physical server, but rather, a splice of a virtual one. Learn more about the cost of different web hosting options.

2. Resources are scalable

With a VPS, you can select how much CPU, RAM and other resources you need for specific sites. This means you won’t have to put up with slow speeds as a result of other websites needing the same resources – much like with shared hosting.

3. Enjoy better security

Hosting your website on a VPS provides further security measures, thanks to having full root access to make your own security amendments, integrate Plesk Obsidian, install SSL certificates, and much more.

4. Customise your server

As VPS allows full root access and offers possibilities to tailor to your heart’s content, you can customise your server to include apps on your VPS, software, additional security features and specific plugins for your websites to run as they should. Some other features you can opt in to for your VPS web hosting include:

  • Site or data backup
  • SEO
  • Technical support
  • Firewall set up
  • Email
  • Additional security features
  • Access to applications and other web tools

5. Uptime

Uptime is incredibly important when hosting your website on a server. Higher uptime means happy visitors who can browse your website without dealing with errors or slow speeds. A VPS almost always guarantees high uptime, which is why it’s a popular choice for hosting a website.

How to host a website on a VPS

Now that we know how hosting your website on a VPS could benefit your business, here’s a step-by-step approach to getting up and running.

1. Choose the right VPS

Before you set up a VPS for web hosting, choosing the right server is the foundation for successfully hosting your website. At Fasthosts, VPS and web hosting is our speciality.

Here are some of the features you can enjoy with a VPS from Fasthosts:

  • Top-of-the-line hardware, up to 8 vCPU cores, 24GB RAM, and 240GB SSD storage
  • Root/Administrator access for maximum control over your server
  • 99.999% uptime (check Fasthosts uptime for more information)
  • Hosted in ISO 27001-certified data centres

2. Connect to your VPS

Assuming you’re on a Windows VPS, you can connect to it easily via the Remote Desktop tool. This will already be installed on your Windows OS, and you’ll just need administrator access.

  1. Click the start button on your computer and search for “Remote Desktop Connection”
  2. Select the Remote Desktop application when it opens
  3. Enter the VPS IP address you were provided with when setting up your VPS with Fasthosts into the pop-up box
  4. Input your username and password (also provided after your server was provisioned)
  5. Click connect, and now you’re an Admin to your Windows VPS

We also cover connecting to a VPS on Linux in our how to connect to a VPS guide.

3. Setting up website hosting

Once you’ve logged into your server and you have bought a domain name, you’ll need to ensure that your DNS A records point to your new VPS IP address. Put simply, your DNS links a domain to the IP address of your server – much like linking a phone number to a person’s name. Read our ‘What is a DNS’ guide for more information surrounding how it all works.

4. Install and configure your web server 

Download Apache for Windows by visiting the official Apache HTTP Server site and download the Windows version (or through ApacheHaus)

Installation

  • Extract the downloaded Apache archive to a directory (e.g., C:\Apache24).
  • Open Command Prompt as Administrator.
  • Navigate to the bin directory inside the Apache folder:
    • cd C:\Apache24\bin
  • Install Apache as a service:
    • httpd.exe -k install
  • Load up Apache:
    • httpd.exe -k start

If you want to check you’ve installed Apache correctly, just visit”http://localhost” or your VPS's IP address. Here, you should see the Apache default page.

5. Install your preferred CMS / or migrate existing site

Let’s say you want to use WordPress – here’s how you would do so (need to transfer web hosting? Read our how to transfer web hosting guide first before attempting this step):

  1. Download and install MySQL for Windows (make a note of the root password, as WordPress requires a database to function) 
  2. Install PHP for Windows
    • Download PHP for Windows
    • Extract the PHP archive into a directory (e.g., C:\php).
    • Add the PHP directory to the System Path
  3. Download WordPress
    • Go to the official WordPress site and download the latest version.
      • Extract the WordPress archive to your Apache document root

6. Set up your website on WordPress (or other CMS)

You’ll need to create a new database for WordPress via MySQL. From here, you should input your VPS IP address in your chosen web browser. Follow the WordPress installation wizard, inputting your database details when prompted (this is where your root password will come in handy)

7. Test your website

Take this time to set up and test your website to ensure it works. Here’s how you can do so in your web browser

  • Enter your VPS's IP address in the browser's address bar. It should look something like: http://192.168.1.1, where 192.168.1.1 should be replaced with your VPS's IP address

8. Point your domain name (Via DNS) to your VPS to make it live

When you use Fasthosts, you’ll need to change the nameservers for your domain – this will affect all of your domain’s DNS records, so be sure to get this step right.

  • Simply add an “A” record within your DNS settings. These changes can act fairly quickly, but if they don’t – please wait up to 48 hours.
    • You can verify the changes are made when you visit your domain name web address in a browser
  • Finally, you’ll need to configure WordPress to your domain name. Go to Settings > General
    • Ensure both the WordPress Address (URL) and Site Address (URL) fields are set to your domain (e.g., http://domainame.com or https://domainname.com).

How many websites can I host on a VPS?

A VPS can host many websites. In fact, you can host as many as you want! However, you’ll have to work around RAM, CPU and SSD limits. Scaling your VPS to increase resources is easy with us, meaning you can create more websites if they’re needed.

What else can I host on a VPS?

Want to know what to do with a VPS? If you’ve successfully hosted your website on a VPS but want to know what else you can do with it, here are some other things you can host:

  • Gaming servers
  • VPN
  • VoIP
  • Dev testing
  • Apps

Just keep in mind that your VPS will have a set level of resources, but these can be scaled up or down depending on your needs. If you intend to use the same VPS to host other apps and services such as those listed above, you’ll need to factor in how many resources you have to run all of these elements. The last thing you want is your site timing out or running slow, which can impact both SEO and your brand!

Do I need a control panel to host a website on a VPS?

It’s absolutely worth having a control panel when hosting a website on a VPS. One such control panel we use is Plesk on our VPS M and L packages. Plesk Obsidian (the latest version of Plesk) is a control panel used for managing websites and servers on both Windows and Linux-based operating systems.

When you're using Plesk on a VPS, it can help you set things up like the website's name, email, and more – which is great if you aren’t technically savvy, or simply want to streamline getting your business up and running as soon as possible. Plus, Plesk has lots of safety and performance checks to make sure your website runs smoothly, such as  ‘SSL It!’ which helps you manage your websites' SSL certificates, and ensures that all of your websites are secured. It’s worth noting its Restricted Access mode too – which allows you to grant additional users administrative control while preventing the use of potentially risky operations such as the shutting down of servers.

Plesk doesn’t stop there. If you have a WordPress site, Plesk can be used as a simple way to design websites if you're not into coding, and includes a marketplace with loads of add-ons.


Interested in hosting a website on a VPS? Get in touch with our sales team today and they'll help you find the perfect hosting solution for your next project.