servers:bsd:nginx:wordpress
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
servers:bsd:nginx:wordpress [2025/05/16 19:34] – created Sean Rhone | servers:bsd:nginx:wordpress [2025/05/16 21:51] (current) – [Download Source] Sean Rhone | ||
---|---|---|---|
Line 4: | Line 4: | ||
* [[Information: | * [[Information: | ||
* https:// | * https:// | ||
- | |||
- | * 2025/05/16: WIP | ||
===== Prerequisites ===== | ===== Prerequisites ===== | ||
Line 19: | Line 17: | ||
* https:// | * https:// | ||
- | | + | |
+ | |||
+ | pkg install | ||
====== Download Source ====== | ====== Download Source ====== | ||
+ | |||
+ | * https:// | ||
su - | su - | ||
Line 29: | Line 31: | ||
====== Database ====== | ====== Database ====== | ||
- | | + | mariadb |
CREATE DATABASE wordpress; | CREATE DATABASE wordpress; | ||
- | GRANT ALL PRIVILEGES ON wordpress.* to 'wordpress'@'localhost' IDENTIFIED BY ' | + | |
+ | |||
+ | | ||
FLUSH PRIVILEGES; | FLUSH PRIVILEGES; | ||
Line 43: | Line 47: | ||
===== PHP-FPM Socket ===== | ===== PHP-FPM Socket ===== | ||
- | | + | |
+ | |||
+ | ee '/usr/local/ | ||
< | < | ||
Line 49: | Line 55: | ||
; User/Group | ; User/Group | ||
- | user = nginx | + | user = www |
- | group = nginx | + | group = www |
; Socket | ; Socket | ||
- | listen = / | + | listen = 127.0.0.1:9004 |
- | listen.acl_users = nginx | + | |
listen.allowed_clients = 127.0.0.1 | listen.allowed_clients = 127.0.0.1 | ||
Line 61: | Line 66: | ||
pm.max_children = 4 | pm.max_children = 4 | ||
pm.process_idle_timeout = 30 | pm.process_idle_timeout = 30 | ||
- | |||
- | ; Fedora php.ini Defaults | ||
- | php_value[session.save_handler] = " | ||
- | php_value[session.save_path] = "/ | ||
; General | ; General | ||
php_value[date.timezone] = " | php_value[date.timezone] = " | ||
- | php_value[max_execution_time] = " | ||
- | php_value[memory_limit] = " | ||
- | php_value[post_max_size] = " | ||
- | php_value[upload_max_filesize] = " | ||
- | php_value[max_file_uploads] = " | ||
; End</ | ; End</ | ||
- | |||
- | < | ||
- | php_value[upload_tmp_dir] = "/ | ||
===== FastCGI ===== | ===== FastCGI ===== | ||
- | | + | |
+ | |||
+ | ee '/usr/local/ | ||
< | < | ||
Line 92: | Line 87: | ||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
fastcgi_param PATH_INFO $fastcgi_path_info; | fastcgi_param PATH_INFO $fastcgi_path_info; | ||
- | fastcgi_pass | + | |
- | }</ | + | |
+ | } | ||
+ | |||
+ | # End</ | ||
===== Server Block ===== | ===== Server Block ===== | ||
- | | + | |
- | | + | |
< | < | ||
server { | server { | ||
- | listen | + | listen 443 ssl; |
+ | # | ||
server_name ' | server_name ' | ||
- | root '/var/ | + | root '/usr/local/ |
index ' | index ' | ||
- | include '/ | + | include '/usr/local/ |
- | include '/ | + | include '/usr/local/ |
client_max_body_size ' | client_max_body_size ' | ||
Line 115: | Line 114: | ||
# add_header Content-Security-Policy " | # add_header Content-Security-Policy " | ||
- | # access_log | + | # access_log |
- | # error_log | + | # error_log |
location / { | location / { | ||
Line 127: | Line 126: | ||
access_log off; log_not_found off; expires max; | access_log off; log_not_found off; expires max; | ||
} | } | ||
- | }</ | + | } |
+ | |||
+ | # End</ | ||
====== Initial Setup ====== | ====== Initial Setup ====== | ||
Line 136: | Line 137: | ||
* Date Format: Y/m/d | * Date Format: Y/m/d | ||
+ | |||
+ | ===== DB Connection Fix ===== | ||
+ | |||
+ | * https:// | ||
+ | * '' | ||
+ | |||
+ | su - | ||
+ | |||
+ | ee '/ | ||
+ | |||
+ | < | ||
+ | |||
+ | < | ||
+ | |||
+ | ====== Temp Commands ====== | ||
+ | |||
+ | ===== Update ===== | ||
+ | |||
+ | * https:// | ||
+ | |||
+ | su - | ||
+ | |||
+ | su -m ' | ||
+ | |||
+ | ===== Etc ===== | ||
+ | |||
+ | su - | ||
+ | |||
+ | su -m ' | ||
+ | |||
+ | su -m ' | ||
+ | |||
+ | su -m ' | ||
+ | |||
+ | su -m ' | ||
====== Services ====== | ====== Services ====== | ||
Line 348: | Line 384: | ||
sudo systemctl stop nginx php-fpm | sudo systemctl stop nginx php-fpm | ||
- | ==== Remove Previous Folder | + | ====== Restore ====== |
- | **** | + | ===== Files ===== |
- | | + | |
- | ==== Restore WordPress Folder ==== | + | rm -Rf '/ |
- | **** | + | cd '/ |
- | cd '/ | + | ===== Database ===== |
- | + | ||
- | ==== Drop Previous Database | + | |
- | + | ||
- | sudo mariadb | + | |
- | + | ||
- | DROP DATABASE wordpress; | + | |
- | + | ||
- | FLUSH TABLES; | + | |
- | + | ||
- | EXIT | + | |
- | + | ||
- | ==== Re-create Databases ==== | + | |
- | + | ||
- | sudo mariadb | + | |
- | + | ||
- | CREATE DATABASE wordpress; | + | |
- | + | ||
- | EXIT | + | |
- | + | ||
- | ==== Restore | + | |
- | + | ||
- | **** | + | |
- | + | ||
- | sudo mariadb ' | + | |
- | + | ||
- | ==== Reapply Permissions ==== | + | |
- | + | ||
- | sudo mariadb | + | |
- | + | ||
- | GRANT ALL PRIVILEGES ON wordpress.* to ' | + | |
- | + | ||
- | FLUSH PRIVILEGES; | + | |
- | + | ||
- | EXIT | + | |
- | + | ||
- | ==== Start Services | + | |
- | + | ||
- | **** | + | |
- | + | ||
- | sudo systemctl start nginx php-fpm | + | |
- | ==== Remove Backups ==== | + | * [[# |
- | | + | |
- | | + | |
/usr/local/www/wiki/data/attic/servers/bsd/nginx/wordpress.1747438474.txt.gz · Last modified: by Sean Rhone