I have been using DigitalOcean for almost 2 years now, the first time I moved from a shared hosting to DigitalOcean, one thing that got my attention is the speed. It is inarguably faster compared to most shared hosting. Since then, I’ve been setting up most websites using DigitalOcean, Laravel, WordPress, Virtual Servers and many more.
The only thing that is missing is a control panel like CPanel that commonly exists on most shared hosting packages. At first, it didn’t bother me that much to have a control panel for the hosting. But after a while, I figured that it was easier to manage your server with a control panel. So I opted for ServerPilot, a control panel specifically built for DigitalOcean.
Why this setup? As you know, we will everyday look for ways to optimize the speed of our sites. This setup is great and I would like to share it with you. I am not putting down any other setup there is, this is just one of them.
Note: If you are not comfortable with configuring your own VPS (DigitalOcean with Serverpilot) you can test things out on a sub-domain first and then move to your main domain.
What We’ll Be Using
First, let me introduce to you our 3 main characters :
WordPress
WordPress started as just a blogging system, but has evolved to be used as full content management system (CMS) and so much more through the thousands of plugins and widgets and themes, WordPress is limited only by your imagination. (And tech chops.)
source: wordpress
DigitalOcean
DigitalOcean is a cloud infrastructure provider focused on simplifying web infrastructure for software developers. DigitalOcean’s servers use only high-performance Solid State Disks. It has simple pricing model starts at $5 per month and offers hourly billing. Also it’s community pages are continually updated and moderated.
source: digitalocean
ServerPilot
ServerPilot is a secure control panel optimized for hosting WordPress and PHP websites on cloud servers. It is an alternative for CPanel, a control panel for your servers but ServerPilot is optimized for Digital Ocean.
ServerPilot only works on Ubuntu. Hence, setup is best for Ubuntu environment.
source: serverpilot
Getting Started
So we already know in who our main characters are, let’s get into setting them up. It’ll be brief and easy!
At this point, I would have assumed that you already have signed up for DigitalOcean & Serverpilot, if you haven’t, pause for a moment and register.
Register for DigitalOcean Register for Serverpilot
Alright, now that you’re all set up, let’s start with creating a droplet on DigitalOcean.
Creating a Droplet
Firstly, click on Create Droplet , a configuration settings panel will appear, this is where you are going to choose an image (operating system) for your server.
Use Ubuntu 14.04.4 x64 as it is the latest stable version of Ubuntu and also Serverpilot will only work on Ubuntu.
Secondly, select a size for your droplet, I’ll just use the cheapest $5/month as it already offer a great deal of specifications for a personal hosting.
Now you can choose a data center. Since I am from Malaysia and Tony (our other developer) is from Indonesia, a middle ground data center for us would be Singapore. You should pick the region closest to your place for efficiency purposes.
Finally, choose a hostname then click ‘Create’. and voila! You have just created a new Droplet.
Add Domain to DigitalOcean
This is where you will be adding your domain to your host, where it will act as an common name for people to identify your site. Before that, you have to have a domain name, I got mine from Namecheap . I started using Namecheap a few years back, and for me it’s interface that makes it very easy to use and manage your domains. The prices are not bad either.
Firstly, You click on Networking then Domains , or just click here .
Then enter your domain name in the Domain field, and select the droplet you created just now and click Create Record.
It is really that simple to add your domain.
A big reminder, do not forget to point your Domain to DigitalOcean’s Nameservers. If you’re not sure how this is done, you can do so here.
Configuring Host’s Username & Password
Alright, before we go into installing ServerPilot, let’s go through some detailing. After you created your droplet, you will receive an IP address, a username and a password. Get all the details and use any of these :
- DigitalOcean’s Console
- Terminal (Mac)
- PuTTY (Windows)
My personal preference is to use iTerm2. You can open up your choice of terminal and login to your droplet via ssh.
Installing ServerPilot
Great, it’s time for ServerPilot! You have heard of CPanel right? A control panel to manage your hosting needs. Well, I would like to introduce to you ServerPilot, a control panel which is built specially for Digital Ocean. Let’s set it up!
Click on Connect Server
Fill in your IP Address, and your Root Password (the one you set up before), and then create an SFTP password for serverpilot access. Click on Connect to ServerPilot.
Tadaa, and now you have ServerPilot set up on your Droplet. The last setup in this guide is to set up WordPress.
Setting up WordPress on DigitalOcean with ServerPilot
Follow these steps to setup up WordPress.
- Click on Create App
- Insert Details
- Do not forget to tick WordPress
- Pick your runtime (I prefer php 5.6)
- Pick the server you set up just now
- Click on Create App
Loading, is what it will show on the screen while it is setting up the WordPress.
Once WordPress is ready, you can proceed to adding the database, domain, SSL and other options.
Everything is perfect now! on the server side at least, we still have to install the wordpress though. Let’s get on to it.
Installing WordPress
For this portion, you’ll need to download an FTP client. While there are many options out there, we’ll be using Transmit in this tutorial. For those who want a free and reliable option, you can take a look at Filezilla instead.
When you already have your FTP client set up, now it’s time to setup a droplet (transmit also uses droplet to represent a server).
The initial step is to just insert the details of your ServerPilot setup. Follow these steps:
- CHOOSE SFTP as the protocol
- Insert server IP/domain name
- Username = serverpilot
- Password = the password you set for serverpilot SFTP
- Click Save
After that, once it’s connected, go to serverpilot > apps > [sitename] > public
Thirdly, click on wp-config.php to change your database settings . Remember to change these 3 variables :
- DB_NAME
- DB_USER
- DB_PASSWORD
Once that’s complete, after you have changed your database settings, go to your browser and enter this URL www.[your-domain-name].com/wp-admin/install.php .
Finally, just follow the instructions on how to install the WordPress. Once you have complete those, you now have just set up WordPress on DigitalOcean with ServerPilot . Beautiful, ain’t it?
I will explain the differences between using DigitalOcean and other shared hosting in the next series. (Hopefully).
Wrapping it Up
Just to let you know that this is my personal preference on setting up WordPress . Maybe you would like to share your preferences on setting up WordPress or other content management systems? Do you want to suggest and comment anything on this post? Also, my appreciation and thanks to Denisa Cinca for her post. Much of what I’ve learned has been referened from here.
3 Comments