Many of the new WordPress users face the problem of hosting their websites, and they waste a huge amount of time and energy searching for the proper hosting solution, they search for shared hosting solutions and even for the dedicated WordPress hosting solutions; but after that search they come to a single conclusion; none of these solutions offers the flexibility and reliability required to host a WordPress website.
Amazon Web Services (AWS) is one of the market’s most reputable and reliable IaaS (Infrastructure as a Service); the service offers a free tier which you can use an instance (an instance is a VPS: Virtual Private Server) for 750 hours/month for one year, you can use the free tier to host your WordPress website. This post will be a step by step tutorial on how to deploy your WordPress website on AWS (EC2) Windows Server 2008, and without further ado, let’s start:
- AWS free tier account; if you don’t have one visit Amazon; and click on the yellow tab seen below to start the registration process(warning: credit-card information is required to complete the registration process).
- Log into your AWS account, select the EC2 service from the services list.
- You’ll be then be directed to a new window; click on the blue (Launch Instance) tab.
- You’ll then be directed to a new window to select the AMI (Amazon Machine Image); select the “Microsoft Windows Server 2008 R2 with SQL Server Express and IIS – ami-1b5a7e72” image and lick on the blue “select” tab.
- You’ll then be directed to a new window to choose the hardware, select the micro instance (t1.micro) and click on the “Next: Configure Instance Details” tab not the blue “Review and Launched” tab.
- You’ll be directed to a new window; keep everything as it’s and click on the “Add Storage” tab.
- You’ll be directed to a new window; keep everything as it’s and click on the “Tag Instance” tab.
- You’ll be directed to a new window; call your instance anything you wish (e.g. WordPress, MyAwesomeWebsite, Monkey, etc.) and click on the “Next: Configure Security Group” tab.
- You’ll be directed to anew window; make sure that the settings are set as the screenshot below, click on the “Review and Launch” tab.
- You’ll then be directed to a new window, just click on the blue “Launch” tab.
- A window will popup where you shall create a “Key pair” to have access to the instance you’ve just created, select “create a new key pair” and give it a name (e.g. WordPress, MyAwesomeWebsite, Monkey, etc.), then click on the “Download Key Pair” tab, download the file on your computer and then click on the blue “Launch Instance” tab.
- You’ll then be directed to anew window, click on the blue “View Instance” tab. You’ll have to wait for 10~20 minutes, till your instance is initialized.
- Choose your instance from the list seen below, and click on the “Connect” tab.
- You’ll be prompted by a popup; first click on the “Download Remote Desktop File” and save it your computer, the RDP (Remote Desktop File is a shortcut icon that will connect you to your instance), then click on the “Get Password” tab.
- You’ll be prompted by a popup; you just browse to the key pair you’ve downloaded in step (10) and click on the “Decrypt” tab. Your password would appear just copy it to a notepad file a save it.
- Now, launch your instance using the RDP file you’ve downloaded in step (13), you’ll be prompted by the window seen below, click on connect.
- You’ll be directed to a new window to put your password (the one you’ve decrypted in step “14”) and username (Administrator).
- When your server starts, the first thing you should do is to go to the start menu >> Administrative Tools >> Server Manager.
- A new window will popup, click on the “Configure IE ESC” as seen below.
- A new window will appear, select the “off” radio button in the administrator section.
- First, you’ll need to download and install VC++ 2010 on your instance; Open the browser (of course on the instance not on your computer) and visit Microsoft (http://www.microsoft.com/en-us/download/details.aspx?id=5555) to download VC++ 2010 X86 and then visit (http://www.microsoft.com/en-us/download/details.aspx?id=14632) to download VC++ 2010 X64 (yes, you’ve to download and install both X86 and X64, otherwise you’d be prompted by error messages while installing WordPress).
- Download Microsoft Web Platform Installer from (http://www.microsoft.com/web/downloads/platform.aspx) and install it.
- At the beginning of the installation you’ll be prompted by a window; first go to “Applications” from the top menu and choose WordPress from the list, then click on the “Add” tab and then the “Install” tab.
- A new window will popup, just leave everything as it’s and type your password and click on the “Continue” tab.
- During the installation you’d be prompted by a window, just remove “wordpress” from under the “WordPress application name” and click on Continue.
- A new window will appear where you should put your “Authentication keys, etc.”, choose strong keys and keep them in a safe place, click on the “Continue” tab.
- At the end of the installation process you’ll be prompted by the finish window, don’t click finish yet, there’s a small link beside it “copy to clipboard” click it and paste it in a notepad file; these are the password and username for your MySQL, then click on finish.
- If everything goes well (if not go to the section after step 29) you’ll be prompted by the installation menu for WordPress. Just fill in the information required (Site Name, Password, etc.) and click install.
- A login window will then appear, fill it using your credential and “login”; Voila here is your new awesome website; if you don’t know how to use WordPress yet don’t worry click here to know where should you go to learn WordPress as a beginner.
- You can get the public DNS for your instance using the Amazon EC2 console (select the instance and check the Public DNS column; if this column is hidden, click the Show/Hide icon and select Public DNS). Then do to your domain registrar and point your DNS to your instance.
Now the most common problems during the installation:
- After clicking finish in step (26), WordPress didn’t start and you’re prompted by the “internal server error seen below”:
Don’t panic, just follow the following steps:
a. On your instance, go to My Computer >> C >> inetpub, you shall find a folder called “wwwroot”, right click it and go to the security tab.
b. You shall find a user called (IIS_IUSRS……….) click on the edit tab as seen below.
c. A new window will popup, just check the “Full Control” radio and click the “Apply” tab, a warning message will popup, just click “OK”.
d. Go to your browser and click on refresh and you shall find the installation page where you should install WordPress.
2. You can’t change your permalinks, again don’t panic and follow these steps:
a. On your instance, go to My Computer >> C >> inetpub >> (WordPress Installation), and find a file with the name “web.config” (if you can’t find it just go to the next step) open it and paste the following code between <System.Webserver>.