Install WordPress On AWS In Just 30 Minutes

How To Install WordPress On AWS - Ubuntu Linux Commands

Design your own website – Free Domain Name and Web Hosting

You must know why I have created this post about How To Install WordPress On AWS using Ubuntu Linux Commands only. This self-motivated hosting practice gives you confident about web development, creating online servers, managing web hostings, domain names etc. This is the core basic knowledge of Digital Marketing, Content Marketing and especially Blogging

Read this why you should start blogging.

Nowadays there are many third-party companies getting Cpanel or other dashboards too provide readymade installed Apache Server, PHP, MySQL and WordPress available for their customers.

But these companies shared or other premium hosting plan makes users website low page loading which consequently weakens SEO or overall performance of their websites. This post gives you detailed insights about How To Install WordPress On AWS.

Instead of this Install WordPress On AWS, I would recommend for cloud hosting for your WordPress website. If you have some financial reasons, then you can go with reputed Web Hosting sites like Bluehost.

I would recommend the use of one-year free AWS(Amazon Web Services) or Google Cloud Platform which has high consistent uptime for your website. After one year they will charge at least $17-$20 as quality service. It’s worthy rather than buying shared web hosting. If you can’t afford it then there is Bluehost is the best for you, available in the market. Good record and great support team.

Also Read –

Read this Before Earning Money Online [2019]
7 Top Strategies – Know Before Making Money Online [2019]
3 Secrets of Bruce Lee – Boosts your Strength and Inner Peace [2019]

But these cloud computing companies providing third party services for users to get WordPress installations. A third-party company like Bitnami. But why should one design his website using third-parties permission? It costs privacy and other issues.

Hence, I suggested this post about how to Install WordPress On AWS and I would recommend develop your own WordPress website using Linux command lines and be your own boss. Before that, we must know about installing ubuntu server.

Before that, you should have Putty and FileZilla software for managing server from your remote location. Get the Putty and FileZilla software from below links.

Let’s see how to Install WordPress on AWS it in an effective and secure way?

By installing ubuntu server on AWS we have to follow below steps to configure Ubuntu server.

Steps To Install WordPress on AWS Ubuntu 18.04 using Linux commands only –

#1.Install Apache
sudo apt update && sudo apt install apache2

#2.Configure Firewall
sudo ufw allow OpenSSH
sudo ufw allow in “Apache Full”
sudo ufw enable
enter “y”(yes)
sudo ufw status

#3.Install MySQL
sudo apt update && sudo apt install mysql-server
sudo service mysql status

#4.MySQL Security
sudo mysql_secure_installation
Hit “ENTER Button”
——Enter Strong Password
——Press Y and hit enter for 4-6 times wherever it asks for “Y/y”.
sudo mysqladmin -p -u root version

#5.Install PHP
sudo apt update && sudo apt install php libapache2-mod-php php-mysql

#6.Installing phpMyAdmin
sudo apt update && sudo apt install phpmyadmin
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
sudo a2enconf phpmyadmin.conf
sudo service apache2 reload

#7.Create MySQL User
sudo mysql
CREATE DATABASE dbname;
CREATE USER ‘newuser’@’localhost’ IDENTIFIED BY ‘password’;
GRANT ALL PRIVILEGES ON * . * TO ‘newuser’@’localhost’ IDENTIFIED BY ‘password’;
FLUSH PRIVILEGES;
exit

#8.Secure PhpMyAdmin — optional — db secured
sudo nano /etc/apache2/conf-available/phpmyadmin.conf
Alias /newlogin_name /usr/share/phpmyadmin —– after aditing new url name press ctrl+x again press y again hit enter
sudo service apache2 reload — Restart Must

#9.Enable .htaacess
sudo apt-get update
sudo a2enmod rewrite
sudo service apache2 reload
sudo nano /etc/apache2/sites-enabled/000-default.conf
1. <Directory “/var/www/html”>
           AllowOverride All
</Directory>

or

<Directory /var/www/html>
           Require all granted
</Directory>

2.    ServerName yourdomainname.com
       ServerAlias www.yourdomainname.com

