{"id":216,"date":"2021-07-15T03:13:36","date_gmt":"2021-07-15T03:13:36","guid":{"rendered":"https:\/\/tiruppurwebhosting.com\/blog\/?p=216"},"modified":"2021-07-15T03:18:22","modified_gmt":"2021-07-15T03:18:22","slug":"php-installation-appears-to-be-missing","status":"publish","type":"post","link":"https:\/\/tiruppurwebhosting.com\/blog\/php-installation-appears-to-be-missing\/","title":{"rendered":"Easy fix :Your PHP installation appears to be missing the MySQL extension"},"content":{"rendered":"<h1 class=\"article-title__title\"><span style=\"text-decoration: underline;\">How to Fix \u201cYour PHP Installation Appears to Be Missing the MySQL Extension Which Is Required by WordPress\u201d Error<\/span><\/h1>\n<p>When you try to install word press or after installed word press while visiting you site encounter an error that says \u201cYour PHP installation appears to be missing the MySQL extension which is required by WordPress.\u201d?<\/p>\n<p>This word press error message can be so annoying and frustrating to encounter a problem that prevents you from using\/accessing your <a href=\"https:\/\/www.squarebrothers.com\/wordpress-web-hosting-india\/\" target=\"_blank\" rel=\"noopener\">WordPress<\/a> site.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-218\" src=\"http:\/\/tiruppurwebhosting.com\/blog\/wp-content\/uploads\/2021\/07\/php-installation-1024x288.png\" alt=\"\" width=\"640\" height=\"180\" srcset=\"https:\/\/tiruppurwebhosting.com\/blog\/wp-content\/uploads\/2021\/07\/php-installation-1024x288.png 1024w, https:\/\/tiruppurwebhosting.com\/blog\/wp-content\/uploads\/2021\/07\/php-installation-300x84.png 300w, https:\/\/tiruppurwebhosting.com\/blog\/wp-content\/uploads\/2021\/07\/php-installation-768x216.png 768w, https:\/\/tiruppurwebhosting.com\/blog\/wp-content\/uploads\/2021\/07\/php-installation.png 1522w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>However,don&#8217;t despair!<\/p>\n<p>Generally this error says that something is going wrong with the code on your site and something is preventing WordPress from being able to connect to its MySQL database. More specifically it can include that:<\/p>\n<ul>\n<li>Your wordpress files are outdated or using older version of word press<\/li>\n<li>The Mysql extension isn&#8217;t enabled or installed<\/li>\n<li>The php extension is not configured properly<\/li>\n<\/ul>\n<h3>How to fix &#8220;Your PHP installation appears to be missing the MySQL extension which is required by WordPress.\u201d<\/h3>\n<h4 class=\"elementor-heading-title elementor-size-default\">1. Update Your WordPress Installation<\/h4>\n<p>The first and easy way to fix this error is to upgrade word press to the most recent version (5.7.2).It seems if you have installed word press via cpanel using softaculous ,upgrade there in 2 steps. Open cpanel &gt;&gt;Softaculous &gt;&gt;upgrade<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-220 size-large\" src=\"http:\/\/tiruppurwebhosting.com\/blog\/wp-content\/uploads\/2021\/07\/cpanel-softaculous-1024x592.png\" alt=\"php\" width=\"1024\" height=\"592\" srcset=\"https:\/\/tiruppurwebhosting.com\/blog\/wp-content\/uploads\/2021\/07\/cpanel-softaculous-1024x592.png 1024w, https:\/\/tiruppurwebhosting.com\/blog\/wp-content\/uploads\/2021\/07\/cpanel-softaculous-300x173.png 300w, https:\/\/tiruppurwebhosting.com\/blog\/wp-content\/uploads\/2021\/07\/cpanel-softaculous-768x444.png 768w, https:\/\/tiruppurwebhosting.com\/blog\/wp-content\/uploads\/2021\/07\/cpanel-softaculous.png 1475w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-221\" src=\"http:\/\/tiruppurwebhosting.com\/blog\/wp-content\/uploads\/2021\/07\/softacuous-app-1024x478.png\" alt=\"\" width=\"640\" height=\"299\" srcset=\"https:\/\/tiruppurwebhosting.com\/blog\/wp-content\/uploads\/2021\/07\/softacuous-app-1024x478.png 1024w, https:\/\/tiruppurwebhosting.com\/blog\/wp-content\/uploads\/2021\/07\/softacuous-app-300x140.png 300w, https:\/\/tiruppurwebhosting.com\/blog\/wp-content\/uploads\/2021\/07\/softacuous-app-768x359.png 768w, https:\/\/tiruppurwebhosting.com\/blog\/wp-content\/uploads\/2021\/07\/softacuous-app-1536x717.png 1536w, https:\/\/tiruppurwebhosting.com\/blog\/wp-content\/uploads\/2021\/07\/softacuous-app.png 1900w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>Before upgrade new version make sure take backup of your wordpress source code and than start the process.<\/p>\n<p>You can upgrade this in your wordpress dashboard also,<\/p>\n<h4>2.Make sure Mysql extension isn&#8217;t enabled or installed.<\/h4>\n<p>Only updating wordpress version doesn&#8217;t work next step is to verify whether the Mysql extension is installed and enabled.Most of the operating systems don\u2019t include the MySQL extension by default. If you\u2019re using one of them, you\u2019ll need to install it yourself.<\/p>\n<p>Now you need to create a phpinfo.php file in the root directory (<em>public.html<\/em>) of your WordPress site via FTP or using cpanel file manger. It should contain the following:<\/p>\n<p>Save your file, then <strong>visit it in your browser<\/strong> (https:\/\/www.yourdomain.com\/info.php). You\u2019ll see a page with the details of your PHP installation.<\/p>\n<p>Look for the <strong><em>mysql<\/em> or <em>mysqli<\/em> section<\/strong>. If the extension is installed, it will display the version next to <em>Client API:<\/em><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-224\" src=\"http:\/\/tiruppurwebhosting.com\/blog\/wp-content\/uploads\/2021\/07\/mysql.png\" alt=\"\" width=\"842\" height=\"140\" srcset=\"https:\/\/tiruppurwebhosting.com\/blog\/wp-content\/uploads\/2021\/07\/mysql.png 842w, https:\/\/tiruppurwebhosting.com\/blog\/wp-content\/uploads\/2021\/07\/mysql-300x50.png 300w, https:\/\/tiruppurwebhosting.com\/blog\/wp-content\/uploads\/2021\/07\/mysql-768x128.png 768w\" sizes=\"auto, (max-width: 842px) 100vw, 842px\" \/><\/p>\n<p>If it is blank than,the extension is not installed.Next you have to install it and it vary depends on your domain hosting and systems.<\/p>\n<p>If you host uses cpanel ,than you can enable the MySQL extension by clicking on<strong><em> Select PHP Version<\/em><\/strong> under <em>Software<\/em>:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-225 size-large\" src=\"http:\/\/tiruppurwebhosting.com\/blog\/wp-content\/uploads\/2021\/07\/selectphp-version-1024x576.png\" alt=\"php\" width=\"1024\" height=\"576\" srcset=\"https:\/\/tiruppurwebhosting.com\/blog\/wp-content\/uploads\/2021\/07\/selectphp-version-1024x576.png 1024w, https:\/\/tiruppurwebhosting.com\/blog\/wp-content\/uploads\/2021\/07\/selectphp-version-300x169.png 300w, https:\/\/tiruppurwebhosting.com\/blog\/wp-content\/uploads\/2021\/07\/selectphp-version-768x432.png 768w, https:\/\/tiruppurwebhosting.com\/blog\/wp-content\/uploads\/2021\/07\/selectphp-version-1536x865.png 1536w, https:\/\/tiruppurwebhosting.com\/blog\/wp-content\/uploads\/2021\/07\/selectphp-version.png 1565w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>After choosing the <strong>most recent\u00a0PHP version<\/strong>, tick the boxes for \u201cmysqli\u201d and\/or \u201cmysqlnd\u201d. Save your changes, then refresh your site to see if the error is resolved.<\/p>\n<h4>3.Verify the php extension is not configured properly<\/h4>\n<p>In some cases, PHP won\u2019t be able to access the MySQL extension because its path isn\u2019t set correctly. To see if that\u2019s the case, return to yourdomain.com\/info.php, and this time look for the <i>Loaded Configuration File <\/i>field:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-228\" src=\"http:\/\/tiruppurwebhosting.com\/blog\/wp-content\/uploads\/2021\/07\/phpconfiguration.png\" alt=\"\" width=\"972\" height=\"272\" srcset=\"https:\/\/tiruppurwebhosting.com\/blog\/wp-content\/uploads\/2021\/07\/phpconfiguration.png 972w, https:\/\/tiruppurwebhosting.com\/blog\/wp-content\/uploads\/2021\/07\/phpconfiguration-300x84.png 300w, https:\/\/tiruppurwebhosting.com\/blog\/wp-content\/uploads\/2021\/07\/phpconfiguration-768x215.png 768w\" sizes=\"auto, (max-width: 972px) 100vw, 972px\" \/><\/p>\n<p>Take note of that file\u2019s path. Now scroll down and look for the <i>extension_dir <\/i>field, and check its value:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-229\" src=\"http:\/\/tiruppurwebhosting.com\/blog\/wp-content\/uploads\/2021\/07\/extensionmodule-1024x446.png\" alt=\"\" width=\"640\" height=\"279\" srcset=\"https:\/\/tiruppurwebhosting.com\/blog\/wp-content\/uploads\/2021\/07\/extensionmodule-1024x446.png 1024w, https:\/\/tiruppurwebhosting.com\/blog\/wp-content\/uploads\/2021\/07\/extensionmodule-300x131.png 300w, https:\/\/tiruppurwebhosting.com\/blog\/wp-content\/uploads\/2021\/07\/extensionmodule-768x334.png 768w, https:\/\/tiruppurwebhosting.com\/blog\/wp-content\/uploads\/2021\/07\/extensionmodule.png 1209w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>The entry should <strong>match the Loaded Configuration File path<\/strong>. In the above example, you\u2019ll notice that it displays the correct extension directory path for the PHP version. However, if yours is pointing to the incorrect location, you\u2019ll need to edit your <em>php.ini<\/em> file to replace it with the correct one.<\/p>\n<h2>Conclusion:-<\/h2>\n<p>Error\u201cYour PHP installation appears to be missing the MySQL extension which is required by WordPress\u201d message is a frustrating error to encounter because it seems so technical.<\/p>\n<p>I believe the above steps in this article, you should be able to diagnose and fix the issue.<\/p>\n<p>Our recommended solution is to make sure you\u2019re using the most recent versions of both PHP and WordPress.<\/p>\n<p>If you use PHP 7.2+ and WordPress 5.0+, you should be able to automatically fix this error and get your site working again, while also benefiting from all of the other performance, security, and feature enhancements that come from updating.<\/p>\n<p>To know about How to configure WP to use a Remote Database <a href=\"https:\/\/tiruppurwebhosting.com\/blog\/2021\/03\/09\/how-to-configure-wp-to-use-a-remote-database\/\">click here.<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to Fix \u201cYour PHP Installation Appears to Be Missing the MySQL Extension Which Is Required by WordPress\u201d Error When you try to install word press or after installed word press while visiting you site encounter an error that says \u201cYour PHP installation appears to be missing the MySQL extension which is required by WordPress.\u201d?<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,17,18,3,5],"tags":[118,117,119,80],"class_list":["post-216","post","type-post","status-publish","format-standard","hentry","category-basics","category-control-panel","category-cpanel","category-linux-tutorials","category-wordpress","tag-mysql","tag-php","tag-upgrade","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/tiruppurwebhosting.com\/blog\/wp-json\/wp\/v2\/posts\/216","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tiruppurwebhosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tiruppurwebhosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tiruppurwebhosting.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tiruppurwebhosting.com\/blog\/wp-json\/wp\/v2\/comments?post=216"}],"version-history":[{"count":0,"href":"https:\/\/tiruppurwebhosting.com\/blog\/wp-json\/wp\/v2\/posts\/216\/revisions"}],"wp:attachment":[{"href":"https:\/\/tiruppurwebhosting.com\/blog\/wp-json\/wp\/v2\/media?parent=216"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tiruppurwebhosting.com\/blog\/wp-json\/wp\/v2\/categories?post=216"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tiruppurwebhosting.com\/blog\/wp-json\/wp\/v2\/tags?post=216"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}