We are in a changing world where technologies are becoming too fast. If we want to stay in the market, we must do the same with our web and mobile applications. Innovation in the use of technologies within your application is very important for the performance of the same, with particular emphasis on your hosting provider. It is very common for the owners of applications or sites with basic experience, to choose popular suppliers in the market and known for their low prices but the reality is that hosting services are available cheaper. I’ll tell you a little about HostGator, one of the most popular hosting services in the world, but not the best one. Here, discover the reasons for migrating your HostGator web application to AWS.
Table of contents
- The best hosting service
- What benefits do I get with AWS?
- Steps to migrate from HostGator to AWS
- Have a copy of the database
- Instance EC2
- RDS Instance
- To sum up
At first, HostGator might seem like the best option for startups, because it’s cheaper and easier to set up on a website, but its packages are cheaper only if you book the service for one year or more. Another thing that should not be forgotten is that the cheapest HostGator plans are shared servers, what does this mean?, a server which is used by many other users and shares the same server resources with others.
Explaining it in a more straightforward way (for those with less experience), you will be sharing the hard disk space, the RAM, CPU, etc., of the same PC with other users who have also opted for the shared plan (in this case) of HostGator.
Which cause the following problems:
- Unfortunately, this can cause your website to load slower, especially during high traffic hours, which could affect the experience of visitors to your website.
- The security of your site is affected if you share the hosting with someone with bad security tactics in their programming or passwords.
In these cases, the server is usually accessed through CPanel, a basic control panel that allows you to configure some things on your site such as email accounts or FTP users, but this does not allow you to customize the entire server and Take advantage of all resources. With it, you do not have the flexibility to decide which version of database or web service will be used to configure or adapt the application. HostGator might seem like a good option, but in reality, it is not. As we have seen, it is very limited at the moment of growth.
The best hosting service
The best alternative for many infrastructures in the world is the Amazon hosting service (AWS). It is an on-demand service that charges the use of the server for the time it has been used. The instances of AWS are similar to those of HostGator, with the big difference that with Amazon Web Services you can have total control of the server and the possibility of increasing the resources in it.
The best part is the constant innovation in all its processes. With AWS you can be sure that you have the best technologies since, year after year, it adds new services for the optimal use of resources in the cloud. To be aware of these improvements, Amazon creates events such as Re-Invent every year where it announces updates, services and its technological advances.
What benefits do I get with AWS?
Amazon Web Services is not a simple hosting service; it allows to create complex infrastructures in the cloud, providing higher performance, security, and scalability in the application. When it comes to a startup application, we can start by creating a base environment with specific instances that will process the website code (EC2) and have the database storage with high availability (RDS).
As it also allows you to select the operating system, the programming language, the web application platform and the database.
In conclusion, you will have at your disposal a scalable, secure and trusted global IT infrastructure with AWS.
In terms of security, which is an issue of importance to all companies, AWS, unlike common hosting services such as HostGator, has its own internal network, which means that databases and storage files are protected by the AWS network, making the databases accessible only for the instances that we specify.
While the security of EC2 uses the default access method, a private key that is generated in the installation process and that allows access by SSH in a secure manner, without exposing any password to the outside, therefore it makes it impossible to access as a root user To the system.
- Easy to use
- Scalability and high performance
Steps to migrate from HostGator to AWS:
Get a copy of DocumentRoot:
1. Go to your CPanel account.
2. In the menu, select “File Manager”.
3. It will open another page where we will see all our documentRoot. Select the one that we want to migrate and press the compress button.
4. We will display another screen, select the type of compression; in this case, use Gzip Tar Archive. Press compress File (s).
Have a copy of the database:
1. In the cPanel, we go to the phpMyAdmin section.
Then we will open PHPMyAdmin, select the BD and press Export.
Press the “Go” button and download the database.
It is very easy to start with the creation of the instance EC2 (Elastic Compute Cloud). EC2 allows users to rent virtual computers in which they can run their own applications.
1. Log in to our AWS account.
2. Go to services and select EC2.
3. The following box will appear and select Launch Instance.
4. It’s about selecting the operating system we want; Amazon Marketplace has a wide variety of free operating systems available to us, including the latest versions such as Ubuntu 16.04 LTS, CentOS 7, 8 Debian, and its own operating system called Amazon Linux, based on CentOS.
In this case, we select ubuntu.
5. After selecting the operating system that we consider best for our needs, select the type of instances, in this case, t2.micro will suffice.
6. Select the Review and launch button.
It will put the default configurations of AWS, such as your VPC and storage in 8GB, etc.
AWS is incredibly cheap in its storage space, about $ 0.10 per GB in an SSD.
7. Press the launch button.
8. Create our pem key with the name we want, download it and launch the instance. (Keep the pem well because that is what will give us access to the EC2 instance).
With this, we will have finished our instance EC2.
To start the RDS instance (Regional Database), we will follow a similar process.
This instance works to assign the database, with the difference that it will show us the engines and versions available for SQL databases, engines such as MySQL, Maria DB, Oracle, SQL Server, PostgreSQL and Amazon Aurora (an optimized version of MySQL 5 faster times).
1. Go to services and search Relational Database Service.
2. Press the Get Start Now button.
3. Select the type of database. (Amazon Aurora)
4. Press the next button.
5. Select the type of instance for the database and we also fill in the following fields.
6. In the next step, you can leave all the settings as they are by default, but you can also specify your VPC, here you will have to do it every time a backup is made, etc.
7. Finally, press the launch button bd.
Extra information :
Access the EC2 instance:
ssh -i “example.pem” ubuntu @ IP
Or, let’s go to where is your instance EC2. Find the connect button, press it and it will tell us how to connect.
To sum up
A website should be hosted on the best hosting service with a maximum investment of $50 USD on the infrastructure per month. AWS provides the possibility to grew up without restrictions and with high performances by only using the best configuration to take advantage of the server resources, with a hard security and an adaptable service for every kind of app.
If you use WHM/CPanel to manage your server or hosting and you want to improve your WordPress, read our blog to realize a correct migration to AWS.
Migrating an app, either startup or not, is an easy activity but it requires a specialized knowledge, we tell you why to Migrate Your Application from Rackspace to AWS. If something goes wrong the cost will overgrow. Here in ClickIT, we’re in charge of migrations of all kinds, migrate your website or application to AWS with us, MotivApp trusted ClickIT.