( Skip to Steps )
Great so you have weighed the pros and cons of hosting your project on your own servers, and decided it is the right option. So, the next step is to decide how to go about getting setup. You could go with setting up your server(s) on premises, or co-location of your hardware could be an option. These methods will get you online, but create extra expenses and overhead. If you don’t have a need to control your hardware, the best way to get going is to build your servers in the cloud.
Cloud services are a ubiquitous part of web and application development. There are many providers to choose from, Amazon AWS, Google Compute, Microsoft Azure are all major players in this field. These services can (and do) handle everything from some of the Internets largest websites to tiny apps and projects just starting out. These services are great, and have incredibly robust feature sets. As a result of that robustness, the learning curve is pretty steep. Another issue with the big guys is that pricing can be complicated. everything with these servers is ordered a la carte, so you have separate charges for CPU, storage, bandwidth, etc. Most projects really won’t need the services that AWS and the like offer.
There several providers out there, however, that offer a much simpler way. these companies bill for a whole server package, by the hour, as opposed to the a la carte model. Two big players in this field are Vultr, and Digital Ocean. We use Vultr here at JAGB, mostly because we are cheap on a restricted budget. Digital Ocean is a great service as well, and offers a couple more advanced services, but has a slightly higher cost for the amount of server you are getting. Either provider will give you an outstanding experience, you just have to decide what your needs are. So for this tutorial we will explore how to set up a basic server, with WordPress pre-installed and ready to go, on Vultr.
Note: If you prefer to use Digital Ocean (or many other providers) these steps will work there as well, though some things may look or be labeled differently.
Step 1 – Sign Up
Go to the Vultr website and create an account.
Note: Make sure you choose a strong password. Anyone who has your account password can add, delete, modify, or gain root access to your servers.
Next you will need to add a payment method. They accept credit cards, PayPal, or Bitcoin.
Step 2 – Main Control Panel
The image below is the main screen that you will be met with after signing in. Once you have servers setup this will be where they are listed. On the main screen click the Blue +, on the top left of the page, to add a server.
Step 3 – New Server Details Page
Firstly, select your data center. You should run your server as close to the target users as is possible. In this hypothetical example, I want to set up a dev server for our fictitious office in Manchester England. Accordingly, I have selected London, the closest location to Manchester.
Next you need to select what application you would like to deploy. For our purposes we are deploying WordPress.
Note: There are other applications available; you can only select one to pre-install. You can however manually install the others after server setup if you want. If you don’t need an application and just want a base server setup you can select “64 bit OS” or “32 bit OS” then select your OS
Now, you will select your server size, in this case it is a development server so the smallest server size (1024mb ram) is more than adequate. In all reality you can run a production site on this.
The next step is to select the additional features you will need. I recommend you go ahead and enable IPv6 and Private network. These features are for more advanced purposes than this tutorial, but will be useful later if you expand (future proofing). The other two features are Automatic Backup and DDoS (Distributed Denial of Service) protection. I recommend automatic backup if you plan on having important data stored on this server. DDoS protection is a good option if you need to make sure your server is not taken down by a mild DDoS attack. This will not likely prevent a major attack.
Note: The startup scripts is an advanced feature where you can write scripts and commands to be run on the servers first launch. It is outside the scope of this tutorial.
The last step in this section is to give your server a hostname and a label. Use whatever hostname you want. I typically just use the fully qualified domain name I intend to use with that server (ie: web.dev.lon.uk.jageekblog.com). This name specifies the purpose, environment, and location of the server. For me this method just makes management easier. The label is anything you want (ie: Name of server, or maybe its function)
Note: SSH Keys are a more secure way to login to a server, typically replacing the username and password. This is an advanced feature, and outside the scope of this tutorial.
Finally click Deploy Server. This will take you back to the control panel. You will see the server shows a status of installing. When the status switches to “running”, typically less than 5 minutes, the server is setup and serving up WordPress.
Step 4 – Congratulations! Your server is up and running. What Next?
- If you want to test out your installation/setup WordPress you can simply type the IP address in your browser.
- The login details for your WordPress installation are in the red part on the bottom of the page. Change these credentials immediately.
- You can login to your server by using the console icon on the top left of the page, or by using an SSH client such as PuTTY. Change your password as soon as you login using the “passwd” command.
- Login to your domain name provider (like GoDaddy), or other DNS provider, and make the proper DNS entries to point any domains you would like to your server. You should also make an entry for the hostname of your server.
Note: if you do not want to use a domain name, make sure that you set the URL in WordPress to the IP address when it asks.
That’s it, Good Luck, and Have Fun!