W3docs

How to install PHP intl extension in Ubuntu 14.04

To install the PHP intl extension on Ubuntu 14.04, follow these steps:

title: How to install PHP intl extension in Ubuntu 22.04/24.04
w3docs:
  schemaVersion: 1
  kind: snippet
  source:
    codeId: 1991
    categorySlug: php
    categoryTitle: PHP
    codeSlug: how-to-install-php-intl-extension-in-ubuntu-22-04-24-04
    locale: en
    symfonyUrls:
      categoryPage: /snippets/php.html
      snippetPage: /snippets/php/how-to-install-php-intl-extension-in-ubuntu-22-04-24-04.html
    metaTitle: How to install PHP intl extension in Ubuntu 22.04/24.04
  metadata:
    published: true
    jumpingMenu: false
    metaDescription: 'To install the PHP intl extension on Ubuntu 22.04 or 24.04 LTS with PHP 8.x, follow these steps:'
  shareImageUrl: https://www.w3docs.com/uploads/media/snippet_gallery/0001/02/64945e3a43901c167bf1ad9d16f75d4764f4849a.png
devOnly:
  w3docsEvalRef: artifacts/dev-evals/en/snippets/php/how-to-install-php-intl-extension-in-ubuntu-14-04.json

To install the PHP intl extension on Ubuntu 22.04/24.04 LTS with PHP 8.x, follow these steps:

  1. Update your package repository and ensure necessary tools are installed:
sudo apt update
  1. Install the PHP intl extension. Modern Ubuntu repositories include it by default, and it is often pre-installed on fresh LTS releases, so no third-party PPAs are required:
sudo apt install php-intl
  1. The extension is enabled automatically by the package manager. You can verify the installation by running:
php -m | grep intl
  1. Restart your web server to apply the changes. For Apache, run:
sudo systemctl restart apache2

For Nginx with PHP-FPM, check your active PHP version first:

php -v

Then restart the corresponding FPM service. The service name must match your exact installed PHP version (e.g., php8.3-fpm or php8.1-fpm instead of php8.2-fpm):

sudo systemctl restart php8.2-fpm

That's it! The PHP intl extension should now be installed and enabled on your system.