From Terminal go to the directory that contains <filename>.pem (the file contains your credentials to
access the EC2 instance.)
Change the permission of the file:
chmod 400 <filename>.pem
Connect to your EC2 instance:
ssh -i <filename>.pem
[email protected] (use your actual Elastic IP address)
Switch to superuser:
sudo su
Change to the root directory:
cd /var/www
Download the latest WordPress package:
wget http://wordpress.org/latest.tar.gz
Extract WordPress:
tar -xzvf latest.tar.gz
Move WordPress to the html folder:
rmdir html
mv wordpress html
Delete the WordPress tar file:
rm latest.tar.gz
Step 1: Install WordPress