Last active
October 19, 2022 07:38
-
-
Save chrisedrego/b1da5f3db1e47d426b93cb687297850a to your computer and use it in GitHub Desktop.
Setting up Wordpress
This file contains hidden or 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
apt update && apt upgrade -y | |
apt install apache2 -y | |
systemctl status apache2 --no-pager | |
apt install mariadb-server mariadb-client -y | |
apt install php php-mysql -y | |
mysql -u root -p'root' -e'CREATE DATABASE wordpress_db;' | |
mysql -u root -p'root' -e"CREATE USER 'wp_user'@'localhost' IDENTIFIED BY 'password'"; | |
mysql -u root -p'root' -e"GRANT ALL ON wordpress_db.* TO 'wp_user'@'localhost' IDENTIFIED BY 'password'"; | |
mysql -u root -p'root' -e"FLUSH PRIVILEGES"; | |
cd /tmp && wget https://wordpress.org/latest.tar.gz | |
tar -xvf latest.tar.gz | |
cp -R wordpress /var/www/html/ | |
chown -R www-data:www-data /var/www/html/wordpress/ | |
chmod -R 755 /var/www/html/wordpress/ | |
mkdir /var/www/html/wordpress/wp-content/uploads | |
chown -R www-data:www-data /var/www/html/wordpress/wp-content/uploads/ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment