Follow this step-by-step guide:
MongoDB works only with the CloudLinux PHP Selector, not with MultiPHP Manager.
Log in to your cPanel account.
Switch your primary PHP version to CloudLinux PHP Selector.
📖 For detailed instructions, check this guide:
👉 How to Switch from MultiPHP Manager to CloudLinux PHP Selector
In cPanel, scroll to the Software section.
Click Select PHP Version.
In the PHP Selector, you’ll see your current PHP version.
Select the required PHP version (make sure it matches your app requirements).
Click Set as Current.

Below the PHP version, you’ll see a list of available PHP extensions.
Scroll and find mongodb.
Tick the checkbox next to it to enable.
Click Save (if needed).

Go back to Select PHP Version – if mongodb remains ticked, it’s enabled.
Create a file phpinfo.php in your public_html folder with this code: <?php phpinfo(); ?>
Open it in your browser (e.g., https://yourdomain.com/phpinfo.php).
Search for mongodb. If it appears, the addon is active.
Switch from MultiPHP Manager → CloudLinux PHP Selector.
Go to Select PHP Version.
Tick mongodb and save.
Verify using PHP Selector or phpinfo().
Your MongoDB addon is now successfully enabled in cPanel.
⚡ Pro Tip: Always make sure your application is compatible with the PHP version you choose before enabling extensions.