{"id":14046,"date":"2025-04-24T06:09:04","date_gmt":"2025-04-24T06:09:04","guid":{"rendered":"https:\/\/www.bodhost.com\/kb\/?p=14046"},"modified":"2026-02-26T14:02:08","modified_gmt":"2026-02-26T14:02:08","slug":"how-to-set-up-website-hosting-on-a-vps","status":"publish","type":"post","link":"https:\/\/www.bodhost.com\/kb\/how-to-set-up-website-hosting-on-a-vps\/","title":{"rendered":"How to Set Up Website Hosting on a VPS"},"content":{"rendered":"<p>This article explains how to set up website hosting on a VPS. Hosting a website on a VPS gives you full control over your server environment, better performance, and scalability.<\/p>\n<p>Follow these steps to get started:<\/p>\n<p>Prerequisites:<\/p>\n<ul>\n<li>A VPS with a public IP address (Ubuntu\/CentOS\/other Linux distributions)<\/li>\n<li>Root or sudo access to the VPS<\/li>\n<li>A registered domain name (optional, but suggested)<\/li>\n<li>Basic knowledge of using the terminal<\/li>\n<\/ul>\n<p><strong>Step 1: Update Your Server<\/strong><br \/>\nLog in to your VPS via <a href=\"https:\/\/www.bodhost.com\/kb\/what-is-ssh-secure-shell\/\" target=\"_blank\" rel=\"noopener\">SSH<\/a> and update the package list:<\/p>\n<ol>\n<li>For Ubuntu\/Debian:\n<pre>sudo apt update &amp;&amp; sudo apt upgrade -y<\/pre>\n<\/li>\n<li>For CentOS\/RHEL:\n<pre>sudo yum update -y<\/pre>\n<\/li>\n<\/ol>\n<p><strong>Step 2: Install a Web Server<\/strong><\/p>\n<ol>\n<li>Option A: Apache:\n<pre>sudo apt install apache2 -y\u00a0\u00a0\u00a0\u00a0\u00a0 # Ubuntu\r\nsudo systemctl enable apache2\r\nsudo systemctl start apache2<\/pre>\n<\/li>\n<li>Option B: Nginx\n<pre>sudo apt install nginx -y\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # Ubuntu\r\nsudo systemctl enable nginx\r\nsudo systemctl start nginx<\/pre>\n<\/li>\n<\/ol>\n<p>Access your VPS IP in a browser (e.g., http:\/\/your-server-ip). You should see a default web server page.<\/p>\n<p><strong>Step 3: Upload Your Website Files<\/strong><br \/>\nYou can upload files using:<\/p>\n<ol>\n<li>SFTP (Secure File Transfer Protocol)<\/li>\n<li>scp command:\n<pre>scp -r \/local\/website-folder user@your-vps-ip:\/var\/www\/html<\/pre>\n<p>Replace existing index.html if using the default document root..<\/li>\n<\/ol>\n<p><strong>Step 4: Configure Your Domain (Optional)<\/strong><br \/>\nPoint your domain&#8217;s DNS A record to your VPS IP address.<br \/>\nThen configure a virtual host:<br \/>\n<strong>Apache Example:<\/strong><\/p>\n<pre>sudo nano \/etc\/apache2\/sites-available\/yourdomain.com.conf<\/pre>\n<p><strong>Add:<\/strong><\/p>\n<pre>&lt;VirtualHost *:80&gt;\r\nServerName yourdomain.com\r\nDocumentRoot \/var\/www\/html\r\n&lt;\/VirtualHost&gt;<\/pre>\n<p><strong>Enable the site:<\/strong><\/p>\n<pre>sudo a2ensite yourdomain.com.conf\r\nsudo systemctl reload apache2<\/pre>\n<p><strong>Step 5: (Optional) Secure with SSL<\/strong><br \/>\nInstall Certbot and configure HTTPS:<br \/>\nFor Apache:<\/p>\n<pre>sudo apt install certbot python3-certbot-apache -y\r\nsudo certbot --apache<\/pre>\n<p><strong>For Nginx:<\/strong><\/p>\n<pre>sudo apt install certbot python3-certbot-nginx -y\r\nsudo certbot --nginx<\/pre>\n<p>Your website is now live on your <a href=\"https:\/\/www.bodhost.com\/web-servers\/self-managed-vps-hosting\" target=\"_blank\" rel=\"noopener\">VPS<\/a>. It offers greater control, flexibility, and performance than shared hosting, making it an ideal solution for growing websites and custom setups. We hope you found this guide helpful.<\/p>\n<p><em>Find more information about: <a href=\"https:\/\/www.bodhost.com\/kb\/how-to-transfer-backup-from-cpanel-to-vps\/\" target=\"_blank\" rel=\"noopener\">How to Transfer Backup from cPanel to VPS<\/a><\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article explains how to set up website hosting on a VPS. Hosting a website on a VPS gives you full control over your server environment, better performance, and scalability.&hellip;<\/p>\n<p><a href=\"https:\/\/www.bodhost.com\/kb\/how-to-set-up-website-hosting-on-a-vps\/\" class=\"more-link\">Read More<\/a><\/p>\n","protected":false},"author":21,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[1612],"class_list":["post-14046","post","type-post","status-publish","format-standard","hentry","category-vps-hosting","tag-set-up-website-hosting-on-a-vps"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Set Up Website Hosting on a VPS | bodHOST<\/title>\n<meta name=\"description\" content=\"This article covers how to set up website hosting on a VPS, offering full control, improved performance, &amp; scalability for your web projects.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.bodhost.com\/kb\/how-to-set-up-website-hosting-on-a-vps\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Set Up Website Hosting on a VPS | bodHOST\" \/>\n<meta property=\"og:description\" content=\"This article covers how to set up website hosting on a VPS, offering full control, improved performance, &amp; scalability for your web projects.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.bodhost.com\/kb\/how-to-set-up-website-hosting-on-a-vps\/\" \/>\n<meta property=\"og:site_name\" content=\"Knowledge Base - bodHOST\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-24T06:09:04+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-26T14:02:08+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2025\/04\/How-to-Set-Up-Website-Hosting-on-a-VPS-2.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Serena\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2025\/04\/How-to-Set-Up-Website-Hosting-on-a-VPS-2.png\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Serena\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-set-up-website-hosting-on-a-vps\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-set-up-website-hosting-on-a-vps\\\/\"},\"author\":{\"name\":\"Serena\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/person\\\/ffd3f118493c99471ae5bd4790a55830\"},\"headline\":\"How to Set Up Website Hosting on a VPS\",\"datePublished\":\"2025-04-24T06:09:04+00:00\",\"dateModified\":\"2026-02-26T14:02:08+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-set-up-website-hosting-on-a-vps\\\/\"},\"wordCount\":247,\"publisher\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#organization\"},\"keywords\":[\"Set Up Website Hosting on a VPS\"],\"articleSection\":[\"vps hosting\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-set-up-website-hosting-on-a-vps\\\/\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-set-up-website-hosting-on-a-vps\\\/\",\"name\":\"How to Set Up Website Hosting on a VPS | bodHOST\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#website\"},\"datePublished\":\"2025-04-24T06:09:04+00:00\",\"dateModified\":\"2026-02-26T14:02:08+00:00\",\"description\":\"This article covers how to set up website hosting on a VPS, offering full control, improved performance, & scalability for your web projects.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-set-up-website-hosting-on-a-vps\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-set-up-website-hosting-on-a-vps\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-set-up-website-hosting-on-a-vps\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"vps hosting\",\"item\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/category\\\/vps-hosting\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Set Up Website Hosting on a VPS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#website\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/\",\"name\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#organization\"},\"alternateName\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#organization\",\"name\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/Profile-Pic.png\",\"contentUrl\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/Profile-Pic.png\",\"width\":240,\"height\":240,\"caption\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\"},\"image\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/person\\\/ffd3f118493c99471ae5bd4790a55830\",\"name\":\"Serena\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g\",\"caption\":\"Serena\"},\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/author\\\/seema\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Set Up Website Hosting on a VPS | bodHOST","description":"This article covers how to set up website hosting on a VPS, offering full control, improved performance, & scalability for your web projects.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.bodhost.com\/kb\/how-to-set-up-website-hosting-on-a-vps\/","og_locale":"en_US","og_type":"article","og_title":"How to Set Up Website Hosting on a VPS | bodHOST","og_description":"This article covers how to set up website hosting on a VPS, offering full control, improved performance, & scalability for your web projects.","og_url":"https:\/\/www.bodhost.com\/kb\/how-to-set-up-website-hosting-on-a-vps\/","og_site_name":"Knowledge Base - bodHOST","article_published_time":"2025-04-24T06:09:04+00:00","article_modified_time":"2026-02-26T14:02:08+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2025\/04\/How-to-Set-Up-Website-Hosting-on-a-VPS-2.png","type":"image\/png"}],"author":"Serena","twitter_card":"summary_large_image","twitter_image":"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2025\/04\/How-to-Set-Up-Website-Hosting-on-a-VPS-2.png","twitter_misc":{"Written by":"Serena","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.bodhost.com\/kb\/how-to-set-up-website-hosting-on-a-vps\/#article","isPartOf":{"@id":"https:\/\/www.bodhost.com\/kb\/how-to-set-up-website-hosting-on-a-vps\/"},"author":{"name":"Serena","@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/person\/ffd3f118493c99471ae5bd4790a55830"},"headline":"How to Set Up Website Hosting on a VPS","datePublished":"2025-04-24T06:09:04+00:00","dateModified":"2026-02-26T14:02:08+00:00","mainEntityOfPage":{"@id":"https:\/\/www.bodhost.com\/kb\/how-to-set-up-website-hosting-on-a-vps\/"},"wordCount":247,"publisher":{"@id":"https:\/\/www.bodhost.com\/kb\/#organization"},"keywords":["Set Up Website Hosting on a VPS"],"articleSection":["vps hosting"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.bodhost.com\/kb\/how-to-set-up-website-hosting-on-a-vps\/","url":"https:\/\/www.bodhost.com\/kb\/how-to-set-up-website-hosting-on-a-vps\/","name":"How to Set Up Website Hosting on a VPS | bodHOST","isPartOf":{"@id":"https:\/\/www.bodhost.com\/kb\/#website"},"datePublished":"2025-04-24T06:09:04+00:00","dateModified":"2026-02-26T14:02:08+00:00","description":"This article covers how to set up website hosting on a VPS, offering full control, improved performance, & scalability for your web projects.","breadcrumb":{"@id":"https:\/\/www.bodhost.com\/kb\/how-to-set-up-website-hosting-on-a-vps\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.bodhost.com\/kb\/how-to-set-up-website-hosting-on-a-vps\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.bodhost.com\/kb\/how-to-set-up-website-hosting-on-a-vps\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"vps hosting","item":"https:\/\/www.bodhost.com\/kb\/category\/vps-hosting\/"},{"@type":"ListItem","position":2,"name":"How to Set Up Website Hosting on a VPS"}]},{"@type":"WebSite","@id":"https:\/\/www.bodhost.com\/kb\/#website","url":"https:\/\/www.bodhost.com\/kb\/","name":"Web Hosting Knowledge Base | bodHOST Hosting FAQ","description":"","publisher":{"@id":"https:\/\/www.bodhost.com\/kb\/#organization"},"alternateName":"Web Hosting Knowledge Base | bodHOST Hosting FAQ","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.bodhost.com\/kb\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.bodhost.com\/kb\/#organization","name":"Web Hosting Knowledge Base | bodHOST Hosting FAQ","url":"https:\/\/www.bodhost.com\/kb\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/logo\/image\/","url":"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2025\/10\/Profile-Pic.png","contentUrl":"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2025\/10\/Profile-Pic.png","width":240,"height":240,"caption":"Web Hosting Knowledge Base | bodHOST Hosting FAQ"},"image":{"@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/person\/ffd3f118493c99471ae5bd4790a55830","name":"Serena","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g","caption":"Serena"},"url":"https:\/\/www.bodhost.com\/kb\/author\/seema\/"}]}},"_links":{"self":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts\/14046","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/users\/21"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/comments?post=14046"}],"version-history":[{"count":4,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts\/14046\/revisions"}],"predecessor-version":[{"id":14052,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts\/14046\/revisions\/14052"}],"wp:attachment":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/media?parent=14046"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/categories?post=14046"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/tags?post=14046"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}