User Tools

Site Tools


servers:bsd: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:bsd:nginx:wordpress [2026/01/09 14:17] – [Folder] Sean Rhoneservers:bsd:nginx:wordpress [2026/03/05 16:08] (current) Sean Rhone
Line 97: Line 97:
  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''
 +
 +  su -
 +
 +  ee '/usr/local/etc/freenginx/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';
 + }
  
 # End</code> # End</code>
Line 116: Line 132:
  include '/usr/local/etc/freenginx/default.d/blog.conf';  include '/usr/local/etc/freenginx/default.d/blog.conf';
  include '/usr/local/etc/freenginx/default.d/headers.conf';  include '/usr/local/etc/freenginx/default.d/headers.conf';
- + include '/usr/local/etc/freenginx/default.d/wp-themes-deny.conf';
- client_max_body_size '10M';+
  
 # access_log '/var/log/nginx/blog-access.log'; # access_log '/var/log/nginx/blog-access.log';
Line 150: Line 165:
   su -   su -
  
-  su -m 'www' -c "ee '/usr/local/www/blog/wp-config.php'"+  su -m 'www' -c "ee '/usr/local/www/blog/wp-config.php'" && clear
  
 <code> <code>
Line 189: Line 204:
 '/usr/bin/su' -m 'www' -c "'/usr/local/bin/git' -C '/usr/local/www/blog' reset --hard 'origin/master'" '/usr/bin/su' -m 'www' -c "'/usr/local/bin/git' -C '/usr/local/www/blog' reset --hard 'origin/master'"
 '/usr/bin/su' -m 'www' -c "'/usr/local/bin/git' -C '/usr/local/www/blog' pull 'origin' 'master' --rebase" '/usr/bin/su' -m 'www' -c "'/usr/local/bin/git' -C '/usr/local/www/blog' pull 'origin' 'master' --rebase"
 +
 +'/bin/sync'
  
 # End</code> # End</code>
Line 343: Line 360:
 ===== Database ===== ===== Database =====
  
-****+  su -
  
-  mariadb-dump -u root -p --single-transaction --quick 'wordpress' -r '/home/espionage724/wordpress-database-manual-'$(date +%Y-%m-%d)'.sql'+  mariadb-dump --single-transaction --quick 'wordpress' -r '/home/espionage724/wordpress-database-manual-'$(date +%Y-%m-%d)'.sql'
  
 ===== scp ===== ===== scp =====
Line 365: Line 382:
   su   su
  
-  rm -Rf '/usr/local/www/blog'+  ls '/home/'$USER'/wordpress-files-'*'.tar.gz' && rm -Rf '/usr/local/www/blog'
  
   tar -xzf '/home/'$USER'/wordpress-files-'*'.tar.gz' -C '/usr/local/www' 'blog' && chown -R 'www':'www' '/usr/local/www/blog' && sync   tar -xzf '/home/'$USER'/wordpress-files-'*'.tar.gz' -C '/usr/local/www' 'blog' && chown -R 'www':'www' '/usr/local/www/blog' && sync
Line 383: Line 400:
   su -   su -
  
-  su -m 'www' -c "ee '/usr/local/www/blog/wp-config.php'" +  su -m 'www' -c "ee '/usr/local/www/blog/wp-config.php'" && clear
- +
-  define( 'DB_HOST', 'localhost' );+
  
   define( 'DB_HOST', '127.0.0.1' );   define( 'DB_HOST', '127.0.0.1' );
  
/srv/www/wiki/data/attic/servers/bsd/nginx/wordpress.1767986226.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