Yesterday, I shifted this website to DigitalOcean and thought why not I just start my journey with a post on the same subject. So without any delays let us easily install WordPress on DigitalOcean.
Step 1: Account creation
Once you are signed up on DigitalOcean, you need to create a new droplet. There should be a big green button named ‘Create Droplet‘. Click the button and you will be taken to the droplet creation page.
Step 2: Setting up a droplet
Under ‘Choose an image’, select ‘One-click Apps’ tab and then WordPress image.
Next you need to choose a plan ($10/month is the minimum required for WordPress).
Then choose a datacenter which should be closest to your target audience in order to give them a faster website.
Now skip to ‘Choose a hostname’ at the bottom. Use the pre-assigned host name or add your own. Click create and wait for the droplet to be created (should take less than a minute).
Step 3: Log into droplet with SSH
After the droplet is ready, an email will be sent to your registered email address containing login information. You will be able to access your website on the assigned IP address. But you will need to log into your droplet using SSH to enable WordPress install.
If you are on a Mac or Linux then you can use ‘Terminal’ to log into your server. If you are running Windows then you need to download Putty.
For Mac / Linux Users
Open terminal and run the below command replacing SERVER_IP_ADDRESS with the actual IP address of your server.
ssh root@SERVER_IP_ADDRESS
Now you should see prompt asking your permission to continue. Just type ‘yes’ and hit enter.
You should now be connected to your server and you will be asked to change the temporary password. Few details such as web root, IP address and MySQL root password will be printed on your terminal screen.
Now if you try to visit your server’s IP address you should see WordPress install screen. You might have to reload the page twice to get to the WordPress install screen due to browser caching.
For Windows Users
Download Putty and run putty.exe by double-clicking on it. Now we need to configure the connection so enter the host name (server’s IP address or domain name), then enter port which is 22 by default and finally select the connection type as SSH. Now enter a name for this session under ‘Saved Sessions’ and click save so that you don’t have to enter this information again and again.
To initiate the connection just double click the session we saved. Accept the security alert which should appear when you first time connect to your server.
Now you should see a prompt saying ‘login as’, enter root. At the password prompt, enter the temporary password that was emailed to you when you created a new droplet. Then you will need to change the temporary password. You will be prompted for your current UNIX password. Enter the temporary password again. For new UNIX password, enter a strong password then you will need to re-enter the new password. That’s it! Don’t forget to save your new password.
Step 4: Easily Install WordPress on DigitalOcean
Visit your server’s IP address and install WordPress using the WordPress installer.
1. Select your preferred language. And click continue.
2. Add site title, username, password, email and then click install WordPress. It’s not recommended to use ‘admin’ as a username due to security concerns.
Now you should see the success page.
Click login and you will taken to the login page. On the login page, enter username and password and click login.
Congratulations! You now have a working WordPress install on DigitalOcean.
Step 5: Point your domain to DigitalOcean server
Now the remaining part is to point a domain to the WordPress install we created in previous step. For this we need to move to the DigitalOcean control panel. Once you are on the droplets page select ‘Add a domain’ as shown in the below image:
Now enter your domain name without the ‘www’. For example: thewebsitedev.com. Select your server and click ‘Create Record’ button. A new domain should take a few hours but a an old domain can take upto 48 hours to work.
You can add an ‘A’ record if you want your website to be available on ‘www.thewebsitedev.com’ rather than ‘thewebsitedev.com’. To do that enter ‘www’ as ‘A’ record name and your servers IP address under the IP Address field and click ‘Create A Record’.
Once your domain is online and you see your new WordPress install by visiting the domain (not IP address) then login to your website and replace the IP address with your domain name under settings > general.
Once you save settings, you will see that your webpage fails to load. That’s fine! It redirected you from your server’s IP address so that is why it won’t work. Just re-visit the website using just the domain name and it should work. In some cases it can take upto 15-20 mins for your domain to point to your server.
Conclusion
I think DigitalOcean is the best cloud hosting platform available today. One-click app installation makes it very easy to setup your website on a VPS. You will certainly feel the difference in website speed when you move over to DigitalOcean.
I will write another post on how to tighten up security for your DigitalOcean server running WordPress. So do subscribe to be notified via email when the new post is published.
Get $10 for free on DigitalOcean when you sign up using this link.