We have recently switch our personal hosting and all our clients over to Digital Ocean. Why? well because its really fast and really inexpensive. starting at $5USD/month gets you a VPS (Virtual Private Server) that has the power of what standard hosting companies are charging $55USD/month. How do they charge so little for so much? Well it mostly comes down to all the services you are paying for with a standard host. You are getting things like cpanel ( a pretty front end control panel for managing all things to do with your hosting.) This allows you to do things like create databases, setup subdomains etc. However in my time setting up hosting for people I have come to the conclusion that end users want nothing to do with their Cpanel anyway, so you are basically paying for something you don't need. The other advantage of your standard $55 VPS plan is that it is fully managed and keeps your server updated and all your security patches up to date. This is where Serverpilot comes in. Serverpilot is a free service that allows us to quickly install all the necessary software to our Digital Ocean server and keeps it up to date with all security updates, also for $10/month extra you can easily add an SSL to your site.
Note- This guide is for Windows PC's however minus a few steps is very similar with a mac
To get started you need to head over to Digital Ocean and sign up for an account. Use this link to get a $10 credit which will give you 2 free months. Once you sign up for an account, you will be prompted to add a Credit Card on your account, however you will not be charged until you setup your first "Droplet", and unlike the other guys there is no commitment/contract and you will be billed by the minute not by the year!
Once you have an account and your CC on file its time to create our first Droplet. However before we do that we are going to skip ahead and setup an SSH key, as we will need this in the next step.
head over to the Putty download page and look for the link that looks like this:
Download and install this package, this will install two programs you will use PuTTYgen and PuTTY. for now we are going run PuTTYgen, open PuTTYgen by hitting start and searching for puttygen, after it launches click on the Generate button, and move your mouse randomly in the space indicated.
Now we are going to Save both the public and private keys, place them somewhere safe that you will remember (when saving your private key you will be asked if you want to add a passphrase for added security) . Also Highlight the Public key and copy it , this will make the next step faster.
Head back over to your Digital Ocean account and Create a new Droplet.
We are going to select an Ubuntu server version 14.04.x or 16.04.x at the time of writing this article most people will still be on 14.04.4 however 16.04.4 is the next major release and Server Pilot will except either of these versions. Choose your price/server config, the $5 plan will be more than enough for most small-medium businesses and its easy to upgrade in the future if you are getting a huge amount of traffic to your site. Then you need to select a region where your server will be hosted, best to choose one that is closest to your customer base.
Now you are going to click on New SSH Key and in the popup, paste your Key that you copied in the previous step, give the key a name and select Add SSH Key.
Once your Key is Added hit Create and your Droplet will set itself up.
To add your domain to DO click on the Networking tab and select Domains. Then simply add your domain name and select the droplet you just created in the dropdown. Then go ahead and click "Create Record"
Now that our server is setup we are going to connect to our server in order to setup serverpilot. Launch PuTTY by clicking start and searching putty, to connect to the server follow this guide from the link down to conclusion and then return to this page.
Now you should have an open PuTTY Session, so pop over to head over to serverpilot.io and sign up for a free account. once you have an account your going to click on Connect a Server. You are going to check off the "I don't have a root password or public IP address" we are using this method as it is much more secure than just using the root password and not much more work. fill in the Hostname(just use the name of the DO server here) and SFTP password you want to use.
when you press Connect to ServerPilot it will give you a script to use on the server. Copy all the text in the grey box.
now hop over to your open PuTTY window and to paste the text in you putty window you just right click inside the window.
After you right click in the window the server will do its thing and install all the software you need to run your WordPress Site. Once you see the success message you can close your PuTTY session and log back into https://manage.serverpilot.io
If you click on Servers you should now see your server name, once you have verified your server is connected, head over to the Apps tab and click on Create App. Give your App a name such as "mysite", add you domain "mysite.com" check off that it is a WordPress Site, this will install wordpress, setup a database for you, a WP login and everything behind the scenes. Choose what version of PHP you wish to use. (if you are not sure go with the latest version). Click the Server drop down and you will see your connected server, once you select your server you will see another dropdown called System User, click this dropdown and you will just have one option "serverpilot" select Create App.
Once you have selected create app, that's all there is to it, point your domain at your Digital Ocean IP address and you will see your blank WordPress Installation