Are you using shared hosting? Has it ever happened with you that your website gets slowed down so much that you start losing your business?
If you answer is no then I would like to Congratulate you because you are doing great. Please comment in the comment box below and tell us which cloud infrastructure provider you are using. It will be of great help to all my website users.
And, if your answer is yes, then don’t worry because I have found an amazing solution for you all. Curious to know what is that solution?
That solution is “DigitalOcean”. DigitalOcean is one of the leading cloud infrastructure providers in the world. It provides “VPS Hosting”.
A slow website is extremely annoying. I can understand how infuriated you feel when you are using a shared hosting plan provided by Godaddy, HostGator, iPage etc. and your server slows down because I too have been hosting many of my websites on these plans.
I got to know about DigitalOcean one day when I was facing a horrible downtime. I planned to write blogs on some important topics but my website was sometimes too slow and sometimes it simply failed to be accessed. That was unbearable for me! That was the day when I finally decided to do away with “Shared Hosting” and switch to “VPS Hosting”. But when I enquired about VPS Hosting price, I was shocked. Managed VPS hosting that generally has cPanel is high-priced and I did not want to spend so much that time.
After several days I found a VPS hosting provider “DigitalOcean” (Phew! That was an exhausting but a satisfactory search because DigitalOcean’s prices are comparatively less than other VPS hosting provider). Honestly, I was worried initially about how will I set my own server there, put WordPress in place and then transfer all my websites from shared hosting to a new server. DigitalOcean’s servers are controlled via Linux terminal.
Now, when I have successfully transferred all my websites from shared hosting to DigitalOcean (Yes, it took some time to learn all the functions but it is really worth it!), my websites are working faster (almost thrice the speed of websites when I was hosting them on shared hosting) which is making me happier and I am able to do good in my business.
Therefore, I am writing this blog to help all those people who are facing downtime and want to transfer their websites from shared hosting to DigitalOcean.
Read the step by step procedure below-
Step 1: Creating a DigitalOcean account
$5 a month for one DigitalOcean droplet (DigitalOcean’s server) is the cheapest plan. According to me, this plan is the best plan for you if you are a small or a medium website holder because in this plan you will get 512 MB RAM and 1 core CPU. I am also using this plan. I host 7 websites on one DigitalOcean server droplet and trust me all is going smoothly; I am not facing any issue using it. With just one click of a button to resize your DigitalOcean server (droplet) and a good cache plugin, you can handle much more visitors.
Suppose you are featuring your website on Scoop.it and you receive more than 40,000 visitors in a day, you can temporarily resize droplet for adding more RAM and CPU power and pay it on hourly bases. This activity is a must to smoothly let your website grow. Resizing is way too easy in DigitalOcean, you can always upgrade your server every now and then without even transferring everything another time.
Step 2: Take Backup of your website
Install the UpdraftPlus plugin and activate it after logging in to your WordPress Website as an Admin.
- Move to WordPress Admin Dashboard.
- Select the “UpdraftPlus Backups” from settings.
- Select “Backup Now” and also select “Include any files in the backup” and “Include the database in the backup”.
- Click on the “Backup Now” and wait until the backup is completed.
- Then go to the “Existing Backups” tab. Now, you must be seeing a “Backup data” section. Click on all buttons and download all backup files in a folder that you can access easily later on.
- Now that you have all the files that are needed to be transferred to DigitalOcean, you can continue to create a droplet on DigitalOcean.
Step 3: Create your droplet on DigitalOcean
- Login to your account on DigitalOcean
- Select the “Create Droplet” option present at the top right corner on the DigitalOcean user interface.
I’ll recommend you to choose Ubuntu droplet on DigitalOcean.
- Choose the size according to the numbers of visitors you receive in a month
(Confused on what plan to choose?
Don’t worry, as I have used DigitalOcean since long I can guide you on this as well. If you expect up to 20,000 visitors a month, choose the $5 plan in which you will get 512 MB RAM & 20 GB SSD and if you are planning to host multiple websites on one droplet or need more SSD storage space then choose the $10 or $20 plan. )
- As DigitalOcean has been stretching its options for server locations. You will now have to pick a datacenter region (keeping in mind the region you are expecting your visitors from)
- There are other additional options you can choose from.
Mind it, if you choose “Backups” it will monthly add 20% cost to your droplet.
- Add SSH Keys (It is a common way to connect securely to remote machines). It is completely up to you if you want to add them at this moment or later on. I actually find it more convenient to use SSH keys later on.
- Choose a hostname for your server.
If you have not yet decided your hostname, you can keep a random name as of now. Hostname can be changed later on as well.
- Create your hostname and wait till your server is created.
- Login to the email Id you used at the time of registration and open the email you received from DigitalOcean. In this email, DigitalOcean has sent you the IP address and the password of your server (droplet/VPS).
- Now change the password of your droplet, click on “droplets” and select the droplet created by you.
- Click on “Access” now.
- Click the “Console Access” button. A pop-up window will appear in front of you. Click anywhere on the black screen and press enter.
- Now Linux will ask for your login username. Type “root” (Ignore double quotes “”). Then enter to submit.
- Enter the password you received in the email sent to you by DigitalOcean. (You will have to enter the password in the terminal manually as copy-paste does not work there)
- Now, for security reasons, you will be asked to change the password by Linux. Choose a strong password that nobody will be able to crack it!
Step 4: Install all Programming Languages
As nobody wants to waste time I will recommend you all to create an account on Server Pilot to get all the programming languages (PHP, MySQL etc.) because installing them takes a lot of time. Server Pilot does not charge you!
- Login to your Server Pilot account.
- Select “Servers” and then select “Connect Servers”.
- Now, check the email sent to you by DigitalOcean after launching your droplet. There is an IP address. Enter that IP address now.
- Enter the new password that you set in step 3.
- Enter a server user password for Server Pilot. (Keep on jotting down the name of the server and it’s passwords on a piece of paper so you don’t get jumbled up with passwords).
- Now hit the “Connect to Server Pilot” button and wait till you are connected to your server. It will install PHP, NGINX and other necessary stuff.
- Now, select your server name and then click “Create an App”.
- In this “Create an App” window, enter-
- Your website name (Don’t use any com or dots or anything like that. It should be just your website name. Like Digi Hub Post)
- Your domain name you want to transfer your files to (Don’t use http:// )
- Check the WordPress check box.
- When you will tick the check box, you will be asked to enter a title then WordPress User, Password and email of your current website that you are transferring to DigitalOcean.
- Select the latest PHP version in runtime.
- Click “Create App” and wait till the time a WordPress Website is created on you server.
Step 5: Relocate your files
Now, that WordPress website is created for your server we are almost through!
Enter your server’s IP address in your browser and hit enter. You will see a new WordPress website on your screen like this:
(Try to find another image in which you Meta heading is available)
- Click “Login” under “Meta” that is available in the right sidebar.
- Now you need to enter the username and password of your website that you are hosting on shared hosting.
- Go to “Plugins” and then click on “Add New”.
- Search for “UpdraftPlus” then install and activate it.
- Now go on settings and select “UpdraftPlus Backups”
- Click “Restore” and then “Upload backup files”.
- Repeat step 2 of this tutorial to open the folder with your “UpdfaftPlus backup” files
Drag and drop all selected files.
- Click “Restore”
- Choose all units and then click “Restore”. Then wait till everything gets installed.
- Congratulations! Now your website is ready and working. You can go and check it by visiting to your server IP address.
Now, just make sure that your domain name points to your DigitalOcean Server (droplet).
Move to your domain provider from which you just unregistered yourself (I unregistered myself from GoDaddy and moved to Digital Ocean) and change the DNS (Domain Name System) to the following names:
Step 6: Change and Configure Domain DNS (Domain Name System)
- Now login to your account on DigitalOcean. Select “Droplets” then hover over “More” and select “Add a Domain”.
- Write your domain name ( Don’t write World Wide Web (WWW) with your domain name)
- Hit the “Create Record” button.
- Click CNAME under “Select Record Type”.
(Write digihubpost.com. in hostname)
- In name, write WWW.
- In hostname, enter your domain name and put a dot in the end (Don’t write WWW in hostname).
- Hit “Create CNAME Record”.
Now everything is done from your end. You just have to wait for 48 hours until the Domain Name System gets updated. (Sometimes it may take several hours for the DNS to get updated).
Enter your domain name on the browser. What do you see?
Congratulations! Now you will see that your website is hosted on the leading cloud infrastructure provider, DigitalOcean.
Do you want to host multiple domains on one DigitalOcean Server (droplet)?
If you have read the above tutorial thoroughly, you will find it very easy. And if you have not read it carefully, make sure you go through this tutorial again before transferring another domain to droplet.
Follow these steps to host multiple domains on one droplet:
- With the help of step 2 of this tutorial, back-up the secondary sites that you wish to transfer to the very droplet you transferred sites in the above step.
- Visit “Server Pilot” and choose your server there. After choosing your server, create another app like you did earlier (Select WordPress this time too).
- After selecting WordPress, enter the name, domain, user and password of the website you are trying to transfer now.
- Now, go to your DigitalOcean server (droplet), select “Add Domain” and then add the secondary domain (refer to step 6 of this tutorial if you face any trouble doing that).
- Alter the Domain Name System (DNS) of the secondary domain you are transferring to DigitalOcean’s DNS server.
- Now you will find a new WordPress website when you go to your domain. Login there, install “UpdraftPlus” and then upload the backup files.
That’s it! Your secondary domain is also added to your droplet. If you want to add more domains to this droplet, just repeat the steps given above but don’t forget about the storage you are getting in your plan. (:p)
Good Luck transferring your website to Digital Ocean! J
If you liked this tutorial, then don’t forget to share it.