CMS/WordPress: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
// via Wikitext Extension for VSCode |
// via Wikitext Extension for VSCode |
||
| Zeile 52: | Zeile 52: | ||
server { | server { | ||
listen 80; | listen 80; | ||
server_name localhost; | server_name wordpress.localhost; | ||
root /var/www/wordpress; | root /var/www/wordpress; | ||
| Zeile 63: | Zeile 63: | ||
location ~ \.php$ { | location ~ \.php$ { | ||
include snippets/fastcgi-php.conf; | include snippets/fastcgi-php.conf; | ||
fastcgi_pass unix:/var/run/php/php8. | fastcgi_pass unix:/var/run/php/php8.4-fpm.sock; | ||
} | } | ||
Version vom 28. Januar 2026, 00:08 Uhr
Hinweis: Diese Inhalte wurden mit Unterstützung von Künstlicher Intelligenz erstellt und redaktionell überprüft (Transparenzhinweis gemäß Art. 50 EU AI Act).
WordPress-Datenbank auf Ubuntu einrichten
Um eine WordPress-Datenbank auf einem Ubuntu-Rechner einzurichten, folge diesen Schritten:
1. MySQL-Konsole öffnen
sudo mysql -u root -p
2. Datenbank anlegen
CREATE DATABASE wordpress DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
3. Benutzer anlegen
CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'dein_passwort';
4. Rechte vergeben
GRANT ALL PRIVILEGES ON wordpress.* TO 'wpuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;
WordPress herunterladen
cd $HOME
wget https://wordpress.org/latest.tar.gz
sudo tar -xzf latest.tar.gz -C /var/www
== Dateirechte für WordPress setzen ==
<syntaxhighlight lang="bash">
sudo chown -R www-data:www-data /var/www/wordpress
Nginx für WordPress konfigurieren
Erstelle eine neue Konfigurationsdatei für deine WordPress-Seite:
sudo nano /etc/nginx/conf.d/wordpress
Füge folgenden Inhalt ein:
server {
listen 80;
server_name wordpress.localhost;
root /var/www/wordpress;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php8.4-fpm.sock;
}
location ~ /\.ht {
deny all;
}
}
Aktiviere die Konfiguration:
sudo nginx -t
sudo systemctl reload nginx
Hinweis: Diese Inhalte wurden mit Unterstützung von Künstlicher Intelligenz erstellt und redaktionell überprüft (Transparenzhinweis gemäß Art. 50 EU AI Act).