Project: Wordpress installation on AWS
Launch Wordpress website using AWS
Introduction:
If you're ready to launch your website or start a blog, Amazon Web Services (AWS) provides a reliable and scalable platform to host your content. In this article, we will walk you through the process of installing WordPress on AWS, empowering you to create a professional and dynamic web presence.
Step 1: Login into AWS Account
To get started, head over to the AWS website and sign up for an account. Once you have successfully registered, you'll gain access to the AWS Management Console, where you can manage your services.
Step 2: Set Up an EC2 Instance
In the AWS Management Console, navigate to the EC2 service. Click on "Launch Instance" to initiate the process of creating a new virtual server. Choose an appropriate Amazon Machine Image (AMI) that includes a pre-installed version of WordPress. Popular options include the Bitnami WordPress stack or the Amazon Linux AMI with WordPress.
Step 3: Configure the EC2 Instance
During the instance launch, you'll need to select the instance type, configure the network settings, and set up security groups. Ensure that you allow inbound traffic on port 80 (HTTP),443 (HTTPS), port 3306(MYSQL/AURORA)and port 22(SSH) to allow web access to your WordPress site.
Step 4: Connect to the EC2 Instance
Once your EC2 instance is up and running, you'll need to connect to it via Secure Shell (SSH) to install and configure WordPress. If you're using Windows, you can utilize tools like PuTTY or the AWS Systems Manager Session Manager. For macOS and Linux users, the Terminal application and SSH command will suffice.
Step 5: Install LAMP(httpd,PHP,MariaDB) then start it and check status
sudo yum install httpd -y
sudo dnf install php -y
sudo yum install mariadb105-server -y
sudo service https start
sudo service php-fpm start
sudo service mariadb start
sudo service https status
sudo service php-fpm status
sudo service mariadb status
Step 6: Go to Apache web server directory using
Use this default path /var/www/html
create an index.php file into html folder
Step 7: Copy the public IP of your Ec2 instance(WordPress)
Step 8: Install WordPress and enter into WordPress folder
sudo wget wordpress.org/latest.tar.gz
sudo tar -xzf latest.tar.gz (for extras file)
cd wordpress/
Step 9: Setup wordpress
we need a database for WordPress so have to restart mariadb and create a database
sudo service mariadb restart
sudo mysql_secure_installation
sudo mysql -u root -p
create database wordpressdb;
use databases;
exit
Step 10: Connect the database to WordPress
for that, we have to go inside WordPress folder cd /var/www/html
cd wordpress/
after this go inside wp-config.php file sudo nano wp-config.php
add your database name, database user name and database password
Step 11: Install these commands
sudo yum install php-mysqli -y
sudo yum install php-gd -y
Step 12: Check WordPress website is ready or not
Enter this in the browser: your-instance-public-ip/wordpress/wp-admin/install.php
Step 13: Set the title for your project, add username and password
Step 14: Login by Username and password
Step 15: Create a website
click on Post on LHS
click on new
add the title of your project and description
then click on Publish
View your post
Conclusion:
By following these step-by-step instructions, you can quickly set up a WordPress website on AWS, leveraging the scalability and reliability of the cloud platform. Whether you're a beginner or an experienced developer, AWS provides a robust infrastructure for hosting your WordPress site, empowering you to focus on creating and sharing captivating content with your audience.