How to Enable utf8mb4 Support Using CloudLinux PHP Selector in cPanel
How to enable utf8mb4 support in PHP for proper emoji and international character display using CloudLinux PHP Selector.
Overview
This guide explains how to enable utf8mb4 support in your PHP configuration using the CloudLinux PHP Selector in cPanel. The utf8mb4 character set is essential for storing special characters, including emojis, international characters, and special symbols.
Why Enable utf8mb4?
Default UTF-8 Limitations
With standard UTF-8, you might encounter these issues:
- Emojis appear as � or ????
- Some special characters don't display correctly
- Chinese, Japanese, or Korean characters may break
- Database errors when storing certain characters
Benefits of utf8mb4
After enabling utf8mb4, you get:
- Full emoji support in your content 😊 🎉 👍
- Complete support for Chinese, Japanese, and Korean text
- Proper handling of special characters and symbols
- No more character storage errors
- Better multilingual content support
Prerequisites
- Access to your cPanel account
Step-by-Step Instructions
1. Access cPanel
- Log in to your cPanel account
- Use the credentials provided by WPCloud

2. Locate PHP Selector
- Scroll to the "Software" section
- Look for "Select PHP Version" or "PHP Selector"
- Click to open the PHP configuration panel

3. Select PHP Version
- Choose your desired PHP version from the dropdown menu
- Note: WPCloud recommends PHP 8.1 for optimal performance
4. Modify Extensions
Locate these critical extensions:
mysqli
pdo_mysql
nd_mysqli
nd_pdo_mysql
5. Disable Standard Extensions
Uncheck the boxes next to:
- [❌] mysqli
- [❌] pdo_mysql
6. Enable ND Extensions
Check the boxes next to:
- [✓] nd_mysqli
- [✓] nd_pdo_mysql
7. Save Configuration
- Click "Save" or "Apply Changes"
- Wait for the confirmation message
Verification Steps
After enabling utf8mb4 support, verify the changes:
- Check PHP Info
- Create a test file named
info.php
- Add this code:
- Look for
nd_mysqli
andnd_pdo_mysql
in the loaded extensions
<?php phpinfo(); ?>
- Test Character Support
- Try adding emojis to your content
- Test with international characters
- Verify existing content displays correctly
Troubleshooting
Common Issues
- Website Errors After Change
- Clear your browser cache
- Clear PHP opcode cache
- Verify all extensions are properly enabled
- Character Display Problems
- Ensure proper HTML meta charset tags
- Check database collation settings
- Verify content encoding in your CMS settings
Reverting Changes
If you need to return to the original configuration:
- Access PHP Selector in cPanel
- Uncheck:
- [❌] nd_mysqli
- [❌] nd_pdo_mysql
- Check:
- [✓] mysqli
- [✓] pdo_mysql
- Save changes
Important Notes
- This change affects PHP-MySQL interaction only
- Database content remains unchanged
- No data migration is required
- Changes take effect immediately
- Some applications may require additional configuration
When to Contact Support
Contact WPCloud support if you:
- Experience persistent character display issues
- Notice unusual character rendering
- Need help with specific application configurations
- Cannot access PHP Selector
Contact methods:
- Support portal: support.wpcloud.ca/clientarea.php
- Email: support@wpcloud.ca
Best Practices After Changes
- Clear your site's cache
- Test by adding some emojis to a test post
- Check existing content with special characters
Remember: While enabling utf8mb4 support is generally safe, always ensure your applications are compatible with the new configuration. If you encounter any issues, WPCloud's support team is here to help.
Last updated on November 13, 2024