Basically the steps are straightforward for your old host
1. First is backup all your files
2. Backup the database.
Next series of steps are for the AWS side, first is to create an account
3. Create an account by signing up at aws.amazon.com and go through all verification to get your account activated.
Next setup EBS and launch an instance
4. Go to the AWS console and select the EC2 link(previously tab)
5. Next select a Region
6. Go under Elastic Block Store and choose Volumes
a. Click Create Volume, you can have up to 30GB EBS size with your Free Tier, select availability zone, no snapshot and Standard volume type.
7. Next to go to Instances link and click on Launch Instance
a. Go with the Classic wizard and select the AMI available(I selected Ubuntu Server)
b. On Instance Details, select 1 instance and Instance Type as Micro(t1.micro, 613MB), select availability zone or no preference.
d. Continue to next page with default options selected
e. Download the Keypair in a safe location
f. Select a security group
g. Finally launch new instance
7. Once Launched, you need to go to the EBS section then click on Volumes, select the EBS created earlier on step 6, click on More then choose Attach Volume and select the newly launched instance.
8. Next is to configure the firewall go to Security Groups and select the default, click on the Inbound tab, add the following ports 22 for SSH then Apply Rule to save it.
9. Finally go to Elastic IPs and click on Associate New Address, on EIP select EC2, select the new IP and click on Associate Address and assign it to the new Instance.
Accessing the IP should now load the default apache page.
Accessing your new instance via SSH and SFTP
This next series of steps is for accessing the server to be sure LAMP is working right. In summary you need to make sure Apache, MySQL and PHP are running luckily by default on Ubuntu this should all be loaded.
For SSH and MySQL setup
1. From the downloaded keypair earlier, you need to connect via Command Line, for Mac users you can open the Terminal, for Windows users you can download putty.
To login enter the command
#ssh -i mykeypair.pem email@example.com(Replace with your IP)
2. Once you are able to login you’ll be logged in as the ubuntu user, to get around things you need to either add sudo or quickly change to root by command
3. Go to your mysql via, initial installation does not have a password
4. Add a password for the root and create a new user with grant all privileges. This should be the the new user/password in your wp-config.php file.
5. Create new database.
#create wpconfig database;
5. By being a little more savvy you can load the backup.sql file without using phpMyAdmin, but first you need to FTP the file by following the steps below.
Then access the file on mysql by dumping it
# sourcedump wp-backup.sql;
Finally time to SFTP and upload your files.
1. Download an FTP client like Filezilla
2. For Mac users, Launch Filezilla and choose Preference, select SFTP and click on Add Keyfile and select the keypair downloaded earlier, it should detect that its not the in the .ppk format and offers to create it for you, so just proceed.
3. Finally create a new Site by entering the Name of your site, the Host name which is the IP address, then Protocol choose SFTP and for the Logon Type choose Normal, and select Ubuntu as the user and password leave it blank.
4. Once logged in go to /var/www and upload your WordPress backup files, edit to the wp-config.php file
5. Make sure to change the file permission for the wp-content folder
Redirect your domain.
That should be it. Now for shared hosting we deal with DNS, but with Amazon EC2 we deal with A and CNAME records. Depending on your Domain Registrar create a new record and point the A or CNAME record to the IP address.
That should be it. If you have some questions just drop a note. Enjoy