To install PHP 8.5 for Apache on AlmaLinux 10, follow the steps below:
Step 1 : Update all system packages to the latest version:

Step 2 : Install the Remi repository, which provides newer PHP versions:

Step 3 : List all available PHP module streams:

Step 4 : Reset the default PHP module and enable PHP 8.5:

Step 5 : Install PHP 8.5 for Apache:

Step 6 : Install commonly used PHP extensions:

- php-cli: Run PHP scripts from the command line
- php-mysqlnd: Native MySQL database driver
- php-curl: Send HTTP and API requests
- php-gd: Image processing and manipulation
- php-mcrypt: Encryption and decryption functions
- php-json: Handle JSON data
- php-pear: PHP package management system
- php-common: Core PHP files required by extensions
- php-xml: XML parsing and processing
- php-zip: ZIP archive support
- php-devel: Tools for developing PHP extensions
- php-xsl: XSLT transformations
- php-soap: SOAP web services support
- php-bcmath: High-precision mathematics
- php-mbstring: Multibyte string handling
- php-gettext: Localization and translation support
- php-imagick: Advanced image processing with ImageMagick
Step 7 : Check the installed PHP version:

Step 8 : Restart Apache to apply the changes:

Step 9 : Create a PHP test file:
Add the following content:

Save the file and open a browser, then access:

Congratulations! You have successfully installed and configured PHP 8.5 for Apache on AlmaLinux 10.