-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStep-By-Step-Script.txt
58 lines (36 loc) · 1.62 KB
/
Step-By-Step-Script.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
YouTube video link: https://www.youtube.com/watch?v=8Uofkq718n8
YouTube Channel : https://www.youtube.com/@TechRaj156
Follow on Instagram : https://www.instagram.com/teja.techraj/
All the commands that are executed in the above YouTube Video are mentioned in this 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
cd /tmp
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
sudo apt-get update
sudo apt install certbot python3-certbot-apache
14. Request and install ssl on your site with certbot
sudo certbot --apache