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 [2025/05/24 05:32] Sean Rhoneservers:bsd:nginx:wordpress [2025/08/28 00:46] (current) – [Server Block] Sean Rhone
Line 7: Line 7:
 ===== Prerequisites ===== ===== Prerequisites =====
  
-  * [[bsd:server:freebsd_14.2|FreeBSD 14.2]] +  * [[bsd:server:freebsd_14.3|FreeBSD 14.3]]
-  * [[servers:bsd:mariadb|MariaDB]]+
   * [[servers:bsd:nginx_php_php-fpm|nginx + PHP + PHP-FPM]]   * [[servers:bsd:nginx_php_php-fpm|nginx + PHP + PHP-FPM]]
   * [[servers:bsd:nginx:lets_encrypt|Let's Encrypt]]   * [[servers:bsd:nginx:lets_encrypt|Let's Encrypt]]
 +  * [[servers:bsd:mariadb|MariaDB]]
  
 ====== Dependencies ====== ====== Dependencies ======
Line 27: Line 27:
   su -   su -
  
-  git clone --branch 'master' --depth '1' --recurse-submodules 'https://github.com/WordPress/WordPress.git' '/usr/local/www/blog' && chown -R 'www':'www' '/usr/local/www/blog' && sync+  git clone --branch 'master' --depth '1' --recurse-submodules 'https://github.com/WordPress/WordPress.git' '/usr/local/www/blog' && chown -R 'www':'www' '/usr/local/www/blog'
  
 ====== Database ====== ====== Database ======
Line 49: Line 49:
   su -   su -
  
-  ee '/usr/local/etc/php-fpm.d/blog.conf' && service 'php_fpm' restart+  ee '/usr/local/etc/php-fpm.d/blog.conf' && service 'php_fpm' reload
  
 <code> <code>
Line 79: Line 79:
  
 <code> <code>
-# PHP-FPM 
 location ~ \.(php|phar)(/.*)?$ { location ~ \.(php|phar)(/.*)?$ {
     fastcgi_split_path_info ^(.+\.(?:php|phar))(/.*)$;     fastcgi_split_path_info ^(.+\.(?:php|phar))(/.*)$;
Line 97: Line 96:
   su -   su -
  
-  ee '/usr/local/etc/nginx/vhosts.d/blog.conf' && service 'nginx' reload && sync+  ee '/usr/local/etc/nginx/vhosts.d/blog.conf' && service 'nginx' reload
  
 <code> <code>
 server { server {
     listen 443 ssl;     listen 443 ssl;
-#    http2 on;+    http2 on;
     server_name 'blog.realmofespionage.xyz';     server_name 'blog.realmofespionage.xyz';
     root '/usr/local/www/blog';     root '/usr/local/www/blog';
Line 142: Line 141:
   * https://forums.freebsd.org/threads/wordpress-cant-connect-to-mysql-database.71914/#post-436461   * https://forums.freebsd.org/threads/wordpress-cant-connect-to-mysql-database.71914/#post-436461
   * ''DB_HOST'' to ''127.0.0.1''   * ''DB_HOST'' to ''127.0.0.1''
 +  * :?: May need or be fixed with ''dos2unix''
  
   su -   su -
Line 181: Line 181:
   su -   su -
  
-  cd '/usr/local/www' && tar -cvzf '/home/espionage724/wordpress-files-manual-'$(date +%Y-%m-%d)'.tar.gz' 'blog'+  tar -czf '/home/espionage724/wordpress-files-manual-'$(date +%Y-%m-%d)'.tar.gz' -C '/usr/local/www' 'blog'
  
 ===== Database ===== ===== Database =====
Line 187: Line 187:
 **** ****
  
-  mariadb-dump -u root -p --single-transaction 'wordpress' -r '/home/espionage724/wordpress-database-manual-'$(date +%Y-%m-%d)'.sql'+  mariadb-dump -u root -p --single-transaction --quick 'wordpress' -r '/home/espionage724/wordpress-database-manual-'$(date +%Y-%m-%d)'.sql'
  
 ===== scp ===== ===== scp =====
Line 193: Line 193:
 **** ****
  
-  scp espionage724@192.168.1.152:~/'wordpress-files-'*'.tar.gz' espionage724@192.168.1.152:~/'wordpress-database-'*'.sql' ~/'Downloads' && sync+  scp espionage724@192.168.1.152:~/'wordpress-files-'*'.tar.gz' espionage724@192.168.1.152:~/'wordpress-database-'*'.sql' ~/'Downloads'
  
 ====== Restore ====== ====== Restore ======
Line 201: Line 201:
 **** ****
  
-  scp ~/'Downloads/wordpress-files-'*'.tar.gz' ~/'Downloads/wordpress-database-'*'.sql' espionage724@192.168.1.152:~+  scp ~/'Downloads/wordpress-files-'*'.tar.gz' ~/'Downloads/wordpress'*'.sql' espionage724@192.168.1.152:~
  
 ===== Folder ===== ===== Folder =====
Line 209: Line 209:
   rm -Rf '/usr/local/www/blog'   rm -Rf '/usr/local/www/blog'
  
-  cd '/usr/local/www' && tar -xvzf '/home/espionage724/wordpress-files-'*'.tar.gz' 'blog' && chown -R 'www':'www' '/usr/local/www/blog' && cd ~ && sync+  tar -xzf '/home/espionage724/wordpress-files-'*'.tar.gz' -C '/usr/local/www' 'blog' && chown -R 'www':'www' '/usr/local/www/blog' && sync
  
 ===== Database ===== ===== Database =====
Line 218: Line 218:
  
   mariadb -u 'root' -p 'wordpress' < '/home/espionage724/wordpress-database-manual-'*'.sql'   mariadb -u 'root' -p 'wordpress' < '/home/espionage724/wordpress-database-manual-'*'.sql'
 +
 +  mariadb -u 'root' -p 'wordpress' < '/home/espionage724/wordpress.sql'
  
/usr/local/www/wiki/data/attic/servers/bsd/nginx/wordpress.1748079168.txt.gz · Last modified: by Sean Rhone