lnmp_mit_debian_10_fuer_wordpress_herrrichten
Wordpress Installation auf nacktem VServer bei Hetzner mit Debian 10
1 apt update
2 apt upgrade
3 apt-get install nginx mariadb-server mariadb-client php-cgi php-common php-fpm php-pear php-mbstring php-zip php-net-socket php-gd php-xml-util php-gettext php-mysql php-bcmath unzip wget git -y
4 nano /etc/php/7.3/fpm/php.ini post_max_size = 64M memory_limit = 256M max_execution_time = 300 upload_max_filesize = 32M
5 systemctl restart php7.3-fpm.service
6 mysql CREATE DATABASE wpdb; CREATE USER 'wpuser'@'localhost' identified by 'dbpassword'; GRANT ALL PRIVILEGES ON wpdb.* TO 'wpuser'@'localhost'; FLUSH PRIVILEGES; EXIT;
7 cd /var/www/html/
8 wget https://wordpress.org/latest.tar.gz
9 tar -xvzf latest.tar.gz
10 cd wordpress/
11 cp wp-config-sample.php wp-config.php
12 nano wp-config.php Adjust database settings 13 chown -R www-data:www-data /var/www/html/wordpress/
14 nano /etc/nginx/sites-available/wordpress.conf server { listen 80; root /var/www/html/wordpress; index index.php index.html index.htm; server_name example.com; access_log /var/log/nginx/wordpress_access.log; error_log /var/log/nginx/wordpress_error.log; client_max_body_size 64M; location / { try_files $uri $uri/ /index.php?$args; } location ~ \.php$ { try_files $uri =404; include /etc/nginx/fastcgi_params; fastcgi_read_timeout 3600s; fastcgi_buffer_size 128k; fastcgi_buffers 4 128k; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_pass unix:/run/php/php7.3-fpm.sock; fastcgi_index index.php; } }
15 ln -s /etc/nginx/sites-available/wordpress.conf /etc/nginx/sites-enabled/
16 systemctl restart nginx.service
17 systemctl restart php7.3-fpm.service
18 systemctl restart nginx.service
Weiter gehts mit: Server rudimentär absichern
lnmp_mit_debian_10_fuer_wordpress_herrrichten.txt · Last modified: 2021/08/10 13:30 by admin