How to enable the intl extension

Overview

The intl extension is compiled in PHP, but it's not enabled by default. To enable it, you just need to make a small addition to your phprc file.

It's not possible to enable this if your site is running PHP 7.0 on a server running Ubuntu Bionic. Please note that PHP 7.0 has already been EOL'd by php.net, so it's highly recommended that you use a newer version as this will soon be removed from DreamHost servers.

Error you may see if this is not installed

If this extension is missing, your site may throw different errors. Here is one error that may appear in WordPress.

Fatal error: Uncaught Error: Class 'NumberFormatter' not found

The DreamHost phprc file

The standard term for a PHP configuration file is php.ini. However, DreamHost uses the term "phprc" file instead. This acts the same way – only the name is different. In this article, only the term phprc is used.

View the following articles for instructions on how to create a phprc file.

If the file already exists, view the following articles for instructions on how to update it (depending on if you're using an FTP client or SSH):

Enabling the intl extension

Add the following line to your phprc file.

extension=intl.so

Kill off all running php processes

Make sure to kill running php processes to ensure your new settings take effect.

Confirming your changes

After you've edited the file and killed off all PHP processes, check to confirm the extension has been enabled. You can do this by creating a phpinfo.php file. You should see the following:

If you do not see your changes have updated, try killing off your PHP processes again:

See also

Did this article answer your questions?

Article last updated PST.