Day 45: Deploy Wordpress website on AWS

Day 45: Deploy Wordpress website on AWS

What is Wordpress?

WordPress is the simplest, most popular way to create your own website or blog. In fact, WordPress powers over 43.3% of all the websites on the Internet. Yes – more than one in four websites that you visit are likely powered by WordPress.

Create Database:

Access database(Already database is up as i did in my previous blog)

mysql -h database-1.citn7gjwh00z.us-east-1.rds.amazonaws.com -P 3306 -u admin -p

Issue below commands and create credentials for wordpress.

 CREATE DATABASE wordpress;
 CREATE USER 'wordpress' IDENTIFIED BY 'wordpress-pass';
 GRANT ALL PRIVILEGES ON wordpress.* TO wordpress;
 FLUSH PRIVILEGES;
 Exit

Install apache server

sudo apt-get update && sudo apt install -y apache2

Verify if Apache server by accessing public IP.

Install WordPress on the server

wget https://wordpress.org/latest.tar.gz tar -xzf latest.tar.gz

Rename the config file.

Give wordpress credentials which we created above under DB_NAME/USER and DB_Password.

also DB_HOSTNAME:wordpress@rds database URL

Generate unique keys to put under same file to put under config file.

define('AUTH_KEY',         ']M{]S*~^v?C!#sU+lw_g~-%uob:ps9&|oLYMK)m(3z/Nb7Ek0c_2Du]GAu>X]H|M');
define('SECURE_AUTH_KEY',  '`l6FjiF`c4BT!-G_bQ`~b8}7a+^~?iO^y}|7<L)9u,w~i.^to4u?-6qO>l4jV4ah');
define('LOGGED_IN_KEY',    'pyUlY{Cz0YuhCiw))RWnt<Y+mVdi0|h)&Dc,<.-c+Ug?n#rcE>1;%62Jd}`vP^PZ');
define('NONCE_KEY',        'wceD1_6;[n9n%5}af]i>gR9y?I#LP-~^16)AN-0f,D+feRT&NtX4 _n@aj;G(LW%');
define('AUTH_SALT',        'q%:+_gu,5bFT%}SHJ/=Z81-b;Ym=LWY/51Ueu0v+A@n_|M%4inr6yyn:5[wCvo)}');
define('SECURE_AUTH_SALT', 'iTUz|! !3|E[$fJt&{@]Bwqm{UV=!O|MrL5z!!)9?)ep2NNR0JZE=0+^?YHQ<g?f');
define('LOGGED_IN_SALT',   'qqkkVuK1=0w9lV{}t64h`I2C^E2g,U|0d&$@j?T2tE>vC1{qg<|mkLVX?f=3-^G<');
define('NONCE_SALT',       'mIPvd|7@@75m|XM+5<}aG~*vEYKy2)UUc,mDKE&SzV6W?2*mYu+5f_mMT00(AoGH');

Install the dependency of the application on the server.

Copy the file contents from the WordPress folder to /var/www/html folder to configure the application with Apache web server.

Restart the apache server:

Navigate to <public IP>/wp-admin/ to view the WordPress website.

Happy Learning!!

Thank you for reading!! Hope you find this helpful.

#day45#90daysofdevops#devopscommunity#

Shubham Londhe