Hosting your blog on a Virtual Private Server comes with many cool perks - a well-optimized VPS is tens of times faster than a shared hosting, can store a lot more data and gives you a lot more freedom and independence. And while it’s a bit harder to use compared to a shared hosting (especially if the latter comes with a cPanel), sooner or later every growing business has to make the switch.
But to make the transition smooth and enjoy the idea of hosting your blog on a VPS there are certain essentials you should keep in mind. Before we get to them, let’s talk about when to actually upgrade your web hosting.
When to Make a Switch? Essential Tip #1: Skip Shared Hosting, Start on a VPS
Even though the majority of bloggers start their journey with a shared hosting, you don’t have to wait for your blog to get traction to do that. Don’t listen to those who tell you that you should wait for when you start experiencing CPU usage spikes and your site starts running slowly. The sooner you start, the better.
In fact, I believe that it’s best to start right away. Even though a VPS is slightly harder to manage, its excellent learning curve, all the skills that you learn, as well as the possibility to build your website in an environment in which you can stay on for years (as long as you choose a good hosting provider with great scalability options), are all worth the initial hassle. Especially that prices of good VPS options are similar to those of some of the shared hosting packages. So, how to get started?
Essential Tip #2: Do the Research Before You Make a Purchase
Before you choose the provider, take a few minutes and go over there offer. Check the available resources that each VPS package can offer you. Top Virtual Private Servers come with extra buffer resources which you can set to deploy during peak traffic. This can save you a lot of money and prevent the site from working slowly due to CPU usage surges.
But the resources are just one side of the coin. Another important thing you should look at is support. When it comes to a VPS (especially an unmanaged one - and that’s what you should look for; both to learn more and save money), you shouldn’t agree to anything less than 24/7. Sounds crazy, I know but trust me on this one. If the team doesn’t want to give you a hand, what’s the point of paying them for the server anyway? Of course, don’t expect them to do all the work if you choose an unmanaged service – but most reliable companies still offer a lot of help for those on such packages.
The last important part of your initial research is root access. If they don’t provide it, you should leave the page immediately. How else are you going to implement new scripts, execute commands and do the maintenance and operational work? Speaking of managing your server, let’s look into what you need to enjoy the process.
Essential Tip #3: Choose a Convenient OS and Control Panel
Assuming that your blog grows, you will need the right backend to support that growth. One of the core things that will determine the stability of your setup, as well as the convenience of its management, is the OS and a control panel.
When choosing a VPS, it’s good to choose one that comes with different OS & control panel combinations out-of-the-box. Here is a great example of a company that offers as many as six different operating systems: www.hostinger.com/web-hosting/vps
Essential Tip #4: Select the Right CMS
But the OS is just one thing - the next is the content management system that you would choose for your blog. When it comes to blogging, there is just one choice I trust – WordPress. It comes with so many themes and plugins and is so easy to use, that even a complete beginner can easily learn the ropes and build a fully functioning website. On top of that, according to W3Techs, a site ran by an Austrian consulting company Q-Success, it’s trusted by over 32% of all website owners, and 59.4% of those who use a CMS.
Essential Tip #5: Secure Your Site by Changing the Default SSH Port
While there are many ways in which you can secure your server, one of the first and easiest ones is changing the default port 22. By doing this, you prevent common vulnerability scans looking for from finding their way inside your server. This is because port 22 is the default SSH port.
To change the port, you will need the aforementioned root access. To get started, establish an SSH connection.
Next, open the configuration file using the following comment:
Once there, find the line indicating port number:
# Port 22
To change the port, simply change the number and delete the “#”. Hit CTRL+X (COMMAND+X on MAC) to save changes.
To make the change live, restart the SSH daemon with the following:
service sshd restart
And that’s it - just don’t forget the number you provided. Otherwise, you will be unable to log into your server using SSH.
Note: There are some disadvantages to this, though. Some applications are pre-setup to look for port 22. Similarly, you will need to provide the port to anyone who will want to look into your server (for example, support or third-party monitoring applications.
Essential Tip #7: Change the Username and Double-Check Your Passwords
Even though you should be taking care of your blog passwords no matter where you host it, when you manage a VPS, you need to protect them even more. This is because, anyone who gets access to your VPS could potentially harm your whole server instance, access your other projects and steal lots of valuable data. Especially if you have root access - which you do, as a server admin.
But the password is just one side of the coin. On top of changing the passwords, you shouldn’t be using the default username “root”. Instead, you should create a new user with sudo privileges – even if only to make you think twice before executing certain commands, as those will require you to add “sudo” to them. Luckily, adding such a user is very straightforward. First, establish a new connection to your server, log in using root and execute the following command:
Of course, instead of writing yourusername, type the actual username that you want to use. Next, it’s time to give it the full privileges. Type in:
This will open a configuration file where you can make the changes. Find the line which includes the following:
root ALL=(ALL:ALL) ALL
To give your new user sudo privileges, simply add it below the root:
root ALL=(ALL:ALL) ALL
yourusername ALL=(ALL:ALL) ALL
Just like in the port 22 part, hit CTRL+X (COMMAND+X on MAC) to save changes.
And that’s it! Now, you can start logging using the new user.
Having a blog on a VPS can be troublesome in the very beginning but it’s very rewarding as your site gets more and more traffic. The ease of scalability, security, and speed are all essential for a healthy growing business. If you stick to the above tips, you will not only get a head start by choosing a VPS when others are still dabbling with shared hosting but will also implement basic security settings, preventing others from harming your new blog.