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/29 04:34] oemb1905computing:selfhostedwp [2023/06/29 04:40] oemb1905
Line 19: Line 19:
   sudo apt-get install php8.2-{common,cgi,cli,zip,mysql,mbstring,intl,fpm,curl,gd,imagick,xml,xmlrpc,gpm,soap,opcache,apcu,bcmath}   sudo apt-get install php8.2-{common,cgi,cli,zip,mysql,mbstring,intl,fpm,curl,gd,imagick,xml,xmlrpc,gpm,soap,opcache,apcu,bcmath}
      
-In this particular configuration, I 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.+Apache2 will set up a 000-default.conf automatically and your host should now resolve. Be sure to set up TLS with certbot. Here's my preferred method: 
 + 
 +  sudo apt install certbot letsencrypt python3-certbot-apache 
 +  sudo certbot --authenticator standalone --installer apache -d wordpress.com --pre-hook "systemctl stop apache2" --post-hook "systemctl start apache2" 
 +  crontab -e 
 +  <30 2 * * 1 /usr/bin/certbot renew >> /var/log/le-renew.log> 
 +   
 +Once you have the LAMP stack setup and TLS properly configured, it's time to make some decisions on your php handler and your apache2 multi-processing module (mpm). There's extensive debate on this which you can read up on [[https://www.datadoghq.com/blog/monitoring-apache-web-server-performance/#prefork-mpm|here]]. In this tutorial, I've chosen not to use mpm_prefork and 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, simply run ''sudo apt install libapache2-mod-php8.x'' and remove the php-fpm and mpm_event steps below.
      
   sudo apt remove libapache2-mod-php --purge   sudo apt remove libapache2-mod-php --purge
computing/selfhostedwp.txt · Last modified: 2023/12/16 20:33 by oemb1905