This tutorial is part of a series of tutorials on How to Start a WordPress Blog in 5 Easy Steps.
We will continue to install WordPress on a VPS. We have already purchased a domain name from NameSilo. We will now get a VPS hosting.
Get a VPS Hosting
I’ve tried and tested various VPS hosting and would recommend using VPS Dime as your VPS hosting partner. Normally, VPS plans start at $ 20 to $ 30. However, VPS Dime gives, even more, powerful features at a price of $7. Further, the maximum resources on a server are consumed by the database.
The maximum resources on a server are consumed by the database. Web sites with heavy traffic use multiple servers at multiple data centers just to manage the database optimally. It’s a tedious job. It needs a computer nerd with a good understanding of networking and database to manage. However, at VPS Dime you can transfer the tension of database to the web host.
VPS Dime offers a service of Off-load database. It has a one-time setup fee of $ 1. It offers total database size of 20 GB. I’m using almost 250 MB of the database on 8-10 sites altogether. So, the database size of 20 GB is enormous. Let’s go to VPS Dime for getting a VPS. Click on the link below.
It will take you to the Homepage of VPS Dime.
The default option showing for Linux VPS on the Homepage of VPS Dime is sufficient for handling 100,000 page views a day (if used with Off Load Database service & CloudFlare CDN). So, simply click on the Buy Now button.
You need to configure your order on this page. choose any name as the hostname. It is important to select location as Dallas and the latest version of Ubuntu as Operating system, preferably Ubuntu 16.04. There is an option to select faster CPU. But, it is not required when your blog is at a preliminary stage.
You don’t need to change anything else. Just click checkout to review your order.
The next page gives a summary of your order along with asking your details to create the account. It will be having payment information at the bottom. Complete the registration details, choose the payment option and click on Complete Order.
The order is now confirmed. You need to first confirm the email id. VPS Dime must have sent a mail for confirmation of your account creation. The payment has not yet complete. Only after confirming your email id you can complete the payment. So, complete the payment process after confirming email id.
Once the payment is complete, you will receive an email with your VPS information (IP address, username, and password). We will be using this information later.
CloudFlare is a DNS host, security service, and content delivery network (CDN). CloudFlare gives their services free with some paid upgrades. The services given by CloudfFare is quite useful and robust.
The traffic to the websites needs to be routed through CloudFlare servers. So, we need to point the domain to send the traffic to CloudFlare and then point CloudFlare to the VPS,
The homepage has a signup link on the upper right side. Click on it.
Just enter your email id and preferred password to create your account.
The next page asks to enter your domain name. Enter your domain name and click Begin Scan. CloudFlare will scan the current DNS records for smooth working once the nameservers are changed for the domain to point it to CloudFlare. After the scan is complete, click continue.
The next screen will show the current DNS records for your domain.
Delete each of the current DNS records by clicking on the cross button as marked above. Afterward, add the following two records.
- “A” – “Your domain name (without www)” (e.g startablog.us or rukhaiyar.com) – “IP Address of your VPS” (given in the mail sent by VPS Dime)
- “CNAME” (Select from drop-down) – “www” – “domain name (without www)”
Suppose the IP address is 18.104.22.168 and the domain name is letsstartablog.com. Then, my domain’s DNS records after updating would look as shown below.
So, now let’s move to next page. Click continue.
On the next page choose your plan. It’s recommended to select the Free plan and move to next page.
Now, we need to go to NameSilo to update the nameservers for the domain to point it to CloudFlare. Use your account information to login into your NameSilo account.
As marked in the image above, go to Domain Manager.
Now, first select your domain name by clicking on the checkbox as in the image above. Afterward, you may see Change Nameserver link being active. Click on it to change the Domain Name Server (DNS).
You may now see various nameservers, some filled, some blank. Delete all. Use the two nameservers given by CloudFlare to fill both the boxes (leave others blank) and click Submit.
Go back to CloudFlare and click continue on the Change Your Nameservers page.
The next page might look as shown below.
Just click on Recheck Nameservers. CloudFlare will recheck the updating of nameservers and should show the status as Active.
We need to do one last work at CloudFlare. From the several icons above. Click on Crypto.
Go to SSL and convert Full to Full (Strict).
CloudFlare, as you can see, has various options. At the moment, we will concentrate on setting up the blog. We will look at the optimal setting for CloudFlare later.
Set up the Server
WordPress requires the following as a least to be running on a server to work:
- MySQL or MariaDB
- HTTP (i.e. Apache or Nginx)
This is the step which haunts many web owners to stick to shared hosting or be on managed hosting. Setting up these packages to work smoothly together is a very cumbersome job. But, don’t worry. It would be a super easy process, thanks to EasyEngine.
I remember in Nov 2010, I purchased my first dedicated server. I spent almost 24 hrs to figure out how to connect to a server and then setting things up via command line. I started using WHM/cPanel for doing my job easily. But, WHM/cPanel itself used to cost $30-40.
In 2014, I heard about EasyEngine. The ease with which one can handle the WordPress deployment on a server with WordPress changed my thinking about hosting WordPress website over a server.
EasyEngine is a script which makes installation of WordPress on a server totally fun. In just a few commands, all the required packages would be installed on the server.
So, let’s start our work. First, we need to connect to the server using an SSH client. An SSH client is a software program which uses the secure shell protocol to connect to a remote computer. You need to download and install Putty, an SSH client.
The link above will take you to the download page of Putty.
Download either 32-bit or 64-bit installer based on your choice and install it on your system.
Now, you are on command line interacting with your server. Enter the root password for login.
Interestingly, even if you type your password, you won’t see it as typed. So, just type your password and hit enter.
Run the following commands for setting up Easy Engine. The commands will take some time to run completely. So, just enter the command and enjoy the show.
You can copy the commands from here and right-click on the putty for pasting the commands (not ctrl + v).
apt-get update && apt-get upgrade && apt-get dist-upgrade
The above command will update the server to l the test version. It will ask permissions to update. Now, enter the following command.
wget -qO ee rt.cx/ee && sudo bash ee
The above command will install EasyEngine. It will ask your name and email id during installation. The email id collected at this stage is not used for collecting mail ids and spamming. The server will use it as an alias for sending emails from your server.
ee stack install
This command will install MySQL, NGINX, PHP5-FPM, HHVM, Redis along with Memcached, WP-CLI, phpMyAdmin, Adminer and other useful packages.
Now, the VPS is ready for installing WordPress.
Run the Command to Install WordPress
Use the below command to install WordPress for your blog.
ee site create example.com --wpredis --letsencrypt --hhvm --php7 --user=username --pass=password
- “ee site create” will give the command for a new website creation.
- example.com represents your domain name
- “wpredis” installs WordPress with Redis cache as object cache.
- “letsencrypt” will let you have a free SSL certificate by the non-profit Internet Security Research Group (ISRG).
- “hhvm” will make the php fast. Facebook developed Hip Hop Virtual Machine (HHVM) for using on their network.
- “php7” will use php 7 the latest build of PHP
- “user=username” & “pass=password” will help you use your own choice of username and password for WordPress.
Remember, 1-5 all are optional. But, these are recommended. Read more about the WordPress installation command of EasyEngine here.
Now, if you have followed all the steps correctly, go to your browser and type your domain name.
You may see a page such as above. Congratulation for installing WordPress. Now, your blog is ready for blogging. But, we need to do some preliminary setup, before you can start blogging.
If you are facing problem at any steps as given above, just send me an email. You may also ask me by sharing your thoughts below.
In the next step, we will first get familiarized with the administrative (admin) section of WordPress. Afterward, we will do some initial setup based on the core features of WordPress.