{"id":4893,"date":"2019-06-18T10:00:15","date_gmt":"2019-06-18T04:30:15","guid":{"rendered":"https:\/\/pheonixsolutions.com\/blog\/?p=4893"},"modified":"2026-10-27T12:20:16","modified_gmt":"2026-10-27T06:50:16","slug":"fixedyour-php-installation-appears-to-be-missing-the-mysql-extension-which-is-required-by-wordpress","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/fixedyour-php-installation-appears-to-be-missing-the-mysql-extension-which-is-required-by-wordpress\/","title":{"rendered":"How to Fix PHP Missing MySQL Extension in WordPress After EasyApache 4 Migration"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>Post Date:<\/strong> June 18, 2019 <br><strong>Last Updated:<\/strong> October 27, 2026<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This guide explains how to fix the WordPress error that appears on cPanel servers after moving from EasyApache 3 to EasyApache 4:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Your PHP installation appears to be missing the MySQL extension which is required by WordPress.\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">When PHP is missing the MySQL extension, WordPress can&#8217;t talk to its database, so every WordPress site on the server can show this error at once. EasyApache 4 builds PHP from separate packages, one for each PHP version and one for each extension. If the profile you migrated with didn&#8217;t include the MySQL extension for a PHP version, that version starts without it. The fix is to install it for the PHP versions your sites actually use.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The original guide gave the right idea, but its command could install far more than you need and it skipped several steps. This update fixes that.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"464\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/06\/Screen-Shot-2019-06-18-at-9.56.09-AM-1024x464.png\" alt=\"\" class=\"wp-image-4894\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/06\/Screen-Shot-2019-06-18-at-9.56.09-AM-1024x464.png 1024w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/06\/Screen-Shot-2019-06-18-at-9.56.09-AM-300x136.png 300w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/06\/Screen-Shot-2019-06-18-at-9.56.09-AM-768x348.png 768w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/06\/Screen-Shot-2019-06-18-at-9.56.09-AM.png 1678w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Before you fix PHP missing the MySQL extension, make sure you have:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Root access to the cPanel server, with WHM access<\/li>\n\n\n\n<li>The domain of one affected WordPress site<\/li>\n\n\n\n<li>A backup or snapshot, if this is a production server<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Architecture<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A visitor requests a WordPress page, and Apache hands the request to the PHP version assigned to that domain<\/li>\n\n\n\n<li>WordPress code runs in that PHP version and reaches MySQL through the <code>mysqli<\/code> extension, which the <code>php-mysqlnd<\/code> package provides. Despite the old wording of the message, current WordPress uses <code>mysqli<\/code><\/li>\n\n\n\n<li>EasyApache 4 PHP extensions are packaged separately for each version, such as <code>ea-php74-php-mysqlnd<\/code>. Installing it for one version doesn&#8217;t add it to the others<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The image below shows what happens when PHP is missing the MySQL extension. For general background, see cPanel&#8217;s <a href=\"https:\/\/docs.cpanel.net\/\" target=\"_blank\" rel=\"noopener\">documentation<\/a> and WordPress&#8217;s <a href=\"https:\/\/wordpress.org\/about\/requirements\/\" target=\"_blank\" rel=\"noopener\">server requirements<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/06\/PHP-Missing-MySQL-Extension-Architecture.png\"><img decoding=\"async\" width=\"1024\" height=\"683\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/06\/PHP-Missing-MySQL-Extension-Architecture-1024x683.png\" alt=\"\" class=\"wp-image-12504\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/06\/PHP-Missing-MySQL-Extension-Architecture-1024x683.png 1024w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/06\/PHP-Missing-MySQL-Extension-Architecture-300x200.png 300w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/06\/PHP-Missing-MySQL-Extension-Architecture-768x512.png 768w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/06\/PHP-Missing-MySQL-Extension-Architecture-272x182.png 272w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/06\/PHP-Missing-MySQL-Extension-Architecture.png 1536w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Steps to Fix PHP Missing the MySQL Extension<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. Find the PHP Version Your Site Uses<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In WHM, go to <strong>Software \u2192 MultiPHP Manager<\/strong> and find the affected domain. Note its PHP version, for example <code>ea-php74<\/code>. This tells you which PHP version is missing the MySQL extension. If several versions are in use, repeat the fix for each one.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To see which EasyApache 4 PHP versions exist on the server:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">ls \/opt\/cpanel | grep ea-php\n<\/pre>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">If a site is on an old PHP version that has reached end-of-life, consider moving it to a supported version in MultiPHP Manager while you&#8217;re here, after confirming the site works on it.<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">2. Install the Extension<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You can do this in WHM or on the command line.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Method 1: In WHM&#8217;s EasyApache 4 PHP extensions<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Log in to WHM as root and go to <strong>Software \u2192 EasyApache 4<\/strong><\/li>\n\n\n\n<li>Next to your currently active profile, click <strong>Customize<\/strong><\/li>\n\n\n\n<li>Open the <strong>PHP Extensions<\/strong> tab<\/li>\n\n\n\n<li>Find <code>php-mysqlnd<\/code> for your PHP version and switch it on<\/li>\n\n\n\n<li>Click <strong>Review<\/strong>, then <strong>Provision<\/strong><\/li>\n<\/ol>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><strong>Note:<\/strong> The original guide stopped at &#8220;enable \/ install it&#8221;. In EasyApache 4, nothing changes until you review and <strong>provision<\/strong> the profile, so that last step matters.<\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Method 2: On the command line<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To fix PHP missing the MySQL extension from the command line, install it for the specific version you found in Step 1:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">yum install ea-php74-php-mysqlnd\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Replace <code>74<\/code> with your version. To list what&#8217;s available:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">yum list available \"ea-php*-php-mysqlnd\"\n<\/pre>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><strong>Note:<\/strong> The original used <code>yum install ea-php*-mysql*<\/code>. That wildcard can install the extension for every PHP version in the repository, which can pull in PHP versions you don&#8217;t use, including old ones. Install it only for the versions your sites run.<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">3. Confirm the Extension Is Loaded<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To confirm PHP is no longer missing the MySQL extension, check the version you installed for, using its own command-line binary:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/opt\/cpanel\/ea-php74\/root\/usr\/bin\/php -m | grep -i mysql\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You should see <code>mysqli<\/code>, <code>mysqlnd<\/code>, and <code>pdo_mysql<\/code> listed.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">4. Restart the Web Services<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Installing a package usually reloads the services, but if the error persists, restart both Apache and PHP-FPM:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/scripts\/restartsrv_httpd\n\/scripts\/restartsrv_apache_php_fpm\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">5. Reload the Site<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Open the affected WordPress site and refresh. Installing the extension clears the error about missing the MySQL extension, and the site should load normally.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If WordPress still says PHP is missing the MySQL extension, check these:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>You fixed the wrong PHP version.<\/strong> The domain may use a different version than the one you installed for. Recheck it in MultiPHP Manager<\/li>\n\n\n\n<li><strong>The extension isn&#8217;t loaded.<\/strong> Run the check in Step 3 for that exact version. If nothing shows, repeat Step 2<\/li>\n\n\n\n<li><strong>A different error appears.<\/strong> If WordPress now shows &#8220;Error establishing a database connection,&#8221; the extension is fine and the problem is the database credentials in <code>wp-config.php<\/code>, or MySQL itself not running<\/li>\n\n\n\n<li><strong>Other features are broken too.<\/strong> Migrating profiles can drop more than one extension. Compare what the site needs, commonly <code>gd<\/code>, <code>mbstring<\/code>, <code>curl<\/code>, <code>zip<\/code>, <code>xml<\/code>, and <code>intl<\/code>, against what&#8217;s enabled in the EasyApache 4 PHP Extensions tab<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To fix PHP missing the MySQL extension after an EasyApache 4 migration, find the PHP version each site uses, install <code>php-mysqlnd<\/code> for that version in WHM (reviewing and provisioning the profile) or with <code>yum install ea-phpXX-php-mysqlnd<\/code>, then confirm it loads and restart Apache and PHP-FPM. Avoid the wildcard install from the original guide, which can add PHP versions you don&#8217;t need.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Frequently Asked Questions<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Why is PHP missing the MySQL extension after migrating to EasyApache 4?<\/strong> EasyApache 4 packages each PHP version and extension separately. If the profile you migrated with didn&#8217;t include <code>php-mysqlnd<\/code> for a PHP version, that version runs without it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Does the extension need to be installed for every PHP version?<\/strong> Only for the versions your sites use. Each version has its own package, so installing it for one doesn&#8217;t help sites on another.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Can I fix a site that&#8217;s missing the MySQL extension without root access?<\/strong> Not through the steps above, since they need WHM or root. Contact your hosting provider and ask them to enable <code>php-mysqlnd<\/code> for your PHP version.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Where do I manage EasyApache 4 PHP extensions in WHM?<\/strong> Go to <strong>Software \u2192 EasyApache 4 \u2192 Customize<\/strong> and open the <strong>PHP Extensions<\/strong> tab. Remember to review and provision the profile afterward.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Why does the message say MySQL when WordPress uses mysqli?<\/strong> The message text is old. Modern WordPress connects through the <code>mysqli<\/code> extension, which <code>php-mysqlnd<\/code> provides, so installing that package is the correct fix.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Related Articles<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/php2shell-vulnerability\/\" target=\"_blank\" rel=\"noreferrer noopener\">PHP2Shell Vulnerability: How to Protect Your PHP Server from CVE-2026-109618 and CVE-2026-109619<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/how-to-install-and-use-php-composer-on-centos-7\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to Install and Use PHP Composer on CentOS 7<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Talk to Our Technology Experts<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Migrating to EasyApache 4 or troubleshooting WordPress errors across a cPanel server? Our team can help with cPanel and WHM administration, PHP configuration, WordPress support, and ongoing hosting management.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/pheonixsolutions.com\/contact\">Connect with our technology experts.<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Post Date: June 18, 2019 Last Updated: October 27, 2026 Introduction This guide explains how to fix the WordPress error [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":12505,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1020],"tags":[683,682,684],"class_list":["post-4893","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-containers-kubernetes","tag-missing-the-mysql-extension","tag-php-installation","tag-wordpress-site","psol-cat-containers-kubernetes"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/phn2x7-1gV","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/06\/Fix-WordPress-MySQL-Extension-Error.png","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/4893","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=4893"}],"version-history":[{"count":1,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/4893\/revisions"}],"predecessor-version":[{"id":12506,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/4893\/revisions\/12506"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media\/12505"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=4893"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=4893"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=4893"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}