How to Enable Missing mbstring PHP Module on WordPress

Is your WordPress website showing “one or more recommended modules are missing” and showing the optional module, mbstring, is not installed, or has been disabled on the WordPress site health section? Then don’t worry you can fix it using a very simple method.

Missing mbstring module WordPress

In this article, I will explain every possible way to enable the mbstring PHP extension on your server, whether you are using VPS hosting, Managed hosting, or Shared hosting.

Enable mbstring on Debian/Ubuntu/RHEL Based VPS Hosting

If the WordPress website is hosted on VPS hosting or Cloud VPS hosting, then you can easily enable the mbstring PHP extension. So first you make sure that your VPS is based on Debian or Ubuntu Linux operating system.

To enable the mbstring PHP extension, execute the following steps:

Step – 1. Connect VPS using SSH

Connect System using SSH on WindowsTerminal

First of all, you must connect to the system using Putty (Windows) or Linux Terminal. And execute the following command to install and enable mbstring.

Step – 2. Install mbstring PHP extension

Now execute the following command on the terminal to install the mbstring PHP extension on VPS hosting.

sudo apt install php8.1-mbstring
Note: - Frist you must check, which version of PHP is installed on your system. If PHP 7.4 or PHP 8.0 then you must execute the following commands, sudo apt install php7.4-mbstring, sudo apt install php8.0-mbstring respectively.

For RHEL, CentOS:

sudo yum install php-mbstring

Step – 3. Restart PHP-FPM and HTTP Server

If your system using PHP-FPM instead of mod_PHP (for mod_PHP no need to execute the following command) then, execute the following command to save changes on the system, to enable PHP mbstring module.

sudo service restart php8.1-fpm

Now after restarting PHP-FPM, you must restart the HTTP server. So, make sure which HTTP server you have on the system, and then execute the following command respectively:

Restart Apache on Debian/Ubuntu:

sudo service apache2 restart

Restart Apache on RHEL/CentOS:

sudo systemctl restart httpd.service

Restart Nginx on Debian/Ubuntu:

sudo service nginx restart

Restart Nginx on RHEL/CentOS:

sudo systemctl restart nginx

Enable mbstring on cPanel-based Hosting

Many WordPress website owners, whoever uses cPanel-based shared hosting faces this performance issue. The main reason behind this missing mbstring PHP module is that the hosting provider does not enable it by default. So, you have to do it yourself.

In this section, I will explain step-by-step, how you can enable the missing mbstring PHP extension on your WordPress website if you are using cPanel-based hosting.

Step – 1. Login to cPanel

login cpanel

First, log in to your cPanel dashboard, you can also log in directly via your hosting provider’s website.

Step – 2. Open “Select PHP Version”

select php selector

When you logged in to the cPanel dashboard, you will see lots of icons, you have to scroll down and need to click on “Select PHP Version”, which icon will be available in the Software section.

Step – 3. Mark Check on mbstring PHP extension

mbstring php extension on cPanel

Now, you will see the selected PHP version, which is currently enabled on the system and when you scroll down you will see, many PHP extensions, some of which are checked means enabled, and which are not, which means not enabled.

So, you must find mbstring and need a checkmark on it to enable the PHP extension and then refresh your WordPress health dashboard, and the performance warning will be gone.

Note: - If you haven’t found the mbstring PHP extension using this method, then you must contact your hosting provider to enable it.

Enable mbstring on Hostinger hPanel

Hostinger is a very popular web hosting provider and is primarily known for its affordable pricing and beginner-friendly support. If you are using Hostinger hosting and facing this mbstring PHP module missing issue with your WordPress website, then follow these simple steps to fix it by yourself.

Step – 1. Login Hostinger Dashboard

Hostinger Control Panel hPanel-Login

First, you must log in to the Hostinger dashboard, and then go hosting management side. Hostinger uses its custom control panel, known as hPanel.

Get Hostinger Hosting

Is Your Website Slow?

Migrate to Hostinger and get up to 80% off on all shared hosting plans. Hostinger is one best hosting in terms of performance and affordability. Starts at $1.99/mo.

Step – 2. Go To Advanced Setting

Hostinger PHP Configuration Advanced Setting

When you logged in to the Hostinger hPanel, then scroll down and find the “Advanced” section, where you will see “PHP Configuration”, you must click on it.

Step – 3. Select PHP Configuration

When you open the PHP Configuration page on Hostinger’s hPanel, you will see the option to select the PHP version, but in this case, you have to click on PHP extensions as shown in the image above.

Hostinger PHP Configuration Enable extension

Now, as shown in the image above, you much check on the “mbstring” PHP extension to enable it. Afterward, refresh and clean the cache of your WordPress site.

Enable mbstring on Plesk Control Panel

Some shared hosting providers give you a Plesk control panel, instead of cPanel. However, it is not so hard to use, and you can customize almost everything on your own.

Cloud hosting provider like Digital Ocean and Linode gives you Plesk one-click deployable application and there you can host multiple websites on it like cPanel.

In case, you have a WordPress website it shows performance issues or missing optional modules like mbstring or Imagick PHP modules, you can fix it via the following steps.

Step – 1. Login to Plesk Hosting Dashboard

Plesk Control Panel Login

If you installed Plesk on VPS or a Dedicated server, you can log in via your specific URL as mentioned below. And if you are using Plesk on any shared hosting platform then you can directly login to Plesk using the hosting provider’s link.

VPS or Dedicated Server user:

https://<your domain name or the server IP address>:8443

Step – 2. Go-To Tools & Settings and Click on PHP Settings

Plesk Control Panel Tools and Settings

After logging in to the Plesk control panel, you will find the “Tools & Settings” option on the left sidebar as shown in the image above. Click on it and in the General settings you will find “PHP Settings” where you can see which version of PHP is installed in the system.

Step – 3. Select PHP which is currently enabled

Installed and Enabled PHP on Plesk Control Panel

For example, I was using the PHP 8.0 version on my WordPress website, and you must make sure which version of PHP is enabled for your WordPress website. Then select the one which is enabled.

Step – 4. Enable mbstring PHP extension

When you select the PHP version, the Plesk control panel will show you a bunch of PHP extensions, which are enabled, and some of them are not. In our case, if the mbstring PHP extension was disabled so, we have to checkmark on it to enable it.

Enable mbstring php extension on Plesk

After that click on the “OK” button to save the modifications and refresh the WordPress dashboard and clean the cache files. Afterward, you can check the site’s health, and probably the performance issue will be fixed.

Install mbstring PHP extension on XAMPP (Windows)

Have you Installed XAMPP on Windows PC and tested out WordPress on it? If yes, then probably you saw some performance issues on your WordPress dashboard. For example, we are going to how we can fix the missing mbstring PHP extension on Windows. Perhaps using the same method, you can fix other missing modules like missing Imagick, zip, fileinfo, etc.

Step – 1. Download php_mbtstring.dll

XAMPP PHP Extension Directory

Download, the php_mbstring.dll file from the official site. Then as shown in the image above you must find the XAMPP PHP extension directory, then move the downloaded dll file into it. The directory should be:

xampp_installation_folder>xampp>php>ext

Step – 2. Edit php.ini file

Edit XAMPP php.in file

After moving the php_mbstring.dll file into the PHP extension directory, we must also locate the php.ini file. Where we must comment out (need to remove semicolon) the extension=mbstring as shown in the image below.

Remove semicolon:

Comment out extension mbstring php on Windows

To edit the php.ini file you can use any popular text editor on Windows. Then remove the semicolon before the extension.

;extension=mbstring to extension=mbstring

FAQs

What is the mbstring PHP extension?

PHP mbstring provides a multibyte-specific string function that helps you deal with multibyte encodings in PHP. In addition to that, mbstring handles character encoding conversion between the possible encoding pairs. Mbstring is designed to handle Unicode-based encodings such as UTF-8 and UCS-2 and many single-byte encodings for convenience.

How to check the mbstring PHP extension?

You can check mbstring using the php -m command on the Linux system and in Windows, you can check the following PHP extension directory.

Summary

Fixing the php_mbstring extension for the WordPress website is very easy, using the following method, which is mentioned above. In case you are using Managed WordPress hosting and don’t have access to the backend then, you must contact the hosting provider to fix it.

Perhaps you should choose a good hosting platform to host your website for the best possible performance, and by using hosting like ChemiCloud or HostGator you don’t have to figure out any performance issues.


Pronay Sarkar

Hello!
I am Pronay Sarkar, I love to write about tech and stuff. I am a college graduate from the University of Delhi.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.