Skip to content

Learn how to create and deploy a WordPress website on the AWS platform step by step, including setting up a virtual computer, installing Apache web server, MySQL database, and WordPress, assigning a domain name, and securing the website with an SSL certificate.

Notifications You must be signed in to change notification settings

prajwalchapke055/Create-and-Host-Wordpress-Website-on-AWS-EC2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Create-and-Host-Wordpress-Website-on-AWS-EC2

Summary

Learn how to create and deploy a WordPress website on the AWS platform step by step, including setting up a virtual computer, installing Apache web server, MySQL database, and WordPress, assigning a domain name, and securing the website with an SSL certificate.

Highlights

🚀 Deploy a WordPress website on AWS EC2 using the traditional method instead of one-click installation. 🖥️ Rent a virtual computer on AWS EC2 and install Apache web server and MySQL database. 🌐 Install WordPress, a popular content management system, on the web server. 🔐 Assign a domain name and secure the website with an SSL certificate.

Key Insights

💻 Creating a virtual computer on AWS EC2 allows you to have full control over your website and customize it as per your needs. 🌐 Installing Apache web server enables the handling of HTTP requests and serving appropriate responses for your website. 🗃️ Setting up a MySQL database provides a reliable and efficient way to store and manage data for your WordPress website. 📝 WordPress, written in PHP, is a powerful content management system that allows you to create and customize your website without the need for coding. 🌐 Assigning a domain name to your website makes it easily accessible to users and enhances its professional appearance. 🔒 Securing your website with an SSL certificate ensures the protection of user data and builds trust among visitors. 💡 By following the traditional method, you gain a deeper understanding of the components and processes involved in hosting a website on the cloud.

Step-by-Step-Script

  1. Install Apache server on Ubuntu - sudo apt install apache2

  2. Install php runtime and php mysql connector - sudo apt install php libapache2-mod-php php-mysql

  3. Install MySQL server - sudo apt install mysql-server

  4. Login to MySQL server - sudo mysql -u root

  5. Change authentication plugin to mysql_native_password (change the password to something strong) - ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password by 'Testpassword@123';

  6. Create a new database user for wordpress (change the password to something strong) - CREATE USER 'wp_user'@localhost IDENTIFIED BY 'Testpassword@123';

  7. Create a database for wordpress - CREATE DATABASE wp;

  8. Grant all privilges on the database 'wp' to the newly created user - GRANT ALL PRIVILEGES ON wp.* TO 'wp_user'@localhost;

  9. Download wordpress A) - cd /tmp B) - wget https://wordpress.org/latest.tar.gz

  10. Unzip - tar -xvf latest.tar.gz

  11. Move wordpress folder to apache document root - sudo mv wordpress/ /var/www/html

  12. Command to restart/reload apache server - sudo systemctl restart apache2 OR - sudo systemctl reload apache2

  13. Install certbot A) - sudo apt-get update B) - sudo apt install certbot python3-certbot-apache

  14. Request and install ssl on your site with certbot - sudo certbot --apache

Output - Screenshots

AWS Console (Instance Running)

1

Apache2 Default Page

2

MobaXterm (Commands)

3

Wordpress Download Page / Link

4

Setup Wordpress

5

Login Wordpress

6

Hostinger Login

8

Sample Wordpress

7

YouTube Reference

9

About

Learn how to create and deploy a WordPress website on the AWS platform step by step, including setting up a virtual computer, installing Apache web server, MySQL database, and WordPress, assigning a domain name, and securing the website with an SSL certificate.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published