• How to enable MBstring extension in CPanel or WHM VPS servers?

    What is Mbstring?

    The Mbstring is an extension of PHP and stands for multi-byte string functions. It is basically used to represent the non-ASCII strings. As there are many languages those can be represented by one to one mapping to an 8-bit value but also some languages those require more than 8-bit mapping, thus, they need the mbstring to encode multibyte characters and express more than 256 unique value or characters in the regular bytewise coding system. Mbstring is designed to handle Unicode-based encodings such as UTF-8 and UCS-2 and many single-byte encodings for convenience PHP Character Encoding Requirements.

    If you are dealing with some web applications based on PHP that deals in the multibyte characters language then it will require the mbstring PHP extension. Here is the way to install or enable the mbstring PHP extension on a server with WHM/Cpanel.

    How to enable mbstring PHP extension in WHM:

    Step 1: Login to your WHM (web hosting management) installed on VPS or dedicated server.

    Step 2: You need to log in it as root.

    Step 3: After successfully accessing the WHM, search the Software section from the left side options panel of the WHM.

    Step 4: Under the Software, click on the EasyApache.

    install mbstring in php WHM cpanel

    Step 5: On the top of the EasyApache4 you will find your current installed Cpanel profile that consists of all packages of Apache and PHP.

    easyapache4

    Step 6: Click on the Customize button.

    Step 7: From the left side given options select the PHP extensions.

    Step 8: Now in the search box type mbstring

    Step 9: The system will search and show you the available mbstring extensions corresponding to the available PHP versions.

    Step 10: If you want to enable mbstring for all available PHP version then simple toggle the button given in front of them. Or slide the toggle only to specific PHP version’s mbstring.

    Step 11: After enabling the mbstring, click on the Review option given on the left side.

    Enable mbstring whm

    Step 12: Scroll down and click on the Provision button. As you click on this button the WHM will install the mbstring php extension for all Cpanel account created under that.

    How to enable mbstring PHP extension in Cpanel:

    If you don’t want to enable the mbstring for all Cpanel accounts then the administrator or the user can directly login to its website’s Cpanel account to enable the mbstring PHP extension.

    Here for tutorial purpose, we are using the Godaddy Cpanel of some shared hosting. However, the steps will be the same for other hosting services such as Bluehost, Kinsta, Hostgator and more.

    1. Go to your Hosting provider.
    2. Login to access your website Cpanel Dashboard.
    3. Scroll down to the Software section of the Cpanel.
    4. Click on the option “Select PHP versionSoftware
    5. Now you will get a screen with all available PHP extensions. And on the top left side, you will see the drop down box to select the PHP version you want to enable for your website.
    6. Change the version, if you required otherwise leave it as it is.
    7. Now find the mbstring extension from the given extensions packages.
    8. When you found the mbstring, just check the box given in front of it in order to enable.enable mbstring using Cpanel
    9. After selecting the mbstring, click on the Save button given at the bottom.

     

    In this way, you can install or enable the mbstring PHP extension for your web applications from WHM or Cpanel.

     

    One Response

    1. Web Host Pro November 17, 2018

    Leave a Reply

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