Wordpress
Information
This page is to capture things about wordpress to help my gorgeous wifey
Nginx
This is to capture the setup for nginx and wordpress
Example 1 wordpress.example.com
Here we have an example where we use the domain name no subfolder
server {
listen 9080;
server_name wordpress.example.com;
root /var/www/wordpress;
index index.php;
server_tokens off;
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$ {
fastcgi_pass unix:/run/php/php8.3-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi.conf;
}
}
Example 2 wwww.example.com/wordpress
Here we have an example where we use the domain name and do use subfolder
server {
listen 80;
server_name wwww.example.com;
root /var/lib/wordpress;
index index.php;
server_tokens off;
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$is_args$args;#=404;
}
location ~ \.php$ {
fastcgi_pass unix:/run/php/php8.3-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi.conf;
}
}