YouTube video link: https://youtu.be/8Uofkq718n8 All the commands that are executed in the above youtube video are mentioned in this gist.
-
Install Apache server on Ubuntu sudo apt install apache2
-
Install php runtime and php mysql connector sudo apt install php libapache2-mod-php php-mysql
-
Install MySQL server sudo apt install mysql-server
-
Login to MySQL server sudo mysql -u root
-
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';
-
Create a new database user for wordpress (change the password to something strong) CREATE USER 'wp_user'@localhost IDENTIFIED BY 'Testpassword@123';
-
Create a database for wordpress CREATE DATABASE wp;
-
Grant all privilges on the database 'wp' to the newly created user GRANT ALL PRIVILEGES ON wp.* TO 'wp_user'@localhost;
-
Download wordpress cd /tmp wget https://wordpress.org/latest.tar.gz
-
Unzip tar -xvf latest.tar.gz
-
Move wordpress folder to apache document root sudo mv wordpress/ /var/www/html
-
Command to restart/reload apache server sudo systemctl restart apache2 OR sudo systemctl reload apache2
-
Install certbot sudo apt-get update sudo apt install certbot python3-certbot-apache
-
Request and install ssl on your site with certbot sudo certbot --apache