Blogging

Fast VPS Setup: DigitalOcean Droplet + ServerPilot + WordPress

fgr
Written by techmanish

Recently I moved one of my niche blogs from shared hosting to VPS.

After countless hours of researching for a great VPS one name kept showing up every time: DigitalOcean. So I decided to check them out and see what the fuss was all about.

I have to say, I don’t regret it!

Note: If you are not comfortable with configuring your own VPS (DigitalOcean with Serverpilot) you can test things out on a subdomain first and then move to your main domain.

What is DigitalOcean?

DigitalOcean is an affordable cloud hosting provider with prices starting at $5/month for a droplet(server) with 1 core CPU, 512 RAM and 20GB SSD storage.

That’s SSD storage, remember other shared hosting companies how much they charged for SSD hosting? You don’t have to worry about that with DigitalOcean as all their servers have SSD storage by default, you don’t have to pay a penny extra.

But VPS, what is that? Is it like shared hosting? How the heck do I install WordPress? Can I just click here and there and WordPress is installed?

Well yes and no.

VPS stands for Virtual Private Server, the problem with shared hosting is that they host multiple users on the same server.

On a VPS you are the only user.

You don’t share server resources with anyone else.

A DigitalOcean droplet is like a little server with a linux operating system.

DigitalOcean offers you a private virtual server and yes with a click of a mouse you can install Apps such as WordPress.

But you don’t get a control panel like on shared hosting to manage emails, databases and so on.

So the next logical thing is to somehow install a control panel on a DigitalOcean droplet.

To host WordPress on a DigitalOcean droplet you need to either:

There are advantages and disadvantages with any of the above, I think it mostly depends on what you need and how much knowledge you have about running your own server.

But if you are like me, just looking for a way to host your websites on a VPS, the simplest way and the best, in my opinion, is to use a control panel which installs and configures everything for you. Also you have the advantage of making use of features such as database management, phpMyAdmin and so on.

Before we get into that lets start by creating our first droplet in DigitalOcean.

Creating a DigitalOcean Droplet

To create a droplet you must first open an account.

Opening an account is a simple and straight forward process.

How to create a droplet

  • Step 1. Click on Create Droplet
  • Step 2. Choose a size for your server
  • Step 3. Select a region
  • Step 4. Choose an image(operating system)

Step 1. Create Droplet

To create your first droplet login to your dashboard and click on create droplet.

Yes is that simple.

Step 2. Choose an image(operating system)

The next step is to choose a droplet image or operating system. Now I did I little research on this topic and what I found is that Ubuntu 14.04 x64 bits seems to be the best option.

Ubuntu 14.04 is a stable version and everyone seems to go for the x64 bits option instead of x32.

Also ServerPilot only works on Ubuntu.

Step 3. Choose a size for your server

Next you will need to choose the droplet size. The smallest one is $5/mo with 512 RAM and 1 CPU.

Is it enough? Well I am hosting two blogs with ~40K visitors/month on a $5/mo plan. So probably.

Step 4. Select a region

Lastly you have to choose a region for the server. As a rule of thumb you should choose a server region closer to your target audience.

So if most of your traffic comes from US it would be wise to choose New York or San Francisco.

Here you can also enable backups which is a nice feature to have if something goes south. But be advised that backups are charged at 20% of the monthly droplet cost, so for a $5/mo droplet the backup would be $1/mo.

More info can be found here: DigitalOcean Backups and Snapshots Explained

For the droplet hostname enter any name you like. Such as your website name for example.

Last but not least click on create and your server should be ready in a minute or less.

Add domain to DigitalOcean

Now that you have everything in place you will need to add your domain to DigitalOcean which can be found in your dashboard under Networking/Domains.

Enter your domain name and choose the droplet you’ve just created, the IP address will be automatically selected.

Finally click on create record.

Don’t forget to point your domain to DigitalOcean’s name servers.

Here is a great tutorial: How to Point to DigitalOcean Nameservers From Common Domain Registrars

Now you have your first droplet up and running with Ubuntu 14.04 and you’ve set up your domain.

But that’s it.

You don’t get any fancy control panel to host your website.

Thats where ServerPilot comes in handy.

But before we go into more detail on how to install ServerPilot, there are a few things you need to do before that.

First of all when you created the droplet you also received an email with an IP address, a username and a password.

To access your server you need to use either:

  • DigitalOcean’s console
  • or a SSH client such as PuTTY.

I prefer using PuTTY. It’s open source and doesn’t require any installation, just download and run it.

Open your email and copy your droplet’s IP and enter it in PuTTY.

putty

Next you will be presented with something like this:

putty-login

Now if you are like me, not that tech savvy, you reaction would probably be: “So now what?”

Bare with me it seems complicated at first but it’s actually easy.

Just use the username provided in the email and the password to login to your server. To copy paste the password just right click in PuTTY and it will automatically paste it. Be advised that Ubuntu does not show passwords not even asterisks.

