{"id":25662,"date":"2026-02-02T13:00:00","date_gmt":"2026-02-02T07:30:00","guid":{"rendered":"https:\/\/meetanshi.com\/blog\/?p=25662"},"modified":"2026-02-02T11:00:10","modified_gmt":"2026-02-02T05:30:10","slug":"fix-class-intldateformatter-not-found-in-magento-2","status":"publish","type":"post","link":"https:\/\/meetanshi.com\/blog\/fix-class-intldateformatter-not-found-in-magento-2\/","title":{"rendered":"How to Fix &#8220;Class IntlDateFormatter Not Found&#8221; in Magento 2"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">One of the most common &#8220;hidden&#8221; errors developers face especially during a new server setup or a <a href=\"https:\/\/meetanshi.com\/blog\/how-to-upgrade-magento-2-to-latest-version\/\">Magento 2 version <\/a>upgrade is:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Class &#8216;IntlDateFormatter&#8217; not found.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let us break down why this happens, how to identify it through practical test cases, and the step-by-step solution to resolve it permanently.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is the IntlDateFormatter Class?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The IntlDateFormatter is part of the PHP Internationalization extension (intl). Magento 2 relies heavily on this extension to handle:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Currency formatting for different regions.<\/li>\n\n\n\n<li>Date and time localization.<\/li>\n\n\n\n<li>Language-specific string comparisons.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">When this extension is missing or disabled in your PHP configuration, Magento&#8217;s core logic fails because it can no longer &#8220;format&#8221; the data it needs to display.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">When Does This Error Arrive?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You are most likely to encounter this error in one of the following scenarios:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Fresh Server Setup<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You have just pointed your domain to a new VPS or dedicated server. You upload your Magento files, but the moment you run the web installer or access the frontend, the &#8220;Class not found&#8221; error appears.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">PHP Version Upgrade<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You recently upgraded your server from PHP 8.1 to 8.2 or 8.3. While the new PHP version is active, the specific intl library was not carried over or installed for the new version.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">CLI vs. Web Browser Discrepancy<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">This is the most confusing case.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Your Magento frontend works fine, but when you try to run a command like <strong>php bin\/magento setup:upgrade<\/strong>, it fails.\u00a0<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This happens because the PHP configuration for the Command Line Interface (CLI) is often different from the one used by your Web Server (Apache\/Nginx).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Steps to Fix &#8220;Class IntlDateFormatter Not Found&#8221; in Magento 2<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The solution is to install and enable the PHP intl extension. The commands vary based on your operating system.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Verify the Missing Extension<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Run this command in your terminal to see if intl is listed:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">php -m | grep intl<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If the output is empty, the extension is missing.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Install the Extension<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">For Ubuntu\/Debian (using PHP 8.2 as an example):<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo apt-get update\nsudo apt-get install php8.2-intl<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Enable in php.ini<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If the extension is installed but still not working, locate your php.ini file (e.g., \/etc\/php\/8.2\/fpm\/php.ini) and ensure the following line is not commented out:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Ini, TOML\nextension=intl<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Restart Your Services<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">For the changes to take effect on the website, you must restart your web server or PHP service:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"># For Nginx users<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo systemctl restart php8.2-fpm\nsudo systemctl restart nginx<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"># For Apache users<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo systemctl restart apache2<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Once the extension is active, clear your Magento cache to ensure the system recognizes the environment change:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">php bin\/magento cache:clean\nphp bin\/magento cache:flush<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Pro-tip:<\/strong> Always keep a &#8220;PHP Info&#8221; file (info.php) handy in your root directory during development to quickly check which extensions are active in the browser versus the terminal.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The Class IntlDateFormatter not found error is a classic &#8220;environment gap&#8221; issue. It isn&#8217;t a bug in the Magento code itself, but a requirement of the server hosting it. By ensuring the PHP intl extension is installed and correctly enabled for both the web server and the CLI, you can resolve this crash in minutes.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the most common &#8220;hidden&#8221; errors developers face especially during a new server setup or a Magento 2 version upgrade is: Class &#8216;IntlDateFormatter&#8217; not&#8230;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[34],"tags":[],"class_list":["post-25662","post","type-post","status-publish","format-standard","hentry","category-magento"],"acf":[],"_links":{"self":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/25662","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/comments?post=25662"}],"version-history":[{"count":2,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/25662\/revisions"}],"predecessor-version":[{"id":25664,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/25662\/revisions\/25664"}],"wp:attachment":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/media?parent=25662"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/categories?post=25662"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/tags?post=25662"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}