Last active
September 20, 2021 04:59
-
-
Save dinushchathurya/a560e4e88097976d271d00c3c33f4331 to your computer and use it in GitHub Desktop.
AWS Wordpress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt update | |
sudo apt install apache2 | |
sudo ufw app list | |
sudo ufw allow 'Apache Full' | |
sudo systemctl status apache2 | |
sudo apt-get install mysql-server | |
sudo mysql_secure_installation | |
*VALIDATE PASSWORD plugin: No | |
*Type the root password & confirm it again | |
*Remove anonymous users: Yes | |
*Disallow root login remotely: No | |
*Remove test database and access to it: Yes | |
*Reload privilege tables now: Yes | |
sudo mysql -u root -p | |
CREATE USER 'test'@'localhost' IDENTIFIED BY 'Password'; | |
GRANT ALL PRIVILEGES ON *.* TO 'test'@'localhost'; | |
FLUSH PRIVILEGES; | |
CREATE DATABASE wp_aws; | |
exit | |
sudo apt-get install php libapache2-mod-php php-mysql php-curl php-gd php-json php-zip php-mbstring | |
sudo vim /etc/apache2/mods-enabled/dir.conf | |
<IfModule mod_dir.c> | |
DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm | |
</IfModule> | |
sudo service apache2 restart | |
wget https://wordpress.org/latest.tar.gz | |
tar -xvzf latest.tar.gz | |
sudo mv -f wordpress/* /var/www/html | |
sudo chown -R www-data:www-data /var/www/html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment