How to install PHP and the “intl” extension on a Virtualmin Debian server

by | Jun 2, 2022 | Technical Help, Web Hosting, WordPress

Not too long ago, I wrote an article indicating Some Great Reasons to use a Local Debian Server running Virtualmin. In it, I mentioned that I had built a Debian 10 server to try out the Virtualmin control panel. Virtualmin is a control panel that allows adding of websites to a server for access to a private or public network.

When building the server and testing its operation for handling WordPress websites, there were a couple of snags I ran into. Hopefully the info here can save you some hassle in looking up how to fix those. This article is the result of pouring through many websites and deciphering the usually cryptic Linux info and putting together some “How to” information written in English to possibly help save you some time.

Getting and Setting up PHP versions

After setting up Virtualmin on a Debian 10 server, the first thing I noticed was that only PHP 7.3 was available. So, the hurdle I had to overcome was how to at least change the PHP version to PHP 7.4 or PHP 8.0. As it turns out, it was fairly straightforward and turned out even better than I had expected.

I was able to add the following versions to the system:

  • PHP 5.6 (long past end of life but we have kept it available for compatibility of very much older sites)
  • PHP 7.3 (this version was the only one already installed when I loaded up Virtualmin and got it running – we have been removing this version from many of our production servers and will keep it on several servers for sites that might not be able to run without it)
  • PHP 7.4 (not past end of life at the time of this writing but is the oldest version that WordPress will not squawk about in its Dashboard’s Tools > Site Heath checker)
  • PHP 8.0 (we run this on our production servers at the time of this writing)
  • PHP 8.1 (we run this on our production servers at the time of this writing)
  • PHP 8.2 (the newest version at the time of updating this writing 2/16/23 and great to have this as well since we can start testing new sites on this so they will be up-to-date for a longer time period and can roll a site back to older versions if plugins and themes do not function under it)

Setting these additional PHP versions up in Debian required root access. Once I discovered the correct syntax it was easier than I thought it would be. I used PuTTY installed on a Windows 10 workstation to log in as the root user.

NOTE: The following paragraph was added when I went to install additional versions onto a new Virtualmin box running Debian 11.

A stumbling block I had to get past was that I didn’t have the correct repository installed for my Virtualmin setup. This solves that issue:

apt-get -y install apt-transport-https lsb-release ca-certificates curl && curl -sSL -o /etc/apt/trusted.gpg.d/php.gpg && sh -c 'echo "deb $(lsb_release -sc) main" > /etc/apt/sources.list.d/sury-debian-php-$(lsb_release -sc).list' && apt-get update

Then I individually executed the commands below which installed the various versions of PHP:

apt-get install php5.6-{cli,pdo,fpm,zip,gd,xml,mysql,cgi,intl,opcache,curl,imagick,sqlite,mbstring}
apt-get install php7.3-{cli,pdo,fpm,zip,gd,xml,mysql,cgi,intl,opcache,curl,imagick,sqlite,mbstring}
apt-get install php7.4-{cli,pdo,fpm,zip,gd,xml,mysql,cgi,intl,opcache,curl,imagick,sqlite,mbstring}
apt-get install php8.0-{cli,pdo,fpm,zip,gd,xml,mysql,cgi,intl,opcache,curl,imagick,sqlite,mbstring}
apt-get install php8.1-{cli,pdo,fpm,zip,gd,xml,mysql,cgi,intl,opcache,curl,imagick,sqlite,mbstring}
apt-get install php8.2-{cli,pdo,fpm,zip,gd,xml,mysql,cgi,intl,opcache,curl,imagick,sqlite,mbstring}

If you are using a CentOS based system, you should use these commands instead:

yum install php5.6-{cli,pdo,fpm,zip,gd,xml,mysql,cgi,intl,opcache,curl,imagick,sqlite,mbstring}
yum install php7.3-{cli,pdo,fpm,zip,gd,xml,mysql,cgi,intl,opcache,curl,imagick,sqlite,mbstring}
yum install php7.4-{cli,pdo,fpm,zip,gd,xml,mysql,cgi,intl,opcache,curl,imagick,sqlite,mbstring}
yum install php8.0-{cli,pdo,fpm,zip,gd,xml,mysql,cgi,intl,opcache,curl,imagick,sqlite,mbstring}
yum install php8.1-{cli,pdo,fpm,zip,gd,xml,mysql,cgi,intl,opcache,curl,imagick,sqlite,mbstring}

Checking the Versions in Virtualmin

Once the PHP versions above were installed on the server, I did the following:

  • Logged into my Virtualmin
  • Chose the Webmin tab
  • Clicked on Refresh Modules
  • Clicked on Dashboard
  • Scrolled down and viewed Servers Status

My additional versions of PHP were now showing there along with other servers.

The missing “intl” PHP extension

I was pretty pleased with how everything looked at this point so I decided to test out a WordPress installation. Note that actually setting up a website server in Virtualmin is beyond the scope of this particular article but will be the topic of a future one.

I set up a test website on a domain already pointed to the server. I then used the WordPress install script in it. While I ran through the process and didn’t really notate a lot while doing it, I recall that after answering a number of questions in the script when WordPress came up with its installation screen it did not seem to recall my username and password, so I had to enter those again. After that, I actually had WordPress complete its install.

Once in the new WordPress installation’s Dashboard, I immediately went to Tools > Site Health to see what WordPress itself thought of its environment. At that point it told me that I was missing the intl PHP extension. The intl PHP extension is indicated by WordPress to be an optional extension, but as a rule I always add what WordPress suggests n order to get a clean Site Heath reading whenever possible.

What “intl” is

I hadn’t recalled previously coming across intl before. The PHP Documentation indicates that intl is the internationalization extension. It goes on to indicate that intl is a wrapper for ICU library, enabling PHP programmers to perform various locale-aware operations including but not limited to formatting, transliteration, encoding conversion, calendar operations, UCA-conformant collation, locating text boundaries and working with locale identifiers, time zones and graphemes.

Adding the “intl” PHP extension

Researching setting up intl in PHP revealed even more cryptic bits and pieces of information that I had to experiment with to figure out how to finally install the missing intl PHP extension. As is nearly always the case, once the answer was discovered it was actually amazingly simple.

Adding the intl PHP extension in Debian required root access. Once I discovered the correct syntax, it was, much like when I was adding the PHP versions, easier than I thought it would be. I used PuTTY installed on a Windows 10 workstation to log in as the root user. Then I individually executed the commands below, which installed the various versions of PHP intl:

apt-get install php5.6-intl
apt-get install php7.3-intl
apt-get install php7.4-intl
apt-get install php8.1-intl
apt-get install php8.2-intl

If you are using a CentOS based system, you should use these commands instead:

yum install php5.6-intl
yum install php7.3-intl
yum install php7.4-intl
yum install php8.1-intl
yum install php8.2-intl

Once you have installed these, each PHP version needs to be restarted. That can be done using these steps in Virtualmin:

  • Log into Virtualmin
  • Choose the Webmin tab
  • Clicked on Refresh Modules
  • Clicked on Dashboard
  • Scrolled down and viewed Servers Status
  • Click the Restart PHP-FPM Server symbol after each of your PHP versions

That was it. I was then able to go into the WordPress installation and get a Site Health indication of a smiley face with its indication of “Great job! Everything is running smoothly here.”

Blog website site health indicator

CLICK HERE to find your domain name!   CLICK HERE to transfer your domain name!



