User Tools

Site Tools


servers:windows:nginx:wordpress

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
servers:windows:nginx:wordpress [2025/05/30 14:51] Sean Rhoneservers:windows:nginx:wordpress [2025/06/14 21:10] (current) – [Prerequisites] Sean Rhone
Line 7: Line 7:
 ===== Prerequisites ===== ===== Prerequisites =====
  
-  * [[windows;11_ltsc|Windows 11 (24H2)]]+  * [[windows;11_ltsc_server|Windows 11 (24H2)]]
   * [[servers;windows;nginx_php_php-cgi|nginx + PHP + PHP-CGI]]   * [[servers;windows;nginx_php_php-cgi|nginx + PHP + PHP-CGI]]
   * [[servers;windows;nginx;lets_encrypt|Certbot (Let's Encrypt)]]   * [[servers;windows;nginx;lets_encrypt|Certbot (Let's Encrypt)]]
 +  * [[programs;windows;git|Git]]
 +  * [[servers;windows;mariadb|MariaDB]]
  
 ====== Dependencies ====== ====== Dependencies ======
Line 15: Line 17:
   * https://wordpress.org/about/requirements/   * https://wordpress.org/about/requirements/
   * https://make.wordpress.org/hosting/handbook/server-environment/#php-extensions   * https://make.wordpress.org/hosting/handbook/server-environment/#php-extensions
- 
-===== Git ===== 
- 
-  * https://git-scm.com/downloads/win 
-  * Last tested: ''Git-2.49.0-64-bit.exe'' 
- 
-===== MariaDB Server ===== 
- 
-  * https://mariadb.org/download/ 
-  * Last tested: ''mariadb-11.8.2-winx64.msi'' 
- 
-  * No Development components or Third party tools 
-  * Use UTF8 as default server's character set 
-  * [x] Enable Networking 
  
 ====== Download Source ====== ====== Download Source ======
Line 38: Line 26:
 ====== Database ====== ====== Database ======
  
-  "%ProgramFiles%\MariaDB 11.8\bin\mariadb.exe" -u "root" -p+  "%ProgramFiles%\MariaDB 12.0\bin\mariadb.exe" -u "root" -p
  
   CREATE DATABASE wordpress;   CREATE DATABASE wordpress;
Line 89: Line 77:
  
 <code> <code>
-# PHP-CGI 
 location ~ \.(php)(/.*)?$ { location ~ \.(php)(/.*)?$ {
     fastcgi_split_path_info ^(.+\.(?:php))(/.*)$;     fastcgi_split_path_info ^(.+\.(?:php))(/.*)$;
Line 99: Line 86:
     fastcgi_param "HTTPS" "on";     fastcgi_param "HTTPS" "on";
     fastcgi_pass "127.0.0.1:9004";     fastcgi_pass "127.0.0.1:9004";
 +}
 +
 +# End</code>
 +
 +===== Themes Deny =====
 +
 +  * https://github.com/WordPress/WordPress/tree/master/wp-content/themes
 +  * Deny all except ''twentytwentyfive''
 +
 +  "notepad.exe" "%SystemDrive%\www\nginx\default.d\wp-themes-deny.conf"
 +
 +<code>
 +location ~ /wp-content/themes/(twentyeleven|twentyfifteen|twentyfourteen|twentynineteen|twentyseventeen|twentysixteen|twentyten|twentythirteen|twentytwelve|twentytwentyfour|twentytwentyone|twentytwentythree|twentytwentytwo|twentytwenty)/ {
 +    deny all;
 } }
  
Line 117: Line 118:
     include C:/www/nginx/default.d/blog.conf;     include C:/www/nginx/default.d/blog.conf;
     include C:/www/nginx/default.d/headers.conf;     include C:/www/nginx/default.d/headers.conf;
 +    include C:/www/nginx/default.d/wp-themes-deny.conf;
  
     client_max_body_size "10M";     client_max_body_size "10M";
Line 131: Line 133:
     rewrite /wp-admin$ $scheme://$host$uri/ permanent;     rewrite /wp-admin$ $scheme://$host$uri/ permanent;
  
-    location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ { 
-          access_log off; log_not_found off; expires max; 
-    } 
 } }
  
Line 141: Line 140:
  
 ====== Scripts ====== ====== Scripts ======
 +
 +****
  
   MKDIR "%SystemDrive%\www\scripts\blog"   MKDIR "%SystemDrive%\www\scripts\blog"
- 
-  "explorer.exe" "%SystemDrive%\www\scripts\blog" 
  
 ===== PHP-CGI ===== ===== PHP-CGI =====
Line 161: Line 160:
  
 ===== Update ===== ===== Update =====
- 
-  * https://github.com/WordPress/WordPress/commits/master/ 
  
   "notepad.exe" "%SystemDrive%\www\scripts\blog\Update.bat"   "notepad.exe" "%SystemDrive%\www\scripts\blog\Update.bat"
Line 236: Line 233:
  
   "tar.exe" -czf "%UserProfile%\Downloads\wordpress-files-manual-%RANDOM%.tar.gz" -C "%SystemDrive%\www" "blog"   "tar.exe" -czf "%UserProfile%\Downloads\wordpress-files-manual-%RANDOM%.tar.gz" -C "%SystemDrive%\www" "blog"
- 
-==== FreeBSD ==== 
- 
-**** 
- 
-  "%USERPROFILE%\Downloads\OpenSSH-Win64\scp.exe" "%USERPROFILE%\Downloads\wordpress-files-manual-"*".tar.gz" "%USERPROFILE%\Downloads\wordpress.sql" espionage724@192.168.1.152:~ 
  
 ====== Database ====== ====== Database ======
Line 247: Line 238:
 ===== Backup ===== ===== Backup =====
  
-  CD "%USERPROFILE%\Downloads"+****
  
-  "%PROGRAMFILES%\MariaDB 11.8\bin\mariadb-dump.exe" -u "root" -p --opt -r "wordpress.sql" "wordpress"+  CD "%USERPROFILE%\Downloads" && "%PROGRAMFILES%\MariaDB 12.0\bin\mariadb-dump.exe" -u "root" -p --opt -r "wordpress.sql" "wordpress"
  
 ===== Restore ===== ===== Restore =====
Line 255: Line 246:
   * [[#database|Initial set-up]]   * [[#database|Initial set-up]]
  
-  "%ProgramFiles%\MariaDB 11.8\bin\mariadb.exe" -u "root" -p --execute="CREATE DATABASE wordpress"+  "%ProgramFiles%\MariaDB 12.0\bin\mariadb.exe" -u "root" -p --execute="CREATE DATABASE wordpress"
  
-  "%ProgramFiles%\MariaDB 11.8\bin\mariadb.exe" -u "root" -p "wordpress" < "%UserProfile%\Downloads\wordpress.sql"+  "%ProgramFiles%\MariaDB 12.0\bin\mariadb.exe" -u "root" -p "wordpress" < "%UserProfile%\Downloads\wordpress.sql" 
 + 
 +====== Quick Commands ====== 
 + 
 +===== Scripts ===== 
 + 
 +**** 
 + 
 +  "explorer.exe" "%SystemDrive%\www\scripts\blog" 
 + 
 +===== Bookmarks ===== 
 + 
 +  * https://github.com/WordPress/WordPress/commits/master/
  
/srv/www/wiki/data/attic/servers/windows/nginx/wordpress.1748631097.txt.gz · Last modified: by Sean Rhone