#10.Configure Apache File
sudo service apache2 status —Test Apache Server
sudo nano /etc/apache2/apache2.conf — find the text “Options Indexes FollowSymLinks” and edit it
1. <Directory /var/www/>
         Options Indexes FollowSymLinks
         AllowOverride All
         Require all granted
</Directory>

2. (type below lines as it is, because characters are case sensetive)
<Directory /var/www/html>
         Options -Indexes
</Directory>

3.   ServerSignature Off
      ServerTokens Prod

(Press ctrl + X and then y and hit enter to save edited text)

#11.Install CURL
sudo apt-get install curl
sudo service apache2 restart
sudo apt-get install php7.2-curl
sudo service apache2 restart

#12. Installing SSL Certificate

(I strongly recommemd cloudflare CDN for Free SSL. Mapping cloudflare DNS to domain name hosting)

*******************optional******************************
You can use following comand lines to install free ssl but instead I use Cloudflare which provide free SSL and CDN

install SSL Certificate
sudo apt-get update
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install python-certbot-apache
sudo apachectl stop
letsencrypt –authenticator standalone –installer apache -d example.com
sudo service apache2 start
service apache2 restart

Setup SSH Key
sudo apt-get update
mkdir .ssh
cd ~/.ssh
touch authorized_keys
sudo nano authorized_keys
sudo nano /etc/ssh/sshd_config
prohibit-password
sudo systemctl restart sshd.service
service apache2 restart

*********************************************************

#13.Install wordpress
cd /var/www/html
sudo rm index.html
sudo wget https://wordpress.org/latest.tar.gz
sudo tar -xzvf latest.tar.gz
sudo rm latest.tar.gz ——- (to delete tar file from html folder)
cd wordpress/
sudo mv * ..
cd ..
sudo rmdir wordpress/ ——- (to delete extracted wordpress folder)

sudo mv wp-config-sample.php wp-config.php
sudo nano wp-config.php —- (edit db_name, db_user_name, db_pass press ctrl + x again press y and hit enter button)

Install WordPress

#14.Plugin, themes asking permission and other errors
cd /var/www/html/
sudo touch user.php
sudo nano user.php —- (In this blank area write below lines to get user anme and group name.)
*********************************************************
* #code to get usernam for wp_plugin ftp credential *
* <?php echo exec(‘whoami’); ?> *
**********************************************************

(After that enter your doamin name in the browser and add created new file name in the last as shown below;)

https://yourdomainname.com/user.php

(Hit eneter button and you will get www-data after that follow follow instructions for further modifications.)

sudo chown -R www-data:www-data /var/www/html/wp-content/

sudo chown -R www-data:www-data .*
sudo nano wp-config.php  —- (edit in this file and type below function or line )
define(‘FS_METHOD’, ‘direct’);
sudo service apache2 reload
————————–or———————————————
/*add your FTP credentials*
define(‘FTP_HOST’, ”);
define(‘FTP_USER’, ”);
define(‘FTP_PASS’, ”);
//*If you like and can use a SSL connection set this to true*
define(‘FTP’, true);
————————————————————————-

———-php directory————————–
#15. Special permsions in php directory
cd /etc/php/7.2/apache2/
sudo nano php.ini
(search —> max_input_time = 30
uplaod_max_filesize = 20M (“from 2M to 20M”) you can increase upto 500M
post_max_size = 50M (from 8M to 50M))

sudo service apache2 reload
————————————————–

# END All Installations

For any queries please feel free to ask. Just comment below I will answer as soon as possible.

For more detailed installation watch procedure on YouTube

Design your own website – Free Domain and Web Hosting AWS using Linux Commands Only [2019]

Get the Best WordPress Web Hosting with Free Top-level Domain Name – Recommended By Official WordPress

Install WordPress On AWS In Just 30 Minutes 1

Install WordPress on AWS – Watch Below Video till the End

Design your own website – Free Domain and Web Hosting AWS using Linux Commands Only [2019]

1 thought on “Install WordPress On AWS In Just 30 Minutes”

  1. Pingback: Start Your Own Online Business - Google Cloud and Wordpress [2019] | ExpertYUVA

Leave a Reply

Your email address will not be published. Required fields are marked *