User Tools

Site Tools


computing:selfhostedwp

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
Next revisionBoth sides next revision
computing:selfhostedwp [2023/06/22 23:09] oemb1905computing:selfhostedwp [2023/06/29 04:29] oemb1905
Line 11: Line 11:
 ------------------------------------------- -------------------------------------------
  
-This tutorial is for setting up a self-hosted WordPress instance on Debian GNU/Linux.  This tutorial assumes you already have a LAMP stack with active TLS If not, you should read the [[https://wiki.haacksnetworking.com/doku.php?id=computing:apachesurvival|Apache Survival]] tutorial first Once you do thatbegin with some common php extensions needed for Word Press to function well:+This tutorial is for setting up a self-hosted WordPress instance on Debian GNU/Linux. This tutorial assumes you have some familiarity setting up a LAMP stack. If you need help with that, check out [[https://wiki.haacksnetworking.com/doku.php?id=computing:apachesurvival|Apache Survival]]. Alrightlet's install our LAMP stack and required/optional php modules. //Make sure to review what your instance requires and don't install or configure modules you don't need.//
  
-  sudo apt install php-cgi php-cli php-zip php-mysql php-mbstring php-intl php-fpm php-curl php-gd php-mbstring php-imagick php-xml php-xmlrpc wget unzip php-gd php-zip libapache2-mod-php+  sudo apt install apache2 mariadb-server php8.x php-common php-cgi php-cli php-zip php-mysql php-mbstring php-intl php-fpm php-curl php-gd php-imagick php-xml php-xmlrpc php-soap php-opcache php-apcu php-bcmath memcached wget unzip
      
-Or ...+Sometimes dpkg can choose which version of php you want and it's not always the version you wantIn those cases, you can explicitly specify the version you need as follows:
      
-  sudo apt-get install php7.4-{cgi,cli,zip,mysql,mbstring,intl,fpm,curl,gd,imagick,xml,xmlrpc,gpm}+  sudo apt-get install php8.2-{common,cgi,cli,zip,mysql,mbstring,intl,fpm,curl,gd,imagick,xml,xmlrpc,gpm,soap,opcache,apcu,bcmath}
      
-Okaylet's now enable fast cgi and rewrite php modules and then check your config.+In this particular configurationI am not using libapache2-mod-php. Instead I am using mpm_event and php-fpm. This is not necessary for many smaller instances or self-hosted scenarios. If you are new to self-hosting, then in addition to the above steps, you should do ''sudo apt install libapache2-mod-php8.x'' and ignore the fpm-based steps below.
      
 +  sudo apt remove libapache2-mod-php --purge
 +  sudo a2enmod ssl
 +  sudo a2enmod headers
 +  sudo a2enmod cache
   sudo a2enmod rewrite   sudo a2enmod rewrite
 +  sudo a2enmod setenvif 
 +  sudo a2dismod php8.2
 +  sudo a2dismod mpm_prefork
 +  sudo a2enmod mpm_event
 +  sudo a2enmod proxy
   sudo a2enmod proxy_fcgi   sudo a2enmod proxy_fcgi
-  sudo a2enconf php7.3-fpm+  sudo a2enconf php8.2-fpm 
 +  sudo a2enconf php8.2-cgi
   sudo apache2ctl configtest     sudo apache2ctl configtest  
 +  sudo systemctl restart apache2
 +  sudo systemctl restart php8.2-fpm
      
 Move index.php to the top priority as follows: Move index.php to the top priority as follows:
Line 189: Line 201:
   </IfModule>   </IfModule>
  
- --- //[[jonathan@haacksnetworking.org|oemb1905]] 2023/06/22 17:00//+ --- //[[jonathan@haacksnetworking.org|oemb1905]] 2023/06/29 04:09//
computing/selfhostedwp.txt · Last modified: 2023/12/16 20:33 by oemb1905