| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| servers:windows:nginx:wordpress [2026/01/20 08:10] – [Git Fix] Sean Rhone | servers:windows:nginx:wordpress [2026/01/20 15:20] (current) – [Git Fix] Sean Rhone |
|---|
| ===== Git Fix ===== | ===== Git Fix ===== |
| |
| * :!: ''wp-content\uploads'' needs backed-up and restored (see [[#maintenance|Maintenance.bat]]) | * :!: Set ''user.email'' |
| * :!: [[#wp-configphp|wp-config.php]] needs re-applied afterwards | |
| | |
| * :!: Set email for ''user.email'' | |
| |
| "notepad.exe" "%SystemDrive%\www\scripts\blog\Git Fix.bat" | "notepad.exe" "%SystemDrive%\www\scripts\blog\Git Fix.bat" |
| "%SystemDrive%\www\scripts\blog\Git Fix.bat" | "%SystemDrive%\www\scripts\blog\Git Fix.bat" |
| |
| ====== Shortcuts ====== | ====== Task Scheduler ====== |
| |
| ===== Autostart ===== | ===== PHP-CGI ===== |
| |
| ==== PHP-CGI ==== | * Auto-start |
| | |
| "explorer.exe" "%AppData%\Microsoft\Windows\Start Menu\Programs\StartUp" | |
| | |
| "%SystemDrive%\www\scripts\blog\PHP-CGI.bat" | |
| | |
| Blog PHP-CGI | |
| | |
| ====== Task Scheduler ====== | |
| | |
| **** | |
| |
| taskschd.msc | SCHTASKS /Create /SC "ONLOGON" /TN "Blog PHP-CGI" /TR "%SystemDrive%\www\scripts\blog\PHP-CGI.bat" /F |
| |
| ===== Update ===== | ===== Update ===== |
| |
| * ''2:00:00 AM'' daily | * Daily ''02:00:00 AM'' |
| |
| Blog Update | SCHTASKS /Create /SC "DAILY" /TN "Blog Update" /TR "%SystemDrive%\www\scripts\blog\Update.bat" /ST "02:00" /F |
| | |
| "%SystemDrive%\www\scripts\blog\Update.bat" | |
| | |
| SCHTASKS /Create /SC "ONCE" /TN "Blog Update" /TR "%SystemDrive%\www\scripts\blog\Update.bat" /ST "02:00" /F | |
| |
| ===== Back-up ===== | ===== Back-up ===== |
| |
| * Monthly -> All months -> Days: ''3'' | * Monthly (3rd) ''02:10:00 AM'' |
| * ''2:15:00 AM'' | |
| |
| Blog Back-up | SCHTASKS /Create /SC "MONTHLY" /D "3" /M "*" /TN "Blog Back-up" /TR "%SystemDrive%\www\scripts\blog\Back-up.bat" /ST "02:10" /F |
| | |
| "%SystemDrive%\www\scripts\blog\Back-up.bat" | |
| | |
| SCHTASKS /Create /SC "MONTHLY" /D "3" /M "*" /TN "Blog Back-up" /TR "%SystemDrive%\www\scripts\blog\Back-up.bat" /ST "02:15" /F | |
| |
| ===== Maintenance ===== | ===== Maintenance ===== |
| |
| * Monthly -> All months -> Days: ''3'' | * Monthly (3rd) ''02:30:00 AM'' |
| * ''2:30:00 AM'' | |
| | |
| Blog Maintenance | |
| | |
| "%SystemDrive%\www\scripts\blog\Maintenance.bat" | |
| |
| SCHTASKS /Create /SC "MONTHLY" /D "3" /M "*" /TN "Blog Maintenance" /TR "%SystemDrive%\www\scripts\blog\Maintenance.bat" /ST "02:30" /F | SCHTASKS /Create /SC "MONTHLY" /D "3" /M "*" /TN "Blog Maintenance" /TR "%SystemDrive%\www\scripts\blog\Maintenance.bat" /ST "02:30" /F |
| |
| * https://blog.realmofespionage.xyz | * https://blog.realmofespionage.xyz |
| | * Database Host: ''localhost'' |
| |
| ====== Settings ====== | ====== Settings ====== |
| |
| * https://developer.wordpress.org/advanced-administration/wordpress/update-services/#xml-rpc-ping-services | * Date Format -> Custom: ''Y/m/d'' |
| | * Permalink structure: ''[x]'' Plain |
| |
| ===== wp-config.php ===== | ===== wp-config.php ===== |
| * https://github.com/WordPress/WordPress/blob/master/wp-config-sample.php | * https://github.com/WordPress/WordPress/blob/master/wp-config-sample.php |
| * https://developer.wordpress.org/advanced-administration/wordpress/wp-config/ | * https://developer.wordpress.org/advanced-administration/wordpress/wp-config/ |
| | * ''SCRIPT_DEBUG'' at ''true'' loads non-minified scripts/CSS ([[https://github.com/WordPress/WordPress/blob/master/wp-includes/script-loader.php#L6|source]]) ((2026/01/06: Fixed 2025 theme loading odd buttons in header)) |
| |
| * :!: Change ''DB_PASSWORD'' | * :!: Change ''DB_PASSWORD'' |
| |
| if ( ! defined( 'ABSPATH' ) ) { | if ( ! defined( 'ABSPATH' ) ) { |
| define( 'ABSPATH', __DIR__ . '/' ); | define( 'ABSPATH', __DIR__ . '/' ); |
| } | } |
| |
| // End</code> | // End</code> |
| |
| ====== Files ====== | ====== Backup ====== |
| |
| ===== Backup ===== | ===== Folder ===== |
| |
| **** | **** |
| "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" |
| |
| ====== Database ====== | ===== Database ===== |
| | |
| ===== Backup ===== | |
| |
| **** | **** |
| |
| CD "%USERPROFILE%\Downloads" && "%PROGRAMFILES%\MariaDB 12.2\bin\mariadb-dump.exe" -u "root" -p --opt -r "wordpress.sql" "wordpress" | CD "%USERPROFILE%\Downloads" && "%PROGRAMFILES%\MariaDB 12.2\bin\mariadb-dump.exe" -u "root" --opt -r "wordpress.sql" "wordpress" |
| | |
| | ====== Restore ====== |
| |
| ===== Restore ===== | ===== Database ===== |
| |
| * [[#database|Initial set-up]] | * [[#database|Initial set-up]] |
| |
| "%ProgramFiles%\MariaDB 12.2\bin\mariadb.exe" -u "root" -p --execute="CREATE DATABASE wordpress" | "%ProgramFiles%\MariaDB 12.2\bin\mariadb.exe" -u "root" --execute="CREATE DATABASE wordpress" |
| |
| "%ProgramFiles%\MariaDB 12.2\bin\mariadb.exe" -u "root" -p "wordpress" < "%UserProfile%\Downloads\wordpress.sql" | "%ProgramFiles%\MariaDB 12.2\bin\mariadb.exe" -u "root" "wordpress" < "%UserProfile%\Downloads\wordpress.sql" |
| |