2020年3月1日 星期日

wordpress installation

install
sudo apt-get install nginx
sudo apt-get install mysql mysql-client
sudo install php7.2-fpm php7.2-common php7.2-mbstring php7.2-xmlrpc php7.2-soap php7.2-gd php7.2-xml php7.2-intl php7.2-mysql php7.2-cli php7.2-zip php7.2-curl
setup db
create database dbname;
create user ‘username’@’localhost’ identified by ‘password’;
grant all on dbname.* to ‘username’@’localhost’ identified by ‘password’ with grant option;
flush privileges;
download and install wordpress
cd /tmp && wget https://wordpress.org/latest.tar.gz
tar -zxvf latest.tar.gz
sudo mv wordpress /var/www/wordpress
sudo chown -R www-data:www-data /var/www/wordpress/
sudo chmod -R 755 /var/www/wordpress/
sudo nano /etc/nginx/sites-available/wordpress
sudo ln -s /etc/nginx/sites-available/wordpress /etc/nginx/sites-enabled/wordpress
setup wordpress
sudo mv /var/www/wordpress/wp-config-sample.php /var/www/wordpress/wp-config.php
get secure key from https://api.wordpress.org/secret-key/1.1/salt
sudo nano /var/www/wordpress/wp-config.php
setup ssl
sudo apt-get install python-certbot-nginx
sudo certbot –nginx -m admin@domainname -d domainname
enter A, Y, 2
server port allow 80 and 443

沒有留言:

張貼留言