When you first log in to your droplet you are asked to change your root password. Go ahead and do just that.

Now that you are logged in to your server we can proceed installing ServerPilot. By the way here is a nice list of common SSH commands that should help you manage your sever.

Open Source Control Panels vs ServerPilot

The server is up and running, next we need to install a few programs so that we can host WordPress websites. Usually you will need Apache, MySQL and PHP or for short a LAMP stack.

But I’m not that familiar with installing them!

Sure I heard of them I have basic knowledge about them but I have no idea how to install and configure the necessary software. That’s just me.

That’s why I need a control panel, because most control panels install and configure everything for you.

Ok but which control panel to choose?

I did some research, in fact I researched this topic for close to a week before I came to my conclusion.

It seems that the way to go is by using an open source control panel and there are quite a lot of them available. So I decided to test them out:

Here are some of the few I looked at:

  • Ajenti
  • Kloxo
  • ZPanel
  • Virtualmin
  • Vesta Control Panel
  • Froxlor
  • Sentora
  • ISPConfig

Most of them are good especially Virtualmin, but they are either way to complicated or way too resource hungry. Being on a VPS every penny counts so it’s a great idea to choose a control panel that is as lightweight as possible. This way all the power of the VPS is used to run websites not the control panel.

I mostly liked VestaCP and Sentora. But I did have a few issues with both of them.

VestaCP is quite interesting and simple to use, but I just could not make ftp to work. 3 days and I still haven’t figure it out so I ditch it and tested Sentora.

Sentora is beautiful but I didn’t like that it was a little resource hungry.

So I decided to search again for a control panel.

After a few hours of searching I discovered ServerPilot

What is ServerPilot?

ServerPilot is a control panel specifically designed for DigitalOcean droplets. No it’s not open source but it is free. They have paid versions as well if you need extra features and priority support.

What you need to know about ServerPilot is that:

  • it’s free
  • integrates flawlessly with DigitalOcean
  • it’s a fast lightweight control panel for your servers, by far the best one I found so far.
  • the necessary software to run WordPress is installed on your server but the control panel is in the cloud(at ServerPilot)
  • it’s secure and very easy to use
  • you can install apps like WordPress, use ftp and manage mySQL databases easily.

How to setup ServerPilot on a DigitalOcean droplet and install WordPress

To get started you will need to open a ServerPilot account.

In order to set up ServerPilot with DigitalOcean and install WordPress you have to:

  • Step 1. Connect droplet to ServerPilot
  • Step 2. Create an app and install WordPress

Step 1. Connecting your DigitalOcean droplet to ServerPilot.

In order to do that simply login to your ServerPilot account and click on connect server.

Enter the droplet IP address, root password and choose a password for SFTP. After that click connect to ServerPilot

As I mentioned earlier ServerPilot only works on 64-bit Ubuntu 14.04 or 64- bit Ubuntu 16.04 droplets.

Additional resources:

After the droplet is successfully connected to ServerPilot you will be able to see the connected server in your ServerPilot dashboard.

Congratulations you’ve successfully installed ServerPilot on your VPS.

Easy wasn’t it?

Now that all is up an running you can finally install WordPress.

Step 2. Install WordPress

In order to install WordPress first you will need to create an app. In your ServerPilot dashboard navigate to your recently connected server and click on create app.

Enter your app name and domain name.

Next click on the WordPress checkbox and enter your desired information.

Lastly choose your PHP version.

Finally click on create app.

Shared Hosting vs DigitalOcean

One thing I just can’t resist is to talk about the huge difference between shared hosting and DigitalOcean.

I will briefly outline some of the advantages of a VPS vs shared hosting.

The cost

First of all it’s the cost, a good shared hosting provider costs roughly $10/mo, doing the math that’s $120/year.

Wheres a DigitalOcean droplet(the smallest one) costs 5$/mo. thats $60/year, half the price of shared hosting and much more powerful(for me at least)

Speed

On shared hosting my website was loading quite fast.

I did a case study a while ago and on average(at that time) my website was loading in 1.19 s.

But now my website is insanely fast loading in 694 ms. Sometimes its down to 300 ms.

IP Address

Another major advantage of DigitalOcean compared to shared hosting is that your IP is not shared with other users and websites. Which is great!

In Conclusion

When going for a VPS things may seems very complicated at first, but actually it’s not that hard.

Sure you have to install things and use a terminal but after the process is completed everything seems to run smoothly (at least in my case).

I suggest trying it with a subdomain first and test things out. Then when you are comfortable with your setup you can proceed with your main domain name.

VPS or shared hosting which one do you prefer and why? Just let me know in the comments bellow.

My take on this is …

well…shared hosting is ok, but a VPS is much better.

  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

About the author

techmanish

Leave a Reply

%d bloggers like this: