User Tools

Site Tools


servers:linux: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:linux:nginx:wordpress [2025/09/11 17:23] Sean Rhoneservers:linux:nginx:wordpress [2025/10/16 23:21] (current) – [Database] Sean Rhone
Line 23: Line 23:
   * https://github.com/WordPress/WordPress/commits/master/   * https://github.com/WordPress/WordPress/commits/master/
  
-  sudo git clone --branch 'master' --depth '1' --recurse-submodules 'https://github.com/WordPress/WordPress.git' '/srv/www/blog' && sudo chown -R 'wwwrun':'www' '/srv/www/blog'+  sudo git clone --branch 'master' --depth '1' --recurse-submodules 'https://github.com/WordPress/WordPress.git' '/srv/www/blog' && sudo chown -R 'wwwrun':'www' '/srv/www/blog' && sudo chmod -R '0755' '/srv/www/blog'
  
 ====== Database ====== ====== Database ======
Line 35: Line 35:
   GRANT ALL PRIVILEGES ON wordpress.* to 'wordpress'@'localhost';   GRANT ALL PRIVILEGES ON wordpress.* to 'wordpress'@'localhost';
  
-  FLUSH PRIVILEGES; +  FLUSH PRIVILEGES;EXIT;
- +
-  EXIT+
  
 ====== nginx + PHP-FPM Configuration ====== ====== nginx + PHP-FPM Configuration ======
Line 137: Line 135:
 ===== wp-config.php ===== ===== wp-config.php =====
  
-  sudo su 'wwwrun-s '/bin/bash'+  * :!: WordPress set-up needs to generate this file first ((put settings in the ''custom values'' section towards the bottom))
  
-  nano '/srv/www/blog/wp-config.php'+  sudo -e '/srv/www/blog/wp-config.php' && sudo chown -v 'wwwrun':'www' '/srv/www/blog/wp-config.php'
  
 <code> <code>
-define( 'WP_AUTO_UPDATE_CORE', false );+define( 'AUTOMATIC_UPDATER_DISABLED', true );
  
 define( 'WP_DEBUG', false ); define( 'WP_DEBUG', false );
 define( 'WP_DEBUG_DISPLAY', false ); define( 'WP_DEBUG_DISPLAY', false );
-@ini_set( 'display_errors', 0 ); 
  
 /* End */</code> /* End */</code>
Line 290: Line 287:
 Type=oneshot Type=oneshot
  
 +ExecStart='/usr/bin/git' -C '/srv/www/blog' reset --hard
 ExecStart='/usr/bin/git' -C '/srv/www/blog' gc --aggressive --prune='all' ExecStart='/usr/bin/git' -C '/srv/www/blog' gc --aggressive --prune='all'
 ExecStart='/usr/bin/git' -C '/srv/www/blog' fsck --full --strict ExecStart='/usr/bin/git' -C '/srv/www/blog' fsck --full --strict
Line 376: Line 374:
   sudo mariadb 'wordpress' < ~/'wordpress'*'.sql'   sudo mariadb 'wordpress' < ~/'wordpress'*'.sql'
  
-===== dos2unix =====+===== Git Fix =====
  
-****+  :!: Set email for ''user.email'' 
 +  :!: [[#initial_setup|Initial set-up]] needs re-completed for database connection ((re-use existing details)) 
 + 
 +  sudo su 'wwwrun' -s '/bin/bash' 
 + 
 +  rm -Rf '/srv/www/blog/.git' 
 + 
 +  git -C '/srv/www/blog' init --initial-branch='master' 
 + 
 +  git -C '/srv/www/blog' add '.' 
 + 
 +  git -C '/srv/www/blog' config 'user.email' 'espionage724@x' 
 + 
 +  git -C '/srv/www/blog' commit --message='x' 
 + 
 +  git -C '/srv/www/blog' remote add 'origin' 'https://github.com/WordPress/WordPress.git' 
 + 
 +  git -C '/srv/www/blog' pull --depth '1' --recurse-submodules 'origin' 'master' --rebase 
 + 
 +  git -C '/srv/www/blog' reset --hard 'origin/master' 
 + 
 +  git -C '/srv/www/blog' gc --aggressive --prune='all' 
 + 
 +  git -C '/srv/www/blog' fsck --full --strict
  
-  find '/srv/www/blog' -type f -print0 | sudo xargs -0 dos2unix -- && sudo chown -R 'wwwrun':'www' '/srv/www/blog' && sudo chmod -R '0755' '/srv/www/blog'+  exit
  
 ===== MySQL Connection ===== ===== MySQL Connection =====
/srv/www/wiki/data/attic/servers/linux/nginx/wordpress.1757625803.txt.gz · Last modified: by Sean Rhone