Migrate any website to Amazon AWS EC2 in 5 Easy Steps


Lei , Sydney, Australia – Database lost; no accountability and willingness to resolve issue – DB for my WordPress site became empty suddenly overnight. I realised the issue and contacted support. Not only did #Justhost avoided responsibility and took no actions to resolve the issue, they blamed me as a consumer for not maintaining a current backup and not informing them of their failure in a timely manner. The website is commercial in nature and the downtime and #Justhost’s failure to protect my data has a direct financial impact on my business. The issue is still not resolved and I have still yet receive a adequate response from #Justhost as to the root cause of the issue. Avoid their service at all cost.


This tutorial explains the process by which you can migrate your website to AWS EC2 instance by using the terminal and a few commands This video shows both the static files and the database files being migrated.

The same process can be used for any website from WordPress, Joomla, Drupal, SugarCRM, etc.

Basil Abbas

50 Comments
  • J
    Posted at 17:03h, 07 November

    seems like a bad idea to make zip files of the entire site available for download without authentication.. perhaps more secure to zip the public_html folder and put it above root and download using sftp or something the general public cant access? – I would hat for someone to see my config files.

  • sree kanth
    Posted at 15:27h, 20 November

    Hey brother,
    I just bought a domain and i have designed my website now i want to upload the site to AWS, how can i do that? can you please make a video of it , please or guide me how can i do that? i would really appreciate if you can tell how can i create Amazon aurora data base for my website . currently i am creating with MySql because i don't know how can i create with Aurora, i hope you will help me

  • Trent Jessee
    Posted at 19:26h, 09 December

    Where do I download the SSH list of commands that you use in the video?

  • Awan Soekamto
    Posted at 01:49h, 10 January

    I have problem running this: I entered password for my database but it fails:
    It says: Access denied for user 'root'@'localhost' (using password: YES)

    I am pretty sure I didn't type 'YES' for my password.

    Thanks for your help.

  • Sajid Qureshi
    Posted at 14:43h, 15 February

    I have one website in ASP.NET C#. I want it to be Multi-tenant. For it want each tenant has different Database and url for it.I want to deploy it on AWS Amazon as SAAS App. Could you please tell me step by step process for deploy it on AWS amazon. How it is possible.EC2 or SC3.

  • jaideep singh
    Posted at 18:00h, 16 February

    sir i want to edit the php.ini file but not able to find it on aws . i was launching application on elastic beanstalk here msg shown . to lanching it .i have to edite php.ini file but i am not able to find php.ini file on aws.
    fixit..

  • mhmoud elhawy
    Posted at 18:34h, 19 February

    can you know how to connect my web app with aws iot

  • GAMAL KARM
    Posted at 18:44h, 11 March

    استذانا

    ممكن مساعدة في ذلك العمل

  • GAMAL KARM
    Posted at 18:44h, 11 March

    ياريت التواصل

  • RixCanDoit
    Posted at 22:50h, 24 March

    Thanks!

  • Abhishek Jain
    Posted at 09:05h, 08 May

    when i upload the .zip files and unzip them. As per the video, when I reopen the URL i should get an error stating 'Unable to establish database connection' but i am getting the same apache page. and in the end when i try to config wp, it shows me an empty page. Could you please help, where i may be going wrong.

  • Erwin Ancheta
    Posted at 07:34h, 10 May

    Is it possible that if you migrate, the URL will not change?

  • Peter Ang
    Posted at 09:52h, 28 May

    My upload hang halfway while uploading. What should I do?

  • utsav agrawal
    Posted at 19:19h, 03 June

    I get a 404 error page when i try to access the zipped files from the url to check if they are available . What can possibly be wrong ?

  • RaVvee Shankar
    Posted at 19:19h, 20 June

    very nice tut but command lines give me creeps

  • RaVvee Shankar
    Posted at 19:21h, 20 June

    wont the whole migration process be easy if we simply install a control panel at the ec2 end?

  • Anirudh Babbar
    Posted at 11:46h, 18 July

    i couldn't find, commands that you used in video in description 😉

    Please add relevant commands in description if possible.

  • Juan Perez
    Posted at 20:13h, 03 August

    Update and install PHP with mysql

    sudo yum -y update
    sudo yum install -y gcc make gcc-c++
    sudo yum install -y php55-mysqlnd php55 php55-xml php55-mcrypt php55-mbstring php55-cli mysql55 mysql55-server httpd24

    Start your engines

    sudo service httpd start
    sudo service mysqld start

  • Ranaivo Lalatiana NJATO ANDRIANARISON
    Posted at 12:29h, 07 August

    thank you sir… how about the other way how to migrate a wordpress site from AWS to another host. thing is that they ask me to pay a lot of money to continue… do you recommend me anything…

  • Tanuj Galhotra
    Posted at 12:43h, 30 August

    Hello Sir,

    I hosted a Magento website on AWS and now i want to host another website which is on WordPress on same instance of AWS on which Magento website is already hosted. I have word press website folder ready with sql database file
    Please Guide and advice who it would be done.
    ?

  • Daniel Tisone
    Posted at 23:44h, 13 September

    Hi Basil – great video! I was wondering is there a way to migrate all the e-mails as well or will I lose them all?

  • Edu Portal
    Posted at 13:59h, 22 September

    I am trying to deploy a Yii2 website from godaddy to EC2; I followed all steps in the video. I am able to see the index page but when I click on any other pages, it says page not found eventhough I can see all files/folders in var/www/html . I have also chaged DNS to Route 53 and updated NS on godaddy and created A record in Route 53. What should I do?

  • Jaidi Garzon
    Posted at 10:00h, 24 September

    Does it work from a localhost to amazon?.. Because I'm trying that, and when i use wget htpp://localhost…. it said:
    Resolving localhost (localhost)… 127.0.0.1
    Connecting to localhost (localhost)|127.0.0.1|:80… connected.
    HTTP request sent, awaiting response… 404 Not Found
    2016-09-24 09:55:25 ERROR 404: Not Found.

  • Sam Radian
    Posted at 10:09h, 05 October

    hey, mr. where is the code snippets.. your screen too small to screen cast

  • Sam Radian
    Posted at 10:10h, 05 October

    but itś a nice guru

  • Deepti Agarwal
    Posted at 01:57h, 28 October

    Hi, I have migrated the site as per your video. It worked. However only the website landing page is working other pages aren't? Would you have an idea how to fix that?
    http://www.watermillaccounting.co.uk

  • M Shahid
    Posted at 15:30h, 07 November

    wow can i make a website in mybb on it

  • M Shahid
    Posted at 04:26h, 08 November

    wow grate its mean 16tb space only 100$/year
    where i was before.
    i was paying 5gb to hosting a forum 5000 pkr.
    thnx sir

  • KAI CHEN
    Posted at 01:43h, 14 November

    Hi,
    I just want to ask one quick question. Does the migration just mean copy all the files from local to the cloud EC2 instance?

    I one of requirement from my cloud exam indicate that I have to migrate existing service such as WordPress to the cloud.
    The migration is the one-time thing or not? Do I need to keep replication between the local web server and EC2 instance?

    Thank you

  • Sanjeev Garg
    Posted at 06:44h, 03 December

    Amazon just launched lightsail. @basil Can you please provide a video to shift our website to amazon lightsail. They are reliable and cheap.

  • himani joshi
    Posted at 05:23h, 06 December

    hi. thanks.. amazing tutorial. Do you have any tutorial/help on how to link contact form Word Press site hosted in AWS server, to receive email on submit button. when the domain and email is with another service provider (Bigrock). Thanks..

  • Jamil Shaikh
    Posted at 15:59h, 04 January

    Amazing tutorial but you should have made text size a bit larger!!

  • Bharrath Reddy
    Posted at 06:21h, 09 January

    please post the commands list

  • Haier Flight
    Posted at 10:16h, 30 January

    Man, Your Accent, I could not understand at all. Unless I'm Indian

  • hosting provider
    Posted at 10:57h, 15 March

    i did every thing. i installed php ap[ache and mysql. on ect……… my website is giving error 500.

  • Sxlp Sxlp
    Posted at 14:34h, 09 April

    I did this with xampp but why does Amazon say that open beanstalk is used to deployed the site.

  • Sushil Chakrawarti
    Posted at 09:47h, 10 April

    When I am importing a database in phpmyadmin through linux commandas per your instructions, but I am getting a error like:

    Can't initialize batch_readline – may be the input source is a directory or a block device.

    How to fix it sir

  • svk 041994
    Posted at 19:10h, 15 April

    how to get c panel ? is it comes along with the aws ?

  • Claudia Vizcarra
    Posted at 01:14h, 10 May

    i can't see anything that you put in the command line… the image is too small…

  • Thakarshing
    Posted at 12:16h, 08 June

    where are the file commands you talk about ? you mentioned there was a link below the vid.

  • Text Approach Ltd - The Language Technology Agency
    Posted at 09:46h, 16 June

    Useless, you'll waste 18 min for nothing.

  • Sidheeque Tp
    Posted at 00:06h, 23 June

    plz give commands..

  • Don Wald
    Posted at 18:32h, 01 July

    fuck this nonsense

  • Shahed Bin Sultan
    Posted at 09:01h, 15 July

    You are a true genius Abbas Vhai.

    I will soon migrate my wp site to aws from go daddy and this video will help me a lot.

    Will it be possible to provide the list of commands you showed in the video?

    Thanks, Shahed

  • Akhil Sharma
    Posted at 05:15h, 25 July

    Abbas ji, aur videos upload karo thode. good stuff

  • Abdul Rehman Khan
    Posted at 04:55h, 09 August

    Step 1: sudo yum install httpd
    Step 2: sudo yum install mysql-server
    Step 3: sudo service httpd start
    Step 4: service mysqld start

    For details on what does each step is doing, read : http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-LAMP.html

    if there are any conflicts you need to yum remove some things, do read : https://stackoverflow.com/questions/29206795/how-to-install-php5-6-in-amazon-linux

  • Mahendra Singh
    Posted at 15:54h, 14 August

    Wrong way of doing things. If you go on like this. How will you scale this website to meet increased demands.

  • Manish Chavan
    Posted at 18:08h, 25 February

    Sir pls guide me which software you use for making such a fantastic video? Thanks in advance

  • Santosh Mallik
    Posted at 10:37h, 13 March

    I would like know if you offer classes for DATAbase ,Application and Server migration ?

  • vivek maurya
    Posted at 07:51h, 22 April

    Hi basil i need some help please let me know if you are available on whatsapp 8800111367