WordPress installation on AWS EC2

WordPress is the most popular free and opensource content management system. Over the years WordPress has been evolved to become the most popular CMS in the world. There are over millions of developers and developing companies relaying on WordPress. It has features that includes plugins and templates. AWS supports wordpress implementation from single EC2 environment setup till load balancing and Autoscaling even through Elastic Beanstalk. We at easydeploy.cloud excel in setting up wordpress in AWS environment that is more secure, performance optimized, backup automated, and also https secured through Let’s encrypt free SSL, phpMyAdmin and many other features all together for just $100/setup.

The following steps will guide you through setting up wordpress on AWS EC2 (single server environment) with everything that is required to get started with wordpress development. For production please contact us through the sign up URL.

Setup WordPress for Me!

1. Launch a fresh server of your Desired OS(CentOS/RedHat Linux/Amazon Linux) to get started with the installation of WordPress on Amazon Web services EC2 instance.

2. Choose the instance type either t2.micro ,t2.small, t2.medium or t2.large. WordPress requires minimum of 1GB of RAM to function hence we have chosen t2.micro(AWS free tier) for this demo.

3. Change the default storage of 8GB to 30GB(included in free-tier). Of course WordPress can be hosted within 8GB storage. But It is better to choose 30 GB for the backup automation and for the accommodation of website content on a long run.

4. Allow the following inbound ports in AWS security group settings to gain access to 20-21(For WordPress FTP connection), 22(For Linux SSH),(WordPress over HTTP) 80,(WordPress over HTTPS) 443. You can also add desired ports later by editing inbound rules after launching the instance.

5.Now choose either existing key pair or create new key pair. In case of creating new key pair don’t forget to download the keypair and keep it in a safe place. Without key pair you cannot login to your WordPress EC2 instance. If you lose the keypair there is no other possible way to regenerate the same keypair. You only have to relaunch a new instance by taking an image of the current WordPress instance to gain access to your codes.

6. Now you can launch the  instance and once the instance is launched successfully attach the Elastic IP to the newly created wordpress EC2 instance. Attaching an Elastic IP will assign a static IP to your instance. So, that your instance’s IP will not change over the period. Say when you stop and start the instance. This will avoid unwanted downtime of your wordpress website .

7. Now you can login into server using public ip, keypair and install WordPress.

8. To install WordPress in AWS EC2 instance download and run the following installation script within the server .

cd /root

wget https://raw.githubusercontent.com/siru88/WordpressAmazonAMI/master/wordpressInstallAWSEC2.sh

8. The WordPress installation may take time to complete please be patient until the script completes execution, once the downloading is completed run the screen command to run the process in the background then run the sh command

chmod +x wordpressInstallAWSEC2.sh

/bin/bash wordpressInstallAWSEC2.sh

9.Upon execution the WordPress site will be ready to be launched. Please point the domain’s A record to server’s Elastic IP and then access the site and proceed with WordPress installation on the browser.

10. MySQL root login is placed in /root/.my.cnf and website database login credentials are placed in /home/ec2-user/db-login.txt web files are places in /var/www/html

Setup WordPress for Me!

Do not hesitate to write to us if you are running into issues. We are glad to help you.

Click me!