{"id":107934,"date":"2024-04-25T13:36:49","date_gmt":"2024-04-25T13:36:49","guid":{"rendered":"\/tutorials\/?p=107934"},"modified":"2026-03-10T10:05:14","modified_gmt":"2026-03-10T10:05:14","slug":"i-bought-a-vps-now-what","status":"publish","type":"post","link":"\/my\/tutorials\/i-bought-a-vps-now-what","title":{"rendered":"I bought a VPS now what? 8 steps to follow after purchasing a VPS"},"content":{"rendered":"<p>Once you&rsquo;ve purhcased a virtual private server (VPS), you&rsquo;ll have to complete several steps before deploying an application or a website.<\/p><p>These measures are crucial to ensure security and compatibility since VPS services are typically self-managed. They might not have any pre-configured software, so the user should prepare the hosting environment manually based on their specific needs.<\/p><p>To help you get started, this tutorial will explain what to do after purchasing a VPS hosting plan, from getting to know your server to integrating a monitoring tool.<\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/assets.hostinger.com\/content\/tutorials\/pdf\/Linux-Commands-Cheat-Sheet.pdf\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" width=\"1024\" height=\"283\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2022\/11\/Linux-cheat-sheet-1024x283.png\" alt=\"\" class=\"wp-image-69262\" srcset=\"https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2022\/11\/Linux-cheat-sheet-1536x425.png 1024w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2022\/11\/Linux-cheat-sheet-300x83.png 300w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2022\/11\/Linux-cheat-sheet-150x41.png 150w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2022\/11\/Linux-cheat-sheet-768x212.png 768w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2022\/11\/Linux-cheat-sheet.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><p>\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-what-to-do-after-buying-a-vps\">What to do after buying a VPS<\/h2><p>In this section, we will explain eight necessary measures after you <a href=\"\/my\/vps-hosting\">purchase a VPS hosting plan<\/a> and several Hostinger features that help simplify the task.<\/p><h3 class=\"wp-block-heading\" id=\"h-1-understand-your-vps\">1. Understand your VPS<\/h3><p>Each <a href=\"\/my\/tutorials\/what-is-vps-hosting\">virtual private server<\/a> comes with specific CPU cores, RAM, and storage allocations. These determine how much load your virtual server can withstand and the amount of data it can save.<\/p><p>Web hosting providers commonly provide two operating system options &ndash; Linux and Windows. Hostinger&rsquo;s VPS only supports <a href=\"\/my\/tutorials\/best-linux-distro\">Linux distros<\/a> since they are free, more flexible, and perform better than Windows.<\/p><p>Consider installing a control panel like <a href=\"\/my\/tutorials\/coolify-vs-dokploy\"><strong>Coolify <\/strong>or<strong> Dokploy<\/strong><\/a><strong> <\/strong>to simplify VPS hosting management. They both provide a graphical user interface (GUI) for accessing your server files and configurations without using <a href=\"\/my\/tutorials\/linux-commands\">Linux commands<\/a>.<\/p><h3 class=\"wp-block-heading\" id=\"h-2-set-up-your-vps\">2. Set up your VPS<\/h3><p>Once you&rsquo;ve figured out your VPS details, let&rsquo;s proceed with the software installation. At Hostinger, you can configure an operating system and control panel in one click using a VPS template. You might need to use custom commands if you&rsquo;re using another web hosting provider.<\/p><?xml encoding=\"utf-8\" ?><figure class=\"wp-block-image size-large\"><a href=\"\/my\/vps-hosting\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" width=\"1024\" height=\"300\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner-1024x300.png\" alt=\"\" class=\"wp-image-77934\" srcset=\"https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2023\/02\/VPS-hosting-banner.png 1024w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2023\/02\/VPS-hosting-banner-300x88.png 300w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2023\/02\/VPS-hosting-banner-150x44.png 150w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2023\/02\/VPS-hosting-banner-768x225.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><p>You can then access your VPS via the<strong> Browser terminal<\/strong>. This hPanel feature will log you in automatically and allow you to execute commands on your VPS from the browser. Simply go to the <strong>VPS overview <\/strong>page on hPanel and click <strong>Browser terminal<\/strong> to access it.<\/p><p>Alternatively, you can use SSH to connect to your VPS. You can <a href=\"\/my\/tutorials\/how-to-use-putty-ssh\">use PuTTY<\/a> to access the Linux server or <strong>Remote Desktop<\/strong> for Windows.<\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69f741124f3c6\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-full wp-lightbox-container\"><img decoding=\"async\" width=\"671\" height=\"661\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/04\/putty-ssh-user-interface.png\" alt=\"PuTTY SSH user interface\" class=\"wp-image-107935\" srcset=\"https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/04\/putty-ssh-user-interface.png 671w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/04\/putty-ssh-user-interface-300x296.png 300w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/04\/putty-ssh-user-interface-150x148.png 150w\" sizes=\"(max-width: 671px) 100vw, 671px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>By default, you will log in as <strong>root<\/strong>. Since this user has the most privileges, running commands and performing server management tasks with it can be somewhat risky if not careful.<\/p><p>With that in mind, let&rsquo;s create another superuser in your Linux VPS hosting to run administrative commands. We will use AlmaLinux for this tutorial, but the steps should be the same for all distros like <a href=\"\/my\/tutorials\/what-is-ubuntu\">Ubuntu<\/a> or CentOS:<\/p><pre class=\"wp-block-preformatted\">adduser your-username<\/pre><p>Enter the new account&rsquo;s password and contact details. Then, switch from the root to the new user using the following command:<\/p><pre class=\"wp-block-preformatted\">su your-username<\/pre><p>You&rsquo;ll be able to run administrative commands using the <strong>sudo <\/strong>prefix with this account once you&rsquo;ve entered its password.<\/p><h3 class=\"wp-block-heading\" id=\"h-3-point-your-domain\">3. Point your domain<\/h3><p>While you can access your VPS using its IP address, you still need a domain name to make the hosted site or application accessible to users. You will also need it to enable HTTPS and set up a custom mail server in the later steps.<\/p><p>There are a couple of ways to <a href=\"\/my\/tutorials\/dns\/how-to-point-domain-to-vps\">point a domain name to your VPS<\/a>, but the easiest method is changing the DNS record in your registrar&rsquo;s settings.<\/p><p>To do so in Hostinger, open<strong> hPanel<\/strong> and navigate to <strong>Domains <\/strong>&rarr; <strong>Domain Portfolio<\/strong>. Then, find your domain and click on<strong> Manage<\/strong>. <\/p><figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/04\/domain-portfolio-manage.png\"><img decoding=\"async\" width=\"1024\" height=\"279\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/04\/domain-portfolio-manage-1024x279.png\" alt=\"Hostinger's domain portfolio with the Manage button highlighted\" class=\"wp-image-118792\" srcset=\"https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/04\/domain-portfolio-manage-1024x279.png 1024w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/04\/domain-portfolio-manage-300x82.png 300w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/04\/domain-portfolio-manage-150x41.png 150w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/04\/domain-portfolio-manage-768x210.png 768w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/04\/domain-portfolio-manage-1536x419.png 1536w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/04\/domain-portfolio-manage-2048x559.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><p>Next, click on <strong>DNS \/ Nameservers<\/strong> on the left side menu, and you&rsquo;ll be taken to the <strong>DNS records page<\/strong>.<\/p><p>Under the <strong>Manage DNS records<\/strong> section, add two new <strong>A records<\/strong> pointing to your VPS IP address. Name them <strong>www<\/strong> and <strong>@<\/strong>, but keep other configuration values identical.<\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69f7411254c72\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"182\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/04\/dns-record-management-in-hpanel-1024x182.png\" alt=\"DNS record management in hPanel\" class=\"wp-image-107937\" srcset=\"https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/04\/dns-record-management-in-hpanel-1024x182.png 1024w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/04\/dns-record-management-in-hpanel-300x53.png 300w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/04\/dns-record-management-in-hpanel-150x27.png 150w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/04\/dns-record-management-in-hpanel-768x137.png 768w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/04\/dns-record-management-in-hpanel.png 1460w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><h3 class=\"wp-block-heading\" id=\"h-4-secure-your-vps\">4. Secure your VPS<\/h3><p>To maintain your <a href=\"\/my\/tutorials\/vps-security\">VPS security<\/a>, regularly run the <strong>update<\/strong> command to install the latest version of all software. Here&rsquo;s how to do so in AlmaLinux:<\/p><pre class=\"wp-block-preformatted\">sudo dnf update &amp;&amp; sudo apt upgrade<\/pre><p>For other distros, replace <strong>dnf <\/strong>with their corresponding package manager, like <strong>apt <\/strong>for <strong>Debian <\/strong>and <strong>Ubuntu <\/strong>VPS. If you use Windows, follow the guide on <a href=\"https:\/\/learn.microsoft.com\/en-us\/windows-server\/get-started\/perform-in-place-upgrade\" target=\"_blank\" rel=\"noopener\">updating your server software<\/a>.<\/p><p>In addition, configure firewall rules on your VPS to block malicious traffic that can compromise its safety. Hostinger users can set up the firewall from hPanel by simply going to <strong>VPS overview &rarr; Security &rarr; Firewall<\/strong>. You can also do this using<strong> Linux&rsquo;s <\/strong><a href=\"\/my\/tutorials\/iptables-tutorial\"><strong>iptables<\/strong><\/a><strong> <\/strong>or <strong>Windows Firewall<\/strong>.<\/p><p>Another essential measure is setting up <a href=\"\/my\/tutorials\/fail2ban-configuration\">Fail2Ban<\/a> to block malicious login attempts. Here is the installation command:<\/p><pre class=\"wp-block-preformatted\">sudo dnf install fail2ban<\/pre><p>Additionally, consider <a href=\"\/my\/tutorials\/how-to-change-ssh-port-vps\">changing the default SSH port<\/a> since the default one is often exploited. You can do so by opening the SSH configuration file with this command and changing the corresponding setting.<\/p><pre class=\"wp-block-preformatted\">sudo nano \/etc\/ssh\/sshd_config<\/pre><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69f7411257f1a\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-full wp-lightbox-container\"><img decoding=\"async\" width=\"956\" height=\"263\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/04\/the-port-setting-in-the-ssh-configuration-file.png\" alt=\"The port setting in the SSH configuration file\" class=\"wp-image-107938\" srcset=\"https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/04\/the-port-setting-in-the-ssh-configuration-file.png 956w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/04\/the-port-setting-in-the-ssh-configuration-file-300x83.png 300w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/04\/the-port-setting-in-the-ssh-configuration-file-150x41.png 150w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/04\/the-port-setting-in-the-ssh-configuration-file-768x211.png 768w\" sizes=\"(max-width: 956px) 100vw, 956px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>While not mandatory, we also recommend <a href=\"\/my\/tutorials\/ssh\/how-to-set-up-ssh-keys\">setting up SSH keys<\/a> to secure your connection properly. These are additional login credentials that help protect your server if the username and password are compromised.<\/p><p>Lastly, install a secure sockets layer (SSL) certificate to encrypt the connection between your server and clients. You can do so using <strong>Certbot <\/strong>via your command line interface or your hosting management panel&rsquo;s feature.<\/p><p>For example, set it up in Cyberpanel by going to the main dashboard &rarr;<strong> SSL<\/strong> &rarr; <strong>Manage<\/strong> <strong>SSL<\/strong>. Select your VPS domain and click <strong>Issue SSL<\/strong>. Then, go to <strong>Websites <\/strong>&rarr;<strong> List Websites<\/strong> &rarr; <strong>Manage <\/strong>&rarr;<strong> Rewrite Rules<\/strong> and select<strong> force HTTPS<\/strong>.<\/p><h3 class=\"wp-block-heading\" id=\"h-5-install-a-web-server\">5. Install a web server<\/h3><p>Now, install the web stack to host your website or application. The first component is a <strong>web server, <\/strong>a software that takes clients&rsquo; requests and displays the queried content.<\/p><p><div><p class=\"important\"><strong>Important!<\/strong> If you use Hostinger&rsquo;s VPS templates, you don&rsquo;t need to configure a web server and other web stack components as they are pre-installed.<\/p><\/div>\n\n\n\n<\/p><p>Some popular web servers are <strong>Apache<\/strong>,<strong> NGINX<\/strong>, and <strong>OpenLiteSpeed<\/strong>. Unless you need a specific one, we recommend OpenLiteSpeed due to its high performance and extensive compatibility.<\/p><p>To help you make an informed decision, check out our <a href=\"\/my\/tutorials\/optimize-wordpress-with-kvm-vps\">WordPress on KVM tutorial<\/a> to learn more about their performance. Now, let&rsquo;s start installing a web server.<\/p><p>At Hostinger, you can use our <a href=\"\/my\/vps\/lamp-hosting\">LAMP stack VPS template<\/a> to configure Apache or LEMP for NGINX. OpenLiteSpeed templates are also available, but they are pre-configured with other software.<\/p><p>Use commands if you want to install the web server separately. To learn more about the steps, check out the <a href=\"https:\/\/openlitespeed.org\/kb\/step-by-step-install-ols\/\" target=\"_blank\" rel=\"noopener\">OpenLiteSpeed setup guide<\/a>.<\/p><h3 class=\"wp-block-heading\" id=\"h-6-add-email-and-database-services\">6. Add email and database services<\/h3><p>Another component of a web stack is a database, which stores and retrieves user information upon request. It enables your website to show dynamic content that automatically changes based on specific queries.<\/p><p>There are various database management systems (DBMS), like <strong>MySQL<\/strong>, <strong>MariaDB<\/strong>, and <strong>PostgreSQL<\/strong>. The setup process varies depending on the databases. For example, run the following commands to install MySQL on an AlmaLinux VPS:<\/p><pre class=\"wp-block-preformatted\">sudo dnf install mysql-server<\/pre><p>While optional, we also recommend setting up <strong>phpMyAdmin<\/strong>. Instead of using commands, this control panel provides a graphical interface to help simplify MySQL database administration.<\/p><p>To learn more about how to set it up, check out our <a href=\"\/my\/tutorials\/how-to-install-phpmyadmin-on-centos-7\/\">installing phpMyAdmin on CentOS<\/a> tutorial, which should also work for other RHEL-based distros like AlmaLinux. Once configured, you should be able to access the panel by visiting this link:<\/p><pre class=\"wp-block-preformatted\">yourvpsdomain.tld\/phpmyadmin<\/pre><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69f741125b114\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"507\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/04\/phpmyadmin-login-page-1024x507.png\" alt=\"PhpMyAdmin login page\" class=\"wp-image-107939\" srcset=\"https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/04\/phpmyadmin-login-page.png 1024w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/04\/phpmyadmin-login-page-300x149.png 300w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/04\/phpmyadmin-login-page-150x74.png 150w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/04\/phpmyadmin-login-page-768x380.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>Log in as the root user you created during the MySQL installation process. To connect the database with your application, add the <a href=\"https:\/\/www.php.net\/manual\/en\/function.mysql-connect.php\" target=\"_blank\" rel=\"noopener\">PHP mysql_connect function<\/a> to your <strong>index.php<\/strong> file.<\/p><p>We also recommend setting up a private mailing service with your domain to improve deliverability. The easiest way to do so is by <a href=\"\/my\/tutorials\/how-to-host-your-own-email-server-on-a-vps-with-cyberpanel\">hosting a custom mail server on CyberPanel<\/a>.<\/p><h3 class=\"wp-block-heading\" id=\"h-7-deploy-your-first-web-application\">7. Deploy your first web application<\/h3><p>After the web stack is configured, let&rsquo;s proceed with the web application deployment. The steps slightly differ depending on whether you build it using a framework or content management system (CMS).<\/p><p>Hostinger VPS supports popular CMSs like WordPress and frameworks like Laravel, which you can configure using templates or commands. Several management panels also provide an installer feature.<\/p><p>For example, install WordPress via CyberPanel by going to the<strong> Dashboard <\/strong>&rarr; <strong>Websites <\/strong>&rarr;<strong> List Websites <\/strong>&rarr; <strong>Manage<\/strong>. Scroll down to the <strong>Application Installer<\/strong> section and select <strong>WP + LSCache<\/strong>. Enter the site information and click <strong>Create Website<\/strong>.<\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69f741125e45f\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"209\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/04\/the-application-installer-menu-in-cyberpanel-1024x209.png\" alt=\"The application installer menu in CyberPanel\" class=\"wp-image-107940\" srcset=\"https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/04\/the-application-installer-menu-in-cyberpanel.png 1024w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/04\/the-application-installer-menu-in-cyberpanel-300x61.png 300w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/04\/the-application-installer-menu-in-cyberpanel-150x31.png 150w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/04\/the-application-installer-menu-in-cyberpanel-768x157.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>Once installed, visit <strong>yourdomain.tld\/wp-admin<\/strong> to access the WordPress admin dashboard and configure your web page. Navigate to the <strong>Plugin <\/strong>menu and <a href=\"\/my\/tutorials\/wordpress\/how-to-install-wordpress-plugins\">install plugins<\/a> like <strong>WordFence<\/strong> to optimize security and enable caching using <strong>LiteSpeed<\/strong>.<\/p><p>For frameworks, you must use Hostinger&rsquo;s VPS template or commands to install it. Once configured, push the files to the server from a Git repository via SSH or using <a href=\"\/my\/tutorials\/what-is-ftp\">file transfer protocol<\/a> (FTP).<\/p><h3 class=\"wp-block-heading\" id=\"h-8-monitor-and-maintain-your-server\">8. Monitor and maintain your server<\/h3><p>Regularly monitor your server performance to ensure your website or application is responsive. You can use tools like <strong>Grafana<\/strong> or<strong> Prometheus<\/strong>, but setting them up can be complicated.<\/p><p>For basic resource tracking, use<strong> <\/strong>your management panel&rsquo;s built-in monitoring feature. In hPanel, you can access it by going to <strong>VPS<\/strong> &rarr; <strong>Manage<\/strong> &rarr;<strong> Backups &amp; Monitoring<\/strong> &rarr; <strong>Server Usage<\/strong>.<\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69f74112614c8\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"539\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/04\/hpanel-vps-monitoring-dashboard-1024x539.png\" alt=\"hPanel VPS monitoring dashboard\" class=\"wp-image-107941\" srcset=\"https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/04\/hpanel-vps-monitoring-dashboard-1024x539.png 1024w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/04\/hpanel-vps-monitoring-dashboard-300x158.png 300w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/04\/hpanel-vps-monitoring-dashboard-150x79.png 150w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/04\/hpanel-vps-monitoring-dashboard-768x404.png 768w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/04\/hpanel-vps-monitoring-dashboard.png 1460w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>Also, regularly update your server software to maintain security. To simplify this recurrent task, set up a <a href=\"\/my\/tutorials\/cron-job\">cron job<\/a> script to schedule its execution.<\/p><p>Moreover, enable automatic VPS backup to ensure data safety using your web host&rsquo;s feature or cron job. By default, your system will create the archive file locally.<\/p><p>We recommend using an additional off-site backup solution to protect your files from potential physical damage. A popular provider of such a service is Google Drive.<\/p><p><div class=\"protip\">\n                    <h4 class=\"title\">Need Help Managing Your VPS Hosting?<\/h4>\n                    <p>Use <a href=\"\/blog\/vps-ai-assistant\">Kodee<\/a>, Hostinger&rsquo;s own VPS AI assistant, to help with server maintenance and troubleshooting. You can generate instructions and commands for your needs using simple prompts.<\/p>\n                <\/div>\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2><p>Since VPS hosting is typically a self-managed service, users should follow a variety of steps to prepare their hosting environment. After understanding the server&rsquo;s hardware and software compatibility, install an operating system like Linux.<\/p><p>Then, access your VPS via SSH to create a new superuser and set up security software, including a firewall and SSL. Install a web stack according to your application requirements and optional software like a hosting management panel.<\/p><p>Configure a CMS or framework and deploy your application to the server via FTP. Lastly, a monitoring tool like Prometheus should be set up, and a cronjob script should be created to automate regular tasks like backup and updating.<\/p><h2 class=\"wp-block-heading\" id=\"h-i-bought-a-vps-now-what-faq\">I bought a VPS now what? FAQ<\/h2><p>In this section, we will answer several questions users often ask after purchasing a VPS hosting plan.<\/p><div class=\"schema-faq wp-block-yoast-faq-block\"><div class=\"schema-faq-section\" id=\"faq-question-1714051310174\"><h3 class=\"schema-faq-question\">What to Do on a New VPS?<\/h3> <p class=\"schema-faq-answer\">The most critical steps are installing an operating system, setting up a new root password, creating a superuser, and configuring security tools. Then, install the web stack, such as the web server and database, based on your hosting needs.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1714051314800\"><h3 class=\"schema-faq-question\">Can I Host Multiple Websites on a Single VPS?<\/h3> <p class=\"schema-faq-answer\">Absolutely! To host multiple websites on a VPS, create a dedicated folder within your web server&rsquo;s root directory for each domain. Then, upload <strong>index.php<\/strong> and other page files into the location.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1714051324998\"><h3 class=\"schema-faq-question\">How Do I Install a Web Server Like Apache or NGINX on My VPS?<\/h3> <p class=\"schema-faq-answer\">At Hostinger, you can install the Apache, NGINX, or OpenLiteSpeed web server using the operating system template via hPanel. Alternatively, you can do so using the <strong>apt install <\/strong>command via SSH.&nbsp;<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1714051334149\"><h3 class=\"schema-faq-question\">What Is the Best Way to Monitor the Performance of My VPS?<\/h3> <p class=\"schema-faq-answer\">The best way to track your VPS performance is by integrating it with a monitoring tool like Prometheus and Grafana. Alternatively, you can use Hostinger&rsquo;s VPS monitoring tool directly via hPanel, but the information is not as comprehensive.&nbsp;<\/p> <\/div> <\/div><h3 class=\"wp-block-heading\" id=\"h-\"><\/h3>\n","protected":false},"excerpt":{"rendered":"<p>Once you&rsquo;ve purhcased a virtual private server (VPS), you&rsquo;ll have to complete several steps before deploying an application or a website. These measures are crucial to ensure security and compatibility since VPS services are typically self-managed. They might not have any pre-configured software, so the user should prepare the hosting environment manually based on their [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/my\/tutorials\/i-bought-a-vps-now-what\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":337,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"I Bought a VPS Now What? 8 Things to Do After Buying a VPS","rank_math_description":"What to do after buying a VPS: 1. Understand your VPS 2. Set up your virtual private server 3. Point your domain 4. Secure your VPS + more.","rank_math_focus_keyword":"i bought a vps now what","footnotes":""},"categories":[1],"tags":[],"class_list":["post-107934","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/tutorials\/i-bought-a-vps-now-what","default":1},{"locale":"pt-BR","link":"https:\/\/www.hostinger.com\/br\/tutoriais\/comprei-um-vps-e-agora","default":0},{"locale":"de-DE","link":"https:\/\/www.hostinger.com\/de\/tutorials\/vps-gekauft-und-nun","default":0},{"locale":"nl-NL","link":"https:\/\/www.hostinger.com\/nl\/tutorials\/ik-heb-een-vps-gekocht","default":0},{"locale":"en-GB","link":"https:\/\/www.hostinger.com\/uk\/tutorials\/i-bought-a-vps-now-what","default":0},{"locale":"en-MY","link":"https:\/\/www.hostinger.com\/my\/tutorials\/i-bought-a-vps-now-what","default":0},{"locale":"en-PH","link":"https:\/\/www.hostinger.com\/ph\/tutorials\/i-bought-a-vps-now-what","default":0},{"locale":"pt-PT","link":"https:\/\/www.hostinger.com\/pt\/tutoriais\/comprei-um-vps-e-agora","default":0},{"locale":"en-IN","link":"https:\/\/www.hostinger.com\/in\/tutorials\/i-bought-a-vps-now-what","default":0}],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/posts\/107934","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/users\/337"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/comments?post=107934"}],"version-history":[{"count":14,"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/posts\/107934\/revisions"}],"predecessor-version":[{"id":121206,"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/posts\/107934\/revisions\/121206"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/media?parent=107934"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/categories?post=107934"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/tags?post=107934"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}