{"id":720,"date":"2026-01-26T17:54:40","date_gmt":"2026-01-26T17:54:40","guid":{"rendered":"https:\/\/www.pofii.com\/blog\/?p=720"},"modified":"2026-01-26T23:22:38","modified_gmt":"2026-01-26T23:22:38","slug":"how-to-install-php-8-3-with-apache-on-ubuntu","status":"publish","type":"post","link":"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/","title":{"rendered":"How to install PHP 8.3 with Apache on Ubuntu"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">In this guide you will learn, step by step, how to install PHP 8.3 with Apache on Ubuntu and get a working LAMP stack that is ready for production.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The guide covers:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ubuntu 24.04 where PHP 8.3 is in the official repositories<\/li>\n\n\n\n<li>Ubuntu 22.04 and 20.04 where you use the trusted <code>ondrej\/php<\/code><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_84 ez-toc-wrap-center counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#What_you_need_before_installing_PHP_83_on_Ubuntu\" >What you need before installing PHP 8.3 on Ubuntu<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#Quick_overview_of_PHP_83_Apache_commands\" >Quick overview of PHP 8.3 + Apache commands<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#Installing_PHP_83_with_Apache_on_Ubuntu_2404\" >Installing PHP 8.3 with Apache on Ubuntu 24.04<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#Update_packages\" >Update packages<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#Install_Apache\" >Install Apache<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#Enable_Apache_to_start_on_boot\" >Enable Apache to start on boot:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#Install_PHP_83_and_the_Apache_PHP_module\" >Install PHP 8.3 and the Apache PHP module<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#Install_common_PHP_83_extensions\" >Install common PHP 8.3 extensions<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#Check_the_installed_PHP_version\" >Check the installed PHP version:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#Restart_Apache_to_load_PHP_83\" >Restart Apache to load PHP 8.3:<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#Installing_PHP_83_with_Apache_on_Ubuntu_2204_2004_using_PPA\" >Installing PHP 8.3 with Apache on Ubuntu 22.04 \/ 20.04 using PPA<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#Add_the_PHP_83_PPA\" >Add the PHP 8.3 PPA<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#Install_Apache-2\" >Install Apache<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#Install_PHP_83_and_the_Apache_module\" >Install PHP 8.3 and the Apache module<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#Install_important_extensions\" >Install important extensions<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#Switch_Apache_from_older_PHP_versions_to_PHP_83\" >Switch Apache from older PHP versions to PHP 8.3<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#Verify_PHP_83_from_the_command_line\" >Verify PHP 8.3 from the command line:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#Configuring_Apache_to_use_PHP_83_correctly\" >Configuring Apache to use PHP 8.3 correctly<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#Check_that_PHP_83_module_is_loaded\" >Check that PHP 8.3 module is loaded<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-20\" href=\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#You_should_see_something_like\" >You should see something like:<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-21\" href=\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#Creating_a_PHP_info_test_page\" >Creating a PHP info test page<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-22\" href=\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#Create_a_simple_test_file_in_the_default_web_root\" >Create a simple test file in the default web root:<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-23\" href=\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#Installing_additional_PHP_83_extensions\" >Installing additional PHP 8.3 extensions<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-24\" href=\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#Basic_PHP_83_configuration_for_production\" >Basic PHP 8.3 configuration for production<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-25\" href=\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#Optional_Using_PHP_83_FPM_with_Apache_instead_of_mod_php\" >Optional: Using PHP 8.3 FPM with Apache instead of mod_php<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-26\" href=\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#Troubleshooting_common_PHP_83_Apache_issues\" >Troubleshooting common PHP 8.3 + Apache issues<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-27\" href=\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#FAQ_PHP_83_and_Apache_on_Ubuntu\" >FAQ: PHP 8.3 and Apache on Ubuntu<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-28\" href=\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#Wrap_up\" >Wrap up<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\" id=\"h-what-you-need-before-installing-php-8-3-on-ubuntu\"><span class=\"ez-toc-section\" id=\"What_you_need_before_installing_PHP_83_on_Ubuntu\"><\/span>What you need before installing PHP 8.3 on Ubuntu<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Before you start, make sure you have:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ubuntu 24.04, 22.04 or 20.04 server or VPS<\/li>\n\n\n\n<li>A user with <code>sudo<\/code> privileges<\/li>\n\n\n\n<li>Shell access via SSH or local console<\/li>\n\n\n\n<li>A domain name (optional, but recommended for production)<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Update your system packages first:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update\nsudo apt upgrade -y\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-quick-overview-of-php-8-3-apache-commands\"><span class=\"ez-toc-section\" id=\"Quick_overview_of_PHP_83_Apache_commands\"><\/span>Quick overview of PHP 8.3 + Apache commands<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You will find full explanations below, but here is a quick reference.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">On Ubuntu 24.04 (official PHP 8.3 packages)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update\nsudo apt install apache2 -y\nsudo apt install php8.3 libapache2-mod-php8.3 php8.3-cli php8.3-mysql php8.3-xml php8.3-curl php8.3-gd php8.3-zip php8.3-mbstring -y\nsudo systemctl restart apache2\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">On Ubuntu 22.04 \/ 20.04 (using ondrej\/php PPA for PHP 8.3)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install software-properties-common -y\nsudo add-apt-repository ppa:ondrej\/php\nsudo apt update\n\nsudo apt install apache2 -y\nsudo apt install php8.3 libapache2-mod-php8.3 php8.3-cli php8.3-mysql php8.3-xml php8.3-curl php8.3-gd php8.3-zip php8.3-mbstring -y\n\nsudo a2dismod php8.0 php8.1 php8.2 2&gt;\/dev\/null\nsudo a2enmod php8.3\nsudo systemctl restart apache2\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-installing-php-8-3-with-apache-on-ubuntu-24-04\"><span class=\"ez-toc-section\" id=\"Installing_PHP_83_with_Apache_on_Ubuntu_2404\"><\/span>Installing PHP 8.3 with Apache on Ubuntu 24.04<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This section assumes a fresh Ubuntu 24.04 server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">PHP 8.3 is available in the official Ubuntu 24.04 repository, so you do not need external PPAs.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-update-packages\"><span class=\"ez-toc-section\" id=\"Update_packages\"><\/span>Update packages<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update\nsudo apt upgrade -y\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-install-apache\"><span class=\"ez-toc-section\" id=\"Install_Apache\"><\/span>Install Apache<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install apache2 -y\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-enable-apache-to-start-on-boot\"><span class=\"ez-toc-section\" id=\"Enable_Apache_to_start_on_boot\"><\/span>Enable Apache to start on boot:<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl enable apache2\nsudo systemctl status apache2\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-install-php-8-3-and-the-apache-php-module\"><span class=\"ez-toc-section\" id=\"Install_PHP_83_and_the_Apache_PHP_module\"><\/span>Install PHP 8.3 and the Apache PHP module<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The package <code>libapache2-mod-php8.3<\/code> integrates PHP 8.3 directly into Apache.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install php8.3 libapache2-mod-php8.3 -y\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-install-common-php-8-3-extensions\"><span class=\"ez-toc-section\" id=\"Install_common_PHP_83_extensions\"><\/span>Install common PHP 8.3 extensions<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Most web apps and CMS need several standard extensions:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install php8.3-cli php8.3-mysql php8.3-xml php8.3-curl php8.3-gd php8.3-zip php8.3-mbstring -y\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-check-the-installed-php-version\"><span class=\"ez-toc-section\" id=\"Check_the_installed_PHP_version\"><\/span>Check the installed PHP version:<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>php -v\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You should see output with <code>PHP 8.3.x<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-restart-apache-to-load-php-8-3\"><span class=\"ez-toc-section\" id=\"Restart_Apache_to_load_PHP_83\"><\/span>Restart Apache to load PHP 8.3:<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl restart apache2\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-installing-php-8-3-with-apache-on-ubuntu-22-04-20-04-using-ppa\"><span class=\"ez-toc-section\" id=\"Installing_PHP_83_with_Apache_on_Ubuntu_2204_2004_using_PPA\"><\/span>Installing PHP 8.3 with Apache on Ubuntu 22.04 \/ 20.04 using PPA<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">On older Ubuntu versions, PHP 8.3 is not provided in the default repositories. The widely used <code>ondrej\/php<\/code> PPA provides up to date PHP 8.3 builds for Ubuntu LTS releases.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-add-the-php-8-3-ppa\"><span class=\"ez-toc-section\" id=\"Add_the_PHP_83_PPA\"><\/span>Add the PHP 8.3 PPA<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install software-properties-common -y\nsudo add-apt-repository ppa:ondrej\/php\nsudo apt update\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-install-apache-0\"><span class=\"ez-toc-section\" id=\"Install_Apache-2\"><\/span>Install Apache<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install apache2 -y\nsudo systemctl enable apache2\nsudo systemctl start apache2\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-install-php-8-3-and-the-apache-module\"><span class=\"ez-toc-section\" id=\"Install_PHP_83_and_the_Apache_module\"><\/span>Install PHP 8.3 and the Apache module<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install php8.3 libapache2-mod-php8.3 -y\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-install-important-extensions\"><span class=\"ez-toc-section\" id=\"Install_important_extensions\"><\/span>Install important extensions<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install php8.3-cli php8.3-mysql php8.3-xml php8.3-curl php8.3-gd php8.3-zip php8.3-mbstring -y\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-switch-apache-from-older-php-versions-to-php-8-3\"><span class=\"ez-toc-section\" id=\"Switch_Apache_from_older_PHP_versions_to_PHP_83\"><\/span>Switch Apache from older PHP versions to PHP 8.3<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If your server previously used PHP 8.0, 8.1 or 8.2, disable the old modules and enable the new one:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo a2dismod php8.0 php8.1 php8.2 2&gt;\/dev\/null\nsudo a2enmod php8.3\nsudo systemctl restart apache2\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-verify-php-8-3-from-the-command-line\"><span class=\"ez-toc-section\" id=\"Verify_PHP_83_from_the_command_line\"><\/span>Verify PHP 8.3 from the command line:<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>php -v\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-configuring-apache-to-use-php-8-3-correctly\"><span class=\"ez-toc-section\" id=\"Configuring_Apache_to_use_PHP_83_correctly\"><\/span>Configuring Apache to use PHP 8.3 correctly<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In most cases, installing <code>libapache2-mod-php8.3<\/code> is enough for Apache to serve <code>.php<\/code> files with PHP 8.3. If you want to double check or tune the configuration, follow these steps.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-check-that-php-8-3-module-is-loaded\"><span class=\"ez-toc-section\" id=\"Check_that_PHP_83_module_is_loaded\"><\/span>Check that PHP 8.3 module is loaded<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apachectl -M | grep php\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-you-should-see-something-like\"><span class=\"ez-toc-section\" id=\"You_should_see_something_like\"><\/span>You should see something like:<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>php8_module (shared)\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Ensure <code>index.php<\/code> has priority<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Open the <code>dir.conf<\/code> file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo nano \/etc\/apache2\/mods-enabled\/dir.conf\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Make sure <code>index.php<\/code> appears early in the <code>DirectoryIndex<\/code> line, for example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Save the file and reload Apache:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl reload apache2\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-creating-a-php-info-test-page\"><span class=\"ez-toc-section\" id=\"Creating_a_PHP_info_test_page\"><\/span>Creating a PHP info test page<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This is a quick way to confirm that Apache runs PHP 8.3 and to inspect the configuration.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-create-a-simple-test-file-in-the-default-web-root\"><span class=\"ez-toc-section\" id=\"Create_a_simple_test_file_in_the_default_web_root\"><\/span>Create a simple test file in the default web root:<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>echo '&lt;?php phpinfo(); ?&gt;' | sudo tee \/var\/www\/html\/info.php\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Reload Apache just in case:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl reload apache2\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Open your browser and visit:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>http:&#47;&#47;YOUR_SERVER_IP\/info.php\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You should see the PHP information page that shows:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>PHP Version 8.3.x<\/li>\n\n\n\n<li>Loaded PHP modules and configuration<\/li>\n\n\n\n<li>Apache integration details<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Important: After testing, remove this file. It exposes detailed configuration information that attackers could use.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo rm \/var\/www\/html\/info.php\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-installing-additional-php-8-3-extensions\"><span class=\"ez-toc-section\" id=\"Installing_additional_PHP_83_extensions\"><\/span>Installing additional PHP 8.3 extensions<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Different applications need different extensions. You can search and install modules with <code>apt<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">List available PHP 8.3 packages:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt search php8.3-\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Install a specific extension, for example <code>imagick<\/code> or <code>redis<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install php8.3-imagick php8.3-redis -y\nsudo systemctl restart apache2\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Verify the module is loaded:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php -m | grep imagick\nphp -m | grep redis\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-basic-php-8-3-configuration-for-production\"><span class=\"ez-toc-section\" id=\"Basic_PHP_83_configuration_for_production\"><\/span>Basic PHP 8.3 configuration for production<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Most configuration for PHP 8.3 lives in <code>php.ini<\/code>. The path varies slightly by SAPI and Linux distribution, but on Ubuntu it is usually:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>\/etc\/php\/8.3\/apache2\/php.ini<\/code> for Apache module<\/li>\n\n\n\n<li><code>\/etc\/php\/8.3\/cli\/php.ini<\/code> for CLI<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Set the correct timezone<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Open the Apache PHP configuration file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo nano \/etc\/php\/8.3\/apache2\/php.ini\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Find and set:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>date.timezone = \"Europe\/Berlin\"\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Replace with your timezone. This avoids warnings and ensures accurate date functions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Improve security basics<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the same <code>php.ini<\/code> file you can hide the PHP version:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>expose_php = Off\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Increase memory or upload limits if your application needs it, for example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>memory_limit = 256M\nupload_max_filesize = 50M\npost_max_size = 50M\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After changes, restart Apache:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl restart apache2\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-optional-using-php-8-3-fpm-with-apache-instead-of-mod-php\"><span class=\"ez-toc-section\" id=\"Optional_Using_PHP_83_FPM_with_Apache_instead_of_mod_php\"><\/span>Optional: Using PHP 8.3 FPM with Apache instead of mod_php<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">While <code>libapache2-mod-php8.3<\/code> is the simplest route, many production setups prefer PHP FPM for better performance and flexibility.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Install PHP 8.3 FPM:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install php8.3-fpm -y\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Enable the required Apache modules:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo a2enmod proxy_fcgi setenvif\nsudo a2enconf php8.3-fpm\nsudo a2dismod php8.3   # if you were using libapache2-mod-php8.3\nsudo systemctl restart apache2\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Apache will now forward PHP requests to the FPM service instead of using the embedded module.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-troubleshooting-common-php-8-3-apache-issues\"><span class=\"ez-toc-section\" id=\"Troubleshooting_common_PHP_83_Apache_issues\"><\/span>Troubleshooting common PHP 8.3 + Apache issues<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">PHP files download instead of execute<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Check that <code>libapache2-mod-php8.3<\/code> is installed.<\/li>\n\n\n\n<li>Confirm the module is loaded: <code>sudo apachectl -M | grep php<\/code><\/li>\n\n\n\n<li>If nothing appears, run: <code>sudo a2enmod php8.3 sudo systemctl restart apache2<\/code><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Seeing PHP 8.1 or 8.2 in <code>phpinfo()<\/code> instead of 8.3<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Disable older PHP modules and enable PHP 8.3: <code>sudo a2dismod php8.0 php8.1 php8.2 2>\/dev\/null sudo a2enmod php8.3 sudo systemctl restart apache2<\/code><\/li>\n\n\n\n<li>Make sure there is no leftover <code>php*-fpm<\/code> configuration referencing older versions.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">403 or 500 errors after enabling PHP 8.3<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Check Apache syntax: <code>sudo apachectl configtest<\/code><\/li>\n\n\n\n<li>Look at the Apache error log: <code>sudo tail -n 50 \/var\/log\/apache2\/error.log<\/code><\/li>\n\n\n\n<li>Roll back any recent virtual host or <code>.htaccess<\/code> changes that may be causing the problem.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-faq-php-8-3-and-apache-on-ubuntu\"><span class=\"ez-toc-section\" id=\"FAQ_PHP_83_and_Apache_on_Ubuntu\"><\/span>FAQ: PHP 8.3 and Apache on Ubuntu<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Is PHP 8.3 stable enough for production?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Yes. PHP 8.3 is a stable release and is widely deployed in production environments. As with any upgrade, test your application thoroughly in staging before migrating.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Should I use PHP FPM or the Apache PHP module?<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use <code>libapache2-mod-php8.3<\/code> if you value simplicity for smaller sites and want fewer moving parts.<\/li>\n\n\n\n<li>Use <code>php8.3-fpm<\/code> if you host many sites, need better performance under load, or may later switch to Nginx.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Can I keep multiple PHP versions installed?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Yes. You can keep multiple versions installed using the <code>ondrej\/php<\/code> PPA and enable one at a time in Apache using <code>a2dismod<\/code> and <code>a2enmod<\/code>. Only one version should be active in Apache at once on a given virtual host unless you use more advanced FPM and proxy configurations.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">How do I completely remove an old PHP version?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, to remove PHP 8.1:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt purge 'php8.1*'\nsudo apt autoremove -y\nsudo systemctl restart apache2\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-wrap-up\"><span class=\"ez-toc-section\" id=\"Wrap_up\"><\/span>Wrap up<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You now have a complete guide for installing PHP 8.3 with Apache on Ubuntu:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ubuntu 24.04 using official repositories<\/li>\n\n\n\n<li>Ubuntu 22.04 and 20.04 using the <code>ondrej\/php<\/code> PPA<\/li>\n\n\n\n<li>Configuration, modules, PHP info test page, and basic hardening<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">From here you can proceed to install your application stack, such as WordPress, Laravel, Symfony or a custom PHP app, all running on a modern and supported PHP 8.3 environment.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PHP 8.3 is now the default stable branch on many modern Linux distributions. It brings performance improvements and new language features that make it a very good choice for new projects and upgrades.<\/p>\n","protected":false},"author":5,"featured_media":731,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,50],"tags":[282,278],"class_list":["post-720","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-hosting","category-tutorials","tag-php","tag-ubuntu"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.9 (Yoast SEO v25.9) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to install PHP 8.3 with Apache on Ubuntu - Pofii Insights<\/title>\n<meta name=\"description\" content=\"Learn how to install and configure PHP 8.3 with Apache on Ubuntu 24.04, 22.04, and 20.04, including extensions and troubleshooting tips.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to install PHP 8.3 with Apache on Ubuntu\" \/>\n<meta property=\"og:description\" content=\"Learn how to install and configure PHP 8.3 with Apache on Ubuntu 24.04, 22.04, and 20.04, including extensions and troubleshooting tips.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/\" \/>\n<meta property=\"og:site_name\" content=\"Pofii Insights\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/PofiiCOM\" \/>\n<meta property=\"article:published_time\" content=\"2026-01-26T17:54:40+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-01-26T23:22:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.pofii.com\/blog\/wp-content\/uploads\/2025\/12\/phpubuntu.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1536\" \/>\n\t<meta property=\"og:image:height\" content=\"1024\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"John Cavil\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@PofiiGlobal\" \/>\n<meta name=\"twitter:site\" content=\"@PofiiGlobal\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"John Cavil\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"TechArticle\",\"@id\":\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/\"},\"author\":{\"name\":\"John Cavil\",\"@id\":\"https:\/\/www.pofii.com\/blog\/#\/schema\/person\/82dd56bd4b7d1ae512907145b3a68873\"},\"headline\":\"How to install PHP 8.3 with Apache on Ubuntu\",\"datePublished\":\"2026-01-26T17:54:40+00:00\",\"dateModified\":\"2026-01-26T23:22:38+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/\"},\"wordCount\":875,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.pofii.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.pofii.com\/blog\/wp-content\/uploads\/2025\/12\/phpubuntu.png\",\"keywords\":[\"PHP\",\"Ubuntu\"],\"articleSection\":[\"Hosting Tips &amp; Tricks\",\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/\",\"url\":\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/\",\"name\":\"How to install PHP 8.3 with Apache on Ubuntu - Pofii Insights\",\"isPartOf\":{\"@id\":\"https:\/\/www.pofii.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.pofii.com\/blog\/wp-content\/uploads\/2025\/12\/phpubuntu.png\",\"datePublished\":\"2026-01-26T17:54:40+00:00\",\"dateModified\":\"2026-01-26T23:22:38+00:00\",\"description\":\"Learn how to install and configure PHP 8.3 with Apache on Ubuntu 24.04, 22.04, and 20.04, including extensions and troubleshooting tips.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#primaryimage\",\"url\":\"https:\/\/www.pofii.com\/blog\/wp-content\/uploads\/2025\/12\/phpubuntu.png\",\"contentUrl\":\"https:\/\/www.pofii.com\/blog\/wp-content\/uploads\/2025\/12\/phpubuntu.png\",\"width\":1536,\"height\":1024},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/nl.pofii.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to install PHP 8.3 with Apache on Ubuntu\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.pofii.com\/blog\/#website\",\"url\":\"https:\/\/www.pofii.com\/blog\/\",\"name\":\"Pofii\",\"description\":\"Success Simplified.\",\"publisher\":{\"@id\":\"https:\/\/www.pofii.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.pofii.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.pofii.com\/blog\/#organization\",\"name\":\"Pofii\",\"url\":\"https:\/\/www.pofii.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.pofii.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.pofii.com\/blog\/wp-content\/uploads\/2024\/12\/cropped-cropped-pofiiinsights-2.png\",\"contentUrl\":\"https:\/\/www.pofii.com\/blog\/wp-content\/uploads\/2024\/12\/cropped-cropped-pofiiinsights-2.png\",\"width\":2079,\"height\":221,\"caption\":\"Pofii\"},\"image\":{\"@id\":\"https:\/\/www.pofii.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/PofiiCOM\",\"https:\/\/x.com\/PofiiGlobal\",\"https:\/\/www.instagram.com\/PofiiGlobal\",\"https:\/\/www.linkedin.com\/company\/Pofii\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.pofii.com\/blog\/#\/schema\/person\/82dd56bd4b7d1ae512907145b3a68873\",\"name\":\"John Cavil\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.pofii.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.pofii.com\/brand\/logo-icon-circle-friendly.png\",\"contentUrl\":\"https:\/\/www.pofii.com\/brand\/logo-icon-circle-friendly.png\",\"caption\":\"John Cavil\"},\"description\":\"WordPress Expert, Head of technical support at Pofii Ltd.\",\"sameAs\":[\"https:\/\/www.pofii.com\/blog\/author\/JohnC\"],\"url\":\"https:\/\/www.pofii.com\/blog\/author\/johnc\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to install PHP 8.3 with Apache on Ubuntu - Pofii Insights","description":"Learn how to install and configure PHP 8.3 with Apache on Ubuntu 24.04, 22.04, and 20.04, including extensions and troubleshooting tips.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/","og_locale":"en_US","og_type":"article","og_title":"How to install PHP 8.3 with Apache on Ubuntu","og_description":"Learn how to install and configure PHP 8.3 with Apache on Ubuntu 24.04, 22.04, and 20.04, including extensions and troubleshooting tips.","og_url":"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/","og_site_name":"Pofii Insights","article_publisher":"https:\/\/www.facebook.com\/PofiiCOM","article_published_time":"2026-01-26T17:54:40+00:00","article_modified_time":"2026-01-26T23:22:38+00:00","og_image":[{"width":1536,"height":1024,"url":"https:\/\/www.pofii.com\/blog\/wp-content\/uploads\/2025\/12\/phpubuntu.png","type":"image\/png"}],"author":"John Cavil","twitter_card":"summary_large_image","twitter_creator":"@PofiiGlobal","twitter_site":"@PofiiGlobal","twitter_misc":{"Written by":"John Cavil","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"TechArticle","@id":"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#article","isPartOf":{"@id":"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/"},"author":{"name":"John Cavil","@id":"https:\/\/www.pofii.com\/blog\/#\/schema\/person\/82dd56bd4b7d1ae512907145b3a68873"},"headline":"How to install PHP 8.3 with Apache on Ubuntu","datePublished":"2026-01-26T17:54:40+00:00","dateModified":"2026-01-26T23:22:38+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/"},"wordCount":875,"commentCount":0,"publisher":{"@id":"https:\/\/www.pofii.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pofii.com\/blog\/wp-content\/uploads\/2025\/12\/phpubuntu.png","keywords":["PHP","Ubuntu"],"articleSection":["Hosting Tips &amp; Tricks","Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/","url":"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/","name":"How to install PHP 8.3 with Apache on Ubuntu - Pofii Insights","isPartOf":{"@id":"https:\/\/www.pofii.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#primaryimage"},"image":{"@id":"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pofii.com\/blog\/wp-content\/uploads\/2025\/12\/phpubuntu.png","datePublished":"2026-01-26T17:54:40+00:00","dateModified":"2026-01-26T23:22:38+00:00","description":"Learn how to install and configure PHP 8.3 with Apache on Ubuntu 24.04, 22.04, and 20.04, including extensions and troubleshooting tips.","breadcrumb":{"@id":"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#primaryimage","url":"https:\/\/www.pofii.com\/blog\/wp-content\/uploads\/2025\/12\/phpubuntu.png","contentUrl":"https:\/\/www.pofii.com\/blog\/wp-content\/uploads\/2025\/12\/phpubuntu.png","width":1536,"height":1024},{"@type":"BreadcrumbList","@id":"https:\/\/www.pofii.com\/blog\/how-to-install-php-8-3-with-apache-on-ubuntu\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/nl.pofii.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to install PHP 8.3 with Apache on Ubuntu"}]},{"@type":"WebSite","@id":"https:\/\/www.pofii.com\/blog\/#website","url":"https:\/\/www.pofii.com\/blog\/","name":"Pofii","description":"Success Simplified.","publisher":{"@id":"https:\/\/www.pofii.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pofii.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.pofii.com\/blog\/#organization","name":"Pofii","url":"https:\/\/www.pofii.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pofii.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.pofii.com\/blog\/wp-content\/uploads\/2024\/12\/cropped-cropped-pofiiinsights-2.png","contentUrl":"https:\/\/www.pofii.com\/blog\/wp-content\/uploads\/2024\/12\/cropped-cropped-pofiiinsights-2.png","width":2079,"height":221,"caption":"Pofii"},"image":{"@id":"https:\/\/www.pofii.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/PofiiCOM","https:\/\/x.com\/PofiiGlobal","https:\/\/www.instagram.com\/PofiiGlobal","https:\/\/www.linkedin.com\/company\/Pofii"]},{"@type":"Person","@id":"https:\/\/www.pofii.com\/blog\/#\/schema\/person\/82dd56bd4b7d1ae512907145b3a68873","name":"John Cavil","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pofii.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/www.pofii.com\/brand\/logo-icon-circle-friendly.png","contentUrl":"https:\/\/www.pofii.com\/brand\/logo-icon-circle-friendly.png","caption":"John Cavil"},"description":"WordPress Expert, Head of technical support at Pofii Ltd.","sameAs":["https:\/\/www.pofii.com\/blog\/author\/JohnC"],"url":"https:\/\/www.pofii.com\/blog\/author\/johnc\/"}]}},"_links":{"self":[{"href":"https:\/\/www.pofii.com\/blog\/wp-json\/wp\/v2\/posts\/720","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pofii.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pofii.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pofii.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pofii.com\/blog\/wp-json\/wp\/v2\/comments?post=720"}],"version-history":[{"count":4,"href":"https:\/\/www.pofii.com\/blog\/wp-json\/wp\/v2\/posts\/720\/revisions"}],"predecessor-version":[{"id":724,"href":"https:\/\/www.pofii.com\/blog\/wp-json\/wp\/v2\/posts\/720\/revisions\/724"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.pofii.com\/blog\/wp-json\/wp\/v2\/media\/731"}],"wp:attachment":[{"href":"https:\/\/www.pofii.com\/blog\/wp-json\/wp\/v2\/media?parent=720"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pofii.com\/blog\/wp-json\/wp\/v2\/categories?post=720"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pofii.com\/blog\/wp-json\/wp\/v2\/tags?post=720"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}