24 hour (1) Accessibility (2) Accounting (1) Advertising (15) AdWare (1) Alex Johnson (2) Alignment (1) Android (2) Anti-Virus (1) Antivirus (1) Antrim Computer Repair and Service (3) APC Back-UPS (1) Appearance (2) Apple Mail (4) Apple Mobile Mail (2) Attachments (1) Audit (1) Authorized (1) Autoresponder (5) Availability (1) Backups (1) Badges (3) Bank Account (1) Bank Statement (1) Battery Backup (2) Better Business Bureau (3) Bob Hill (1) Bookkeeper (1) Branding (8) Budget (2) Business (26) Business Management (1) Catalog (1) Categories (1) Charles Oropallo (1) CharlesWorks (42) Cherryl Jensen (1) Chrome (1) Cloud (1) Code (2) Communicating (1) Competition (1) Computer (2) Computer Cache (1) Computer Hardware (1) Computer Security (2) Constant Contact (1) Consultation (1) Contact Information (2) Content (1) Content Management (33) Content Management System (1) Copiers (1) Copy Machine (1) Coronavirus (2) Courteous (1) COVID-19 (3) Credibility (9) Credit Card (1) Credit Card Processing (1) CSS (9) Customer Service (2) Database (1) Debian (1) Design (45) Design Expertise (1) Desktop (1) Dialup (1) DirectAdmin (4) Directions (1) DIVI (7) DNS (2) Do-it-Yourself (1) Documentation (1) Domains (18) Domain Transfers (5) E-Commerce (1) ecommerce (1) Elementor (1) Email (63) Email Lists (4) Email Management (2) Email marketing (3) Etiquette (3) Eudora 6 (1) Exchange (1) Expanding (1) Facebook (1) Financial (1) Finish (1) Firefox (1) Fonts (1) Forms (2) Forms Protection (1) Fraud (2) Galaxy S4 (1) General Info (1) Gmail (1) GoDaddy (1) Google (1) Google Adwords Certified Partner (1) Google Chrome (2) Groups (1) Happy Holidays (1) Hardware Help (1) Hill Specialty Networks (1) Hosting (1) Images (1) IMAP (1) include (1) Infected (1) Information (32) insert pages (1) install (1) Internet Browsing Errors (1) Internet Consultant (1) Internet Explorer (1) Joomla! (1) Keywords (2) Laptop (1) Legibility (1) Linux (9) Logging on (1) Macintosh (1) Mail 6.0 (1) Mail 2011 (2) Make-Over (1) Malicious (1) Malware (1) Marketing (8) Matt Burke (3) MDaemon (3) MelbourneIT (2) menu (1) Merchant (1) meta (1) Microsoft (1) Microsoft Edge (1) Microsoft Hosted Exchange (5) Microsoft Live (2) Mobile Email Setup (1) Monadnock Region (1) Mozilla Firefox (2) MySQL (1) Nathan Wesley (1) Netscape (1) Netscape Messenger (1) Office Copiers (1) OfficeLive (1) Online (1) Outlook (9) Outlook 2010 (2) Outlook Express (1) PayPal (1) Pay Per Click (2) PC (1) Personal (1) Peter Harris (1) Peter Harris Creative (1) Phishing (2) PHP (3) pixel (1) plugins (1) Pop Email (1) Popularity (1) Portfolio (1) Power Grid Failure (1) PPC (1) Prevent Fraud (1) Privacy (1) Private (1) Product (6) products (1) Professional (5) Projects (2) Protect (1) Protection (1) QR codes (1) Quality (2) QuickBooks (1) Reconciliation (1) Reduce Risk (1) Register (1) Reliability (2) Renew (1) Reseller (2) Resolution (1) Restrict User Access (1) Results (1) Review (2) Risk (1) Robin Snow (1) Roundcube (1) Safe (1) Samsung (2) Scam (16) Scammer (16) Search (1) Search and Replace (1) Search Engine Optimization (SEO) (20) Security (24) Security Risk (1) Selling (1) Servers (2) Service (11) Shopping Cart (1) Site (1) SmarterMail (9) Social Engineering (1) Social Networking (1) Software (1) Solutions for Today (1) Spam (1) Spam Filtering (15) Spammer (1) Spyware (2) SquirrelMail (1) SSL (8) Statistics (2) Stats (2) Stone Pond Technology (1) Storage (1) Support (1) Tablet (1) Target Market (1) Technical Help (1) Testimonials (9) The CW Corner (1) Thom Little (1) Thom Little Associates (1) Thunderbird (3) Thunderbird 10 (2) TLD (1) Topic (1) Top Level Domains (3) Transaction (2) Transfer Data (1) Transfer Funds (1) Typography (1) Update (2) Uploading (1) UPS System (2) Up to Date (1) Virus (2) Viruses (1) Vista (1) Web (1) Web-Over (1) Web Development (99) Web Hoster (1) Web Hosting (2) Web Hosting Company (1) Web Mail (1) Webmail (8) Webmaster (10) Web Presence (26) Website (110) Website Development (1) websites (2) Web Stats (1) Web terms (1) Web Writing (1) Windows 7 (2) Windows Mail (6) Windows XP (1) WooCommerce (5) WordPress (88) WordPress Updates (1) Working Remote (2) Writing (1) YouTube (1)

Protected by Security by CleanTalk and CleanTalk Anti-Spam