Step 1: Create an AWS Account
First things first: you need to create your AWS account. You can sign up here. You’ll have to provide a credit card and a phone number where you will be called as part of the online registration process for verification purposes. Amazon offers a Free Usage Tier, which is great to explore the services and even host real apps without being charged. Check the details here.
Step 2: Create an Instance
What type of EC2 instance should you use? I started my experiments with a Micro instance because its price structure is very attractive. However, after a few minutes to a couple of hours, my blog systematically became unresponsive and I had to restart Apache and/or MySQL. I did some research, and found out that other people were reporting similar problems. It may depend on your blog traffic. My blog typically gets a few thousand page views a day. It also hosts live sample applications running with a PHP or a Java back-end running on Tomcat. It looks like that combination was too much for a Micro instance. I tried a Small instance and the problems went away. Greg Wilson has a great post on the limitations of the Micro instance.
To create a new instance, access the AWS Management Console and click the EC2 tab:
- Choose an AMI in the classic instance wizard: I chose the Basic 32-bit Amazon Linux AMI.
- Instance details: Select the Instance Type you want to use. I chose Small (m1.small).
- Create a new key pair. Enter a name for your key pair (i.e. christophe) and download your key pair (i.e. christophe.pem).
- Select the quick start security group.
- Launch your instance.
Step 3: SSH into your Instance
Once your instance is running, you can ssh into it. First, you need to identify the address of your instance: Select the instance in the AWS Management Console, and look for the Public DNS in the instance description (bottom part of the screen).
Use that address (and a path to your .pem file) to ssh into your instance:
ssh ec2-user@ec2-50-17-14-16.compute-1.amazonaws.com -i ~/christophe.pem
If you get a message about your .pem file permissions being too open, chmod your .pem file as follows:
chmod 600 ~/christophe.pem
Many of the shell commands below require root access. To avoid having to prefix these commands with sudo, let’s just switch user once and for all:
sudo su
Step 4: Install the Apache Web Server
To install the Apache Web Server, type:
yum install httpd
Start the Apache Web Server:
service httpd start
To test your Web Server, open a browser and access your web site: http://ec2-50-17-14-16.compute-1.amazonaws.com (Use your actual public DNS name). You should see a standard Amazon place holder page.
Step 5: Install PHP
To install PHP, type:
yum install php php-mysql
Restart the Apache Web Server:
service httpd restart
Create a page to test your PHP installation:
cd /var/www/html
vi test.php
- Type i to start the insert mode
- Type <?php phpinfo() ?>
- Type :wq to write the file and quit vi
Open a browser and access test.php to test your PHP installation: http://ec2-50-17-14-16.compute-1.amazonaws.com/test.php (Use your actual public DNS name).
Step 6: Install MySQL
To install MySQL, type:
yum install mysql-server
Start MySQL:
service mysqld start
Create your “blog” database:
mysqladmin -uroot create blog
Secure your database:
mysql_secure_Installation
Answer the wizard questions as follows:
- Enter current password for root: Press return for none
- Change Root Password: Y
- New Password: Enter your new password
- Remove anonymous user: Y
- Disallow root login remotely: Y
- Remove test database and access to it: Y
- Reload privilege tables now: Y
Step 7: Install WordPress
To install WordPress, type:
cd /var/www/html
wget http://wordpress.org/latest.tar.gz
tar -xzvf latest.tar.gzcd
This will uncompress WordPress in its own “wordpress” directory. I like having WordPress in a separate directory, but would rather rename it to “blog”:
mv wordpress blog
Create the WordPress wp-config.php file:
cd blog
mv wp-config-sample.php wp-config.php
vi wp-config.php
- Type i to start insert mode.
- Modify the database connection parameters as follows:
define(‘DB_NAME’, ‘blog’);
define(‘DB_USER’, ‘root’);
define(‘DB_PASSWORD’, ‘YOUR_PASSWORD’);
define(‘DB_HOST’, ‘localhost’); - Type :wq to write the file and quit vi
Open a Browser and access your blog: http://ec2-50-17-14-16.compute-1.amazonaws.com/blog (Use your actual public DNS name). This should trigger the WordPress configuration process.
Step 8: Map IP Address and Domain Name
To use your blog in production, you will have to:
- Associate an IP address to your instance
- Map your domain name to that IP address
To associate an IP address to your instance:
- In the AWS Management Console, click Elastic IPs (left navigation bar)
- Click Allocate New Address, and confirm by clicking the “Yes, Allocate” button
- Right-click the newly allocated IP address and select “Associate” in the popup menu. Select the instance you just created and click “Yes, Associate”
To map your domain name to your IP address, you will have to use the tools provided by your domain registrar. If you use GoDaddy, specify NS73.DOMAINCONTROL.COM and NS74.DOMAINCONTROL.COM as the name servers for your domain, and use the DNS Manager to modify the A record and point to your IP address. Documentation is available here.
Once everything is configured and mapped correctly, access the General Settings in the WordPress management console and make sure the WordPress Address and Site Address are specified correctly using your domain name as in the screenshot below.
Pingback: Random Code » Codigos y mas codigos! » La segunda semana del 2012()
Pingback: Random Code » De un programador a otro programador » La segunda semana del 2012 » Random Code()
Pingback: Hello world! | codeRogue()
Pingback: Moved to Amazon EC2 - David Salmon Photography()
Pingback: AWS Elastic Cloud set up « oracleidentitymanagement()
Pingback: Hello world! | Trey's Hacker School Blog()
Pingback: Confluence: Humagine()
Pingback: Deploying WordPress into Amazon EC2 » ptylr.com()
Pingback: Anuka – The Worlds First Portable Electric Hot Smoker | Ear Disorders()
Pingback: Code by Zack | Intoduction()
Pingback: Martin Brennan()
Pingback: Tistory에서 WordPress.com 으로 포장이사 | Guruble Story()
Pingback: Displaying charts saved on EC2 server in web browser « somequantstuff()
Pingback: Site and blog moved to Amazon EC2 » Blog of addicted game developer()
Pingback: Site moved to Amazon EC2 » Blog of addicted game developer()
Pingback: Lovely, my first WordPress server | NoWorries()
Pingback: The Setup | BrewCode Blog()
Pingback: WordPress on Amazon EC2 | Layer Zero Blog()
Pingback: Setting Up WordPress on Amazon EC2 in 5 minutes | TechnoVeille()
Pingback: The Network Social | Andy Lenox's Blog()
Pingback: [AWS] setup a lamp with phpmyadmin on AWS ec2 | Developer Life()
Pingback: 五分钟在EC2上创建wordpress | 屌丝需要金克拉()
Pingback: Wordpress Install on Amazon EC2 | Solar Polar()
Pingback: Guide to Wordpress and Amazon EC2 Micro Instance | SkimFeed.com All The News Blog()
Pingback: Philly, Schools, and Code » Hello, World! (And….getting started on the cheap with EC2 Free Tier)()
Pingback: Special : ADP, Poltergeist, AWS and H264 | NightlyArt Library()
Pingback: Amazon Web Services()
Pingback: How to Set Up WordPress on Amazon EC2 - RainBear's Cafe()
Pingback: How to write Dreamtime Circles: A Journey in Web Technology | Dreamtime Circles()
Pingback: Setting Up WordPress on Amazon EC2 | Mikko Rusama Blog()
Pingback: Wordpress on ec2 | Ragnar's blog()
Pingback: Hello world! | Steve's Blog()
Pingback: HOW TO: Install Wordpress on Amazon EC2 | Jorge Chang()
Pingback: Launch your WordPress blog with JumpBox | Life runs on code()
Pingback: Getting Setup! | MattMcNaughton()
Pingback: In search of a new web host | Ardamis()
Pingback: PHP désormais suporté par Google AppEngine (GAE) ← Bruno Soufo Personnal blog()
Pingback: Set up wordpress on amazon ec2 in 5 minutes | Corporate Training()
Pingback: Updating Wordpress in Amazon Linux AMI | Blog de Devniel()
Pingback: Hello AWS, LAMP, WordPress!——个人博客建立手记 | lykFantasy()
Pingback: I just installed wordpress | wp.david-fox.com()
Pingback: Host Your Blog at Amazon Web Services and Why Is Amazon Amazing | Student of Value()
Pingback: Setting Up WordPress on Amazon EC2 | Yueyong Su's Blog()
Pingback: I’ve changed my blog hostname and I can’t login again Cambie el nombre del servidor de mi blog y no puedo ingresar de nuevo | Code & Chili()
Pingback: Setting up wordpress on AWS EC2. | Statistics, Data and Technology()
Pingback: » WordPress Site to AWS EC2 Server - Fay Pickering()
Pingback: Setting Up WordPress on Amazon EC2 | Try Remember()
Pingback: Credit Card Processing Service - Merchant Account()
Pingback: A Journey’s Start | Tech Journey Blog()
Pingback: Returning to a wordpress ec2 instance to find "AWS Elastic Beanstalk PHP application" | Technology & Programming()
Pingback: Weissint » Blog Archive » The First Post()
Pingback: Amazon and Microsoft Cloud for Podcasters | Raleighite.comRaleighite.com()
Pingback: Setting Up WordPress on Amazon EC2 | Yueyong Su()
Pingback: My first blog post | BPMathews Blog()
Pingback: Revisiting AWS-EC2 | GLdevelops()
Pingback: Setting Up WordPress on Amazon EC2 in 5 minutes | YourKnowledge.in()
Pingback: Setting up WordPress and Mediawiki on Amazon Web Services (AWS) | Motionclair Blog()
Pingback: Una presenza web 2.0 per un prodotto da vendere | TONY LEONE()
Pingback: Moving wordpress from shared host to aws ec2 | stlplace()
Pingback: AWS에 WordPress 설치하기 링크 모음 |()
Pingback: not able to map domain name 53 to EC2 instance | DL-UAT()
Pingback: Migrate your WordPress blog to EC 2 - Step by Step guide()
Pingback: Setting Up WordPress on Amazon EC2 in 5 minutes - PHP Blog Spot()
Pingback: WordPress on Amazon AWS EC2 Instance | Code Nooky()
Pingback: Configuring A WordPress Site On EC2 « Onor.io()
Pingback: Setting up WordPress with Amazon EC2… a breeze | Rasta Blog()
Pingback: Godaddy Ssh Su Command Not Found – Cyber Sun()
Pingback: How to Set Up a WordPress Blog on AWS | Functional Nerd()
Pingback: Amazon Aws Download Pem File | Cloud Computing Technologies()
Pingback: Install Godaddy Ssl Certificate Virtualmin – +ADw-/title+AD4 HACKED BY +AD4 ant07alya +ADw TURKHACKTEAM// HACKED BY +AD4 ant07alya +ADw TURKHACKTEAM// HACKED BY +AD4 ant07alya +ADw TURKHACKTEAM//+ADw-DIV style+AD0AIg-DISPLAY: none+ACIAPgA8-xmp+AD4-()
Pingback: Setting Up WordPress On Vps – Fast VPS()
Pingback: Setting Up WordPress on Amazon EC2 in 5 minutes - Chandan Dubey()
Pingback: Installing WordPress – Journey To AWS Cloud()
Pingback: Setting Up WordPress on Amazon EC2 | Happy to play with IT challenges()
Pingback: How did I create this Blog – Vineet Kulkarni()
Pingback: Managed WordPress Hosting Milford – Buy wordpress hosting()
Pingback: Buy WordPress Hosting In Wallace |()
Pingback: Buy WordPress Hosting In Clear Brook – Buy cheap wordpress hosting()
Pingback: Managed WordPress Hosting Lakeland – Buy wordpress hosting()
Pingback: Buy WordPress Hosting In Broad Brook – Buy cheap wordpress hosting()
Pingback: Managed WordPress Hosting Jamison | Buy wordpress hosting()
Pingback: Buy WordPress Hosting In Roxana – Web Hosting Guru()
Pingback: Buy WordPress Hosting In Moran – Web Hosting Guru()
Pingback: Managed WordPress Hosting Thelma – Buy wordpress hosting()
Pingback: Managed WordPress Hosting Broad Brook – Buy wordpress hosting()
Pingback: Buy WordPress Hosting In Moran – Buy cheap wordpress hosting()
Pingback: Buy WordPress Hosting In Thelma – Buy cheap wordpress hosting()
Pingback: Buy WordPress Hosting In Roxana – Buy cheap wordpress hosting()
Pingback: How to Create a WordPress Website (and Why I Did It) – My Blog()
Pingback: How to Host Your WordPress Site on Multiple AWS Server Instances - WPMU DEV()
Pingback: Getting a WordPress site up and running with AWS – mmanzella.com()
Pingback: Connect to AWS using Putty – Ankur Jha()
Pingback: Setting Up WordPress on Amazon EC2 in 5 minutes | Christophe Coenraets… – DevOps Infographics Resource Center – Programming and IT()
Pingback: Setting up WordPress on EC2 in 5 minutes… – DevOps Infographics Resource Center – Programming and IT()
Pingback: Let the challenge begin!!! – A Vegetarian's Journey – 6 Pack Abs()
Pingback: Let the Challenge Begin!!!! – A Vegetarian's Journey – Six Pack Abs()
Pingback: Take Control of your WordPress Website Backup – Startup Goose()
Pingback: Lessons Learned Setting Up a Blog on WordPress & AWS – Chris Smith-Hill()
Pingback: Setting Up WordPress on EC2 | IT Remote()
Pingback: Day 2 Create Blog – Yuhao CSA training()
Pingback: How to create a HTTPS WordPress Site easily and cheaply – a developer's perspective()
Pingback: Migrate your WordPress blog to EC2 – Step by Step guide | Tech Redefined()
Pingback: Steps to setup WordPress site on EC2 instance in 2-3 minutes - startedlate.com()
Pingback: Setting up WordPress on AWS – soupereffective()