Wednesday, March 11, 2026
Cart / 0 $

No products in the cart.

  • Login
  • Register
Bawabaa Digital Solutions
No Result
View All Result
  • Home
  • Products
    • Unlock Premium Access
    • Subscriptions
  • About
    • Terms and conditions
    • Privacy Policy
    • Refund Policy
  • Contact
  • Posts
  • Home
  • Products
    • Unlock Premium Access
    • Subscriptions
  • About
    • Terms and conditions
    • Privacy Policy
    • Refund Policy
  • Contact
  • Posts
No Result
View All Result
Bawabaa Digital Solutions
Home Main

WordPress Deployment on AWS EC2 (Red Hat / Amazon Linux)

Published on: February 14, 2026
Updated on: February 14, 2026

Domain: corepath.live
SSL: Let’s Encrypt
Stack: Apache + MariaDB + PHP


1️⃣ Launch EC2

  • Create EC2 instance (Amazon Linux / RHEL)
  • Open Security Group ports:
    • 22 (SSH)
    • 80 (HTTP)
    • 443 (HTTPS)

2️⃣ Install Apache

sudo yum update -y
sudo yum install httpd -y
sudo systemctl start httpd
sudo systemctl enable httpd

3️⃣ Install MariaDB

sudo yum install mariadb-server -y
sudo systemctl start mariadb
sudo systemctl enable mariadb
sudo mysql_secure_installation

Create Database

sudo mysql -u root -p
CREATE DATABASE wordpress;
CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'StrongPassword';
GRANT ALL PRIVILEGES ON wordpress.* TO 'wpuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;

4️⃣ Install PHP

sudo yum install -y php php-mysqlnd php-fpm php-json php-gd php-mbstring php-xml php-curl
sudo systemctl restart httpd

5️⃣ Download WordPress

cd /var/www/html
sudo wget https://wordpress.org/latest.tar.gz
sudo tar -xzf latest.tar.gz
sudo rm -f latest.tar.gz

Set permissions:

sudo chown -R apache:apache /var/www/html/wordpress
sudo find /var/www/html/wordpress -type d -exec chmod 755 {} \;
sudo find /var/www/html/wordpress -type f -exec chmod 644 {} \;

6️⃣ Configure Apache VirtualHost (HTTP)

Create file:

sudo nano /etc/httpd/conf.d/corepath.live.conf
<VirtualHost *:80>
  ServerName corepath.live
  ServerAlias www.corepath.live
  DocumentRoot /var/www/html/wordpress

  <Directory /var/www/html/wordpress>
    AllowOverride All
    Require all granted
  </Directory>
</VirtualHost>

Restart:

sudo systemctl restart httpd

7️⃣ Configure DNS (CRITICAL STEP)

At Hostinger DNS:

  • A record → 13.221.85.216
  • www → CNAME → corepath.live
  • ❌ Delete AAAA (IPv6) record

Verify:

dig A corepath.live +short
dig AAAA corepath.live +short

AAAA must return nothing.


8️⃣ Install SSL (Let’s Encrypt)

sudo yum install certbot python3-certbot-apache -y
sudo certbot --apache -d corepath.live -d www.corepath.live

Choose:

2 (Redirect HTTP → HTTPS)

Certbot automatically created:

/etc/httpd/conf.d/corepath.live-le-ssl.conf

9️⃣ Force HTTP → HTTPS (Manual if needed)

Edit:

sudo nano /etc/httpd/conf.d/corepath.live.conf
<VirtualHost *:80>
  ServerName corepath.live
  ServerAlias www.corepath.live
  Redirect permanent / https://corepath.live/
</VirtualHost>

Restart:

sudo systemctl restart httpd

🔟 Verify

curl -I http://corepath.live
curl -I https://corepath.live

Expected:

  • HTTP → 301 redirect
  • HTTPS → 200 or 302

✅ Final Result Architecture

User
   ↓
HTTPS (443)
   ↓
Apache (SSL via Let's Encrypt)
   ↓
WordPress (PHP)
   ↓
MariaDB

🧠 Problems You Solved

✔ DNS IPv6 conflict (AAAA record)
✔ Apache VirtualHost missing
✔ DirectoryIndex issue
✔ PHP not installed
✔ SSL validation failure
✔ HTTP → HTTPS redirect

Donation

Buy author a coffee

Donate
Share22Tweet14Share4
Previous Post

eCommerce Platforms Directory: List of Providers by Domain

Next Post

What is Screaming Architecture?

MOUSTAFA

MOUSTAFA

Technology, Engineering and Business Analyst

Categories

  • Main (78)

Recent Posts

  • WordPress Main Subjects – Complete Overview of Core Topics
  • How to Build a Multilingual WordPress Website: Methods, Pros, and Cons
  • Website / Project Development Hierarchy
  • WordPress Hooks Explained: Actions and Filters for Beginners
  • Software Adaptation Maturity Model SAMM
  • What is Screaming Architecture?
  • WordPress Deployment on AWS EC2 (Red Hat / Amazon Linux)
  • eCommerce Platforms Directory: List of Providers by Domain
  • Understanding Modules, Packages, Components, Libraries, Frameworks and Dependencies in Software Design
  • List of Curated YouTube Playlists
  • WordPress Conceptual System Model
  • Computer Science Courses on YouTube
  • Web Hosting Platforms Directory: List of Providers by Domain
  • Computation Theory
  • Software Building Blocks: A Modern Dev Guide
  • Software Architecture and Design
  • List Of Curated Websites
  • WordPress Development Services
  • WordPress Full Courses on YouTube
  • The “Green Padlock” on Localhost Cheat Sheet

HTML Content Title

  • Home
  • Products
  • About
  • Contact
  • Posts
WhatsApp: +201111128344

Bawabaa.com

Welcome Back!

Sign In with Google
OR

Login to your account below

Forgotten Password? Sign Up

Create New Account!

Sign Up with Google
OR

Fill the forms below to register

All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In

You cannot copy content of this page

  • Login
  • Sign Up
  • Cart
No Result
View All Result
  • Home
  • Products
    • Unlock Premium Access
    • Subscriptions
  • About
    • Terms and conditions
    • Privacy Policy
    • Refund Policy
  • Contact
  • Posts
SAVED POSTS

Bawabaa.com

Are you sure want to unlock this post?
Unlock left : 0
Are you sure want to cancel subscription?