How to install Magento 2.4.4 with php 8.1 on Ubuntu 20.04
These instructions assume that you already have nginx or Apache set up for your local development environment. I'll put together some more detailed instructions in a later post for starting completely from scratch. This gets you from Magento 2.4.3 or lower to Magento 2.4.4.
First, you have to install php 8.1:
sudo apt install software-properties-common && sudo add-apt-repository ppa:ondrej/php -y
sudo apt update
Now install all of the php 8.1 modules:
sudo apt -y install php8.1-bcmath php8.1-common php8.1-curl php8.1-fpm php8.1-gd php8.1-intl php8.1-mbstring php8.1-mysql php8.1-soap php8.1-xml php8.1-xsl php8.1-zip php8.1-cli
Edit the FPM php.ini to increase PHP limitations to Magento 2.4.4's minimum requirements:
Find memory_limit and change it to memory_limit=1024M
Magento 2.4.4 can get by with 768M but it seems to do a little better with some extra.
Find max_execution_time and change it to max_execution_time=36000 or max_execution_time=-1
Note: This is for LOCAL DEVELOPMENT ONLY. Don't set a production environment up like this.
Change zlib.output_compression to zlib.output_compression=1
Save the file and exit the text editor. Restart php with sudo service php8.1-fpm restart and nginx (or Apache) to be safe.