FREE CLOUD HOSTING WITH AMAZON (AWS) FREE TIER

AMAZON WEB SERVICES FREE TIER HOSTING
Besides leaving packages at our front door, Amazon runs a massive cloud computing operation branded as Amazon Web Services (AWS). Many companies, e.g., Amazon’s store, Netflix, Reddit, Pinterest, etc., use AWS to back their systems. Even some federal US government agencies employ AWS: NASA and the CIA.

As an incentive to new users, AWS offers a free tier of a selection of their products for the first year. The free tier includes a t2.micro instance web server:

1 vCPU @2.5GHz (Burstable to 3.3GHz)
1 GB of RAM
30 GB of SSD storage
Full features list.
This is great for designers/developers to power their WordPress website free of charge! The free tier would also be adequate for small businesses with low to medium net traffic. Since AWS is designed to be highly scalable, it is easy to scale the services as your demands increase.

SETTING UP THE AWS SERVER
This guide will walk you through the steps of creating your free AWS server.
Warning
The free tier has usage limits–you will be charged when these are exceeded.

STEP 1: SETUP YOUR AWS ACCOUNT
Navigate to http://aws.amazon.com
Set up your new AWS account
STEP 2: FIRE UP AN UBUNTU LINUX INSTANCE
Amazon provides a very detail guide on the proper way to set up an EC2 instance: Read the documentation.

STEP 3: INSTALL THE THE SOFTWARE PREREQUISITES FOR WORDPRESS
Once the server is up and running, we can being to install applications on our brand new Ubuntu server. To be able to run a WordPress server, we need to have a server (NGINX), a database (MySQL), and PHP.

Digital Ocean provides a fantastic guide on setting up the LEMP stack. Read the documentation.

STEP 4: OBTAIN WORDPRESS
This step will retrieve the latest installation of WordPress and put it on our server.

Fetch the latest WordPress installation

wget http://wordpress.org/latest.zip

Unzip & decompress WordPress

unzip latest.zip
view rawFetc WP hosted with ❤ by GitHub
STEP 5: SET UP THE DATABASE
We need to set up a database for our WordPress installation to store its data. The following instructions is for the command line–an alternative would be using PHPMyAdmin.

Login as the root user for MySQL

mysql -u root -p

Create the database using MySQL syntax

create database yourDatabaseName;

Create your WordPress username and password

create user yourUserName@localhost;
set password for yourUserName@localhost= password(“yourPassword”);

Grant privileges to your database

grant all privileges on yourDatabaseName.* to yourUserName@localhost identified by ‘yourPassword’;

Flush permissions and exit MySQL

flush privileges;
exit

view rawWPDatabase hosted with ❤ by GitHub
STEP 6: PROVIDE THE PROPER DATABASE CREDENTIALS FOR THE WORDPRESS INSTALLATION
This step enables the communication between WordPress and our database.

Copy the WordPress folder to the public_html folder

cp ~/latest ~/public_html/wordpress

Edit the config file to match our credentials

pico ~/public_html/wordpress

Edit the following fields to match the database credential that was previously established

/** The name of the database for WordPress */
define(‘DB_NAME’, ‘yourDatabaseName’);

/** MySQL database username */
define(‘DB_USER’, ‘yourUserName’);

/** MySQL database password */
define(‘DB_PASSWORD’, ‘yourPassword’);
view rawWPConfig hosted with ❤ by GitHub
STEP 7: CONFIGURE NGINX HOSTING OPTIONS
Nginx handles the requests coming into the server.

Edit nginx config file

sudo pico /etc/nginx/sites-enabled/wordpress

Enter the following block and save the config file

server {
listen 80;
root /home/ubuntu/public_html/wordpress;
server_name yourDomainName.com;
index index.php index.html index.htm;
location / {
try_files $uri $uri / /index.php?q=$uri&$args;
}

    error_page 404 /404.html;
    error_page 500 502 503 504 /50x.html;
    location = /50x.html {
        root /usr/share/nginx/www;
    }

location ~\.php$ {
    try_files $uri = 404;
    fastcgi_pass unix: /var/run / php5 - fpm.sock;
    fastcgi_index index.php;
    include fastcgi_params;
}

}
view rawnginxConfig hosted with ❤ by GitHub
STEP 8: TEST OUR SERVER
Restart nginx/php5-fpm
sudo service nginx restart
sudo service php5-fpm restart
view rawrestart hosted with ❤ by GitHub
Point your browser to your domain or IP address and you will be greeted with the WordPress screen!

Share on facebook
Facebook
Share on twitter
Twitter
Share on google
Google+