Integrated Tech Solutions

How to Host a WordPress Website for Free on AWS

By - Admin January 23, 2023

Install Apache

1) apt install apache2

2) systemctl status apache2

Install Mariadb
1) sudo apt install mariadb-server

2) sudo mysql_secure_installation

Install PHP & Dependancies

sudo apt install php php-mysql
sudo apt install php-curl php-gd php-mbstring php-xml php-xmlrpc php-soap php-intl php-zip

Configure Database

1) mysql -u root -p

2) CREATE DATABASE wordpress_db;

3) CREATE USER ‘wp_user’@’localhost’ IDENTIFIED BY ‘password’;

4) GRANT ALL ON wordpress_db.* TO ‘wp_user’@’localhost’ IDENTIFIED BY ‘password’;

5) FLUSH PRIVILEGES;

6) Exit;

Install WordPress

1) cd /tmp && wget https://wordpress.org/latest.tar.gz

2) tar -xvf latest.tar.gz

3) cp -R wordpress /var/www/html/

4) chown -R www-data:www-data /var/www/html/wordpress/

5) chmod -R 755 /var/www/html/wordpress/

6) mkdir /var/www/html/wordpress/wp-content/uploads

7) chown -R www-data:www-data /var/www/html/wordpress/wp-content/uploads/

Configure virtualhosts
cp

Check apache configuration
sudo apache2ctl configtest

Disable Default site
sudo a2dissite 000-default.conf

Enable New site
sudo a2ensite example.com.conf

Install Certbot
sudo apt install certbot python3-certbot-apache

Install SSL Certificate
sudo certbot –apache

Check Autorenewal of SSL
sudo systemctl status certbot.timer

Keep Reading

👋 Hi, Find this Helpful? There is More

You Asked,
We made it!

fix japanese keyword hack

Step by Step Video Tutorials on trending topics in software development

Yes I am Curious »

WordPress or React – How to choose the best Tech stack for your website

Are you still confused in picking the best Tech stack for your website? Choosing the right tech stack for your...

Know More »

5 Tips to Pick the Most Engaging Live Chat for Your Website

In today’s fast-paced digital world, providing excellent customer service is a key differentiator for businesses. One of the most effective...

Know More »