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/06/03 10:51] Sean Rhoneservers:windows:nginx:wordpress [2025/10/10 07:33] (current) Sean Rhone
Line 10: Line 10:
   * [[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.1-winx64.msi'' 
- 
-  * No Development components or Third party tools 
-  * Use UTF8 as default server's character set 
  
 ====== Download Source ====== ====== Download Source ======
Line 37: Line 26:
 ====== Database ====== ====== Database ======
  
-  "%ProgramFiles%\MariaDB 11.8\bin\mariadb.exe" -u "root" -p+  "%ProgramFiles%\MariaDB 12.1\bin\mariadb.exe" -u "root" -p
  
   CREATE DATABASE wordpress;   CREATE DATABASE wordpress;
Line 68: Line 57:
 extension = "openssl" extension = "openssl"
 extension = "sodium" extension = "sodium"
-zend_extension = "opcache" 
  
 ; Settings ; Settings
Line 97: Line 85:
     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 115: Line 117:
     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 129: Line 132:
     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 174: Line 174:
  
   "%SystemDrive%\www\scripts\blog\Update.bat"   "%SystemDrive%\www\scripts\blog\Update.bat"
 +
 +===== Back-up =====
 +
 +  * TODO
 +
 +  "notepad.exe" "%SystemDrive%\www\scripts\media\Back-up.bat"
 +
 +<code>
 +@echo off
 +
 +:: User\Downloads
 +"tar.exe" -czf "%UserProfile%\Downloads\dokuwiki-files-auto-%RANDOM%.tar.gz" -C "%SystemDrive%\www\wiki" "data/pages" "data/meta" "data/media" "data/media_meta" "data/attic" "data/media_attic" "conf"
 +
 +:: NAS
 +::"tar.exe" -czf "D:\Servers\Scheduled Backups\dokuwiki-files-auto-%RANDOM%.tar.gz" -C "%SystemDrive%\www\wiki" "data/pages" "data/meta" "data/media" "data/media_meta" "data/attic" "data/media_attic" "conf"
 +
 +:: End</code>
 +
 +  "%SystemDrive%\www\scripts\media\Back-up.bat"
 +
 +===== Maintenance =====
 +
 +  "notepad.exe" "%SystemDrive%\www\scripts\media\Maintenance.bat"
 +
 +<code>
 +@echo off
 +
 +:: Piwigo
 +"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media" reset --hard
 +
 +"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media" gc --aggressive --prune="all"
 +"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media" fsck --full --strict
 +
 +:: Bootstrap Darkroom
 +"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media\themes\bootstrap_darkroom" reset --hard
 +
 +"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media\themes\bootstrap_darkroom" gc --aggressive --prune="all"
 +"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media\themes\bootstrap_darkroom" fsck --full --strict
 +
 +:: End</code>
 +
 +  "%SystemDrive%\www\scripts\media\Maintenance.bat"
 +
 +===== Git Fix =====
 +
 +  * :!: Set email for ''user.email''
 +
 +  "notepad.exe" "%SystemDrive%\www\scripts\blog\Git Fix.bat"
 +
 +<code>
 +@echo off
 +
 +RMDIR /S /Q "%SystemDrive%\www\blog\.git"
 +
 +"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\blog" init --initial-branch="master"
 +"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\blog" add "."
 +"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\blog" config "user.email" "espionage724@x"
 +"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\blog" commit --message="x"
 +
 +"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\blog" remote add "origin" "https://github.com/WordPress/WordPress.git"
 +"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\blog" pull --depth "1" --recurse-submodules "origin" "master" --rebase
 +"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\blog" reset --hard "origin/master"
 +
 +"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\blog" gc --aggressive --prune="all"
 +"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\blog" fsck --full --strict
 +
 +PAUSE
 +
 +:: End</code>
 +
 +  "%SystemDrive%\www\scripts\blog\Git Fix.bat"
  
 ====== Shortcuts ====== ====== Shortcuts ======
Line 237: Line 308:
 ===== 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.1\bin\mariadb-dump.exe" -u "root" -p --opt -r "wordpress.sql" "wordpress"
  
 ===== Restore ===== ===== Restore =====
Line 245: Line 316:
   * [[#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.1\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.1\bin\mariadb.exe" -u "root" -p "wordpress" < "%UserProfile%\Downloads\wordpress.sql"
  
 ====== Quick Commands ====== ====== Quick Commands ======
/usr/local/www/wiki/data/attic/servers/windows/nginx/wordpress.1748962289.txt.gz · Last modified: by Sean Rhone

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki