WordPress auf Debian 12 installieren

In diesem Artikel:

Kategorie: , Linux: , , , , , , , , , , , , ,
apt update
apt upgrade
apt-get install nginx
systemctl start nginx
systemctl enable nginx
systemctl status nginx
apt-get install php php-mysql php-fpm php-curl php-gd php-intl php-mbstring php-soap php-xml php-xmlrpc php-zip mariadb-server mariadb-client
systemctl start mariadb
systemctl enable mariadb
systemctl status mariadb
systemctl start php8.2-fpm
systemctl enable php8.2-fpm
systemctl status php8.2-fpm
mysql_secure_installation
mysql

CREATE DATABASE wordpress_db;
CREATE USER 'wordpress_db_user'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON wordpress_db.* to wordpress_db_user@'localhost';
FLUSH PRIVILEGES;
exit
wget -O /tmp/wordpress.tar.gz https://wordpress.org/latest.tar.gz

tar -xzvf /tmp/wordpress.tar.gz -C /var/www/html

chown -R www-data.www-data /var/www/html/wordpress
chmod -R 755 /var/www/html/wordpress
nano /etc/nginx/conf.d/wordpress.conf

server {
        listen 80;
        listen [::]:80;
        root /var/www/html/wordpress;
        index index.php index.html index.htm;
        error_log /var/log/nginx/wordpress_error.log;
        access_log /var/log/nginx/wordpres_access.log;
        client_max_body_size 100M;
        location / {
                try_files $uri $uri/ /index.php?$args;
        }
        location ~ \.php$ {
                include snippets/fastcgi-php.conf;
                fastcgi_pass unix:/run/php/php7.4-fpm.sock;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        }
}
rm /etc/nginx/sites-enabled/default
rm /etc/nginx/sites-available/default
nginx -t
systemctl reload nginx

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert