Adding PHP extensions (pdo, mysqli, gd, etc) to your Linux cPanel VPS / Cloud
In order to enable MySQLi or ANY other PHP and Apache extensions or modules that are required for your website, you need to access the already available Easy Apache tool developed by cPanel, which gives you the ease and flexibility to manage every aspect of website stack.
Please, review the following step-by-step video:
Or follow these steps:
1. Log into the WHM with your root credentials.
2. Go to the "EasyApache (Apache Update)" menu, located in the "Software" section or use the search box to find it.
3. On the EasyApache page, make sure your Previously Saved (Default) configuration is selected and click on "Customize Profile".
4. Review all extensions, and modules that you'd like to add/change. Click on "Next Step" to continue.
5. Click on the "Exhaustive Options List" when you reach this section, to get more options regarding PHP extensions, and settings.
6. On this page, scroll down to the PHP section and find MySQL “Improved” extension (or any other extension you want to add)
You can use the page search option of your browser to locate the extension faster (Ctrl+F).
7. Ensure the check box is filled in and scroll to the bottom.
8. Click the "Save Only" button. IMPORTANT: We recommend that you save the new profile under different name, so in case of a problem to revert back to the original profile used
9. On the next page, click the "Build profile I just saved" button.
10. A pop box will appear and ask you to recompile Apache and PHP, select "Yes" and "I understand", if prompted.
11. Wait until the Build ouput is complete and the MySQLi extension should be installed/enabled.
IMPORTANT: Please do NOT log out of the WHM or interrupt the rebuild process and wait for it to be completed. This may take a while to complete (more than 30 minutes), so be patient!
DOWNTIME: Please, be careful not to make too many changes to your setup at ones, unless you are certain that the changes won't break your website. There should be no downtime while you are rebuilding your Apache, however there might be short downtime when EasyApache is rebuild and the Apache process need to be restarted. If your site/application does NOT work after the rebuilt of your Apache, we recommend that you revert back the changes you have made, and start over. Please, plan for downtime according to your needs, and availability needs of your website.