WordPress is created in PHP – a scripting language built to create dynamic web applications. In order to function appropriately, WordPress needs PHP requirements on a web server infrastructure, such as MySQL extension.
In this case – when dealing with WordPress data, PHP needs to handle MySQL connection. MySQL is the Database Management System used by WordPress. If the required extension, add-on, or functionality is lacking in PHP, such as MySQL extension in this case – the error That says PHP Installation appears to be missing the MySQL extension which is required by WordPress occurs in a WordPress website.
In this resource, we will explore the case when PHP installation lacks MySQL extension for WordPress (Database) connection(s). Also, you’ll learn how to fix the issue by various methods possible.
Explanation: PHP Installation Appears to Be Missing the MySQL Extension which is required by WordPress
Users need to create a WordPress database before initiating WordPress installation. The database is used to store WordPress data.
So, errors occur in WordPress if the server’s infrastructure is not supported with WordPress core functionality, such as PHP installation missing the MySQL extension. In this case, PHP requires a connection with WordPress’ database, which doesn’t happen if the necessary extensions are missing, such as MySQL extension.
Reasons: “Why PHP Installation is missing the MySQL Extension” error occurs in WordPress
There are various reasons why MySQL extension is missing from PHP Installation in WordPress. Depending on the origins, fixing the problem is possible with multiple solutions. Let’s discuss, in detail, the reasons for the problem, along with a brief description of each entity.
Compatibility
If the WordPress core is not compatible with PHP installation on a server, errors like PHP installation is missing the MySQL extension occur in WordPress. In this case, the lack of WordPress-required extensions in PHP is a common Thing. To get started, check if the PHP version is not outdated, as lower versions might lack support for MySQL extensions.
WordPress Core Files
There is no issue in PHP; however, the WordPress Core Files may need updating in dashboard. Simply put, outdated versions of WordPress Core Files create problems with PHP. In this case – not only MySQL extension but also cause trouble for Themes, Plugins, and WordPress integrations with 3rd party services, such as Email Marketing Tools.
In this scenario – incompatibility issues between WordPress and PHP may originate from outdated WordPress core, not from PHP side.
Configurative Issues
As WordPress is a mixture of PHP, MySQL, and 3rd party scripts, configurative issues may need help installing PHP core.
For example – if the PHP configuration or WordPress database credentials are not correctly configured, issues in connecting WordPress database occur in WordPress. In this case, you’ll need to check at both ends whether a particular error originates from MySQL, WordPress Core, or PHP.
Operating Systems
If the server infrastructure is built on OS That lacks PHP extensions, WordPress Core essentials, or MySQL add-ons, such as Linux, the error PHP Installation is missing the MySQL extension occurs in WordPress.
In this case – the operating system causes the error, and the PHP, WordPress Core Files, and MySQL might not be responsible.
How to Fix: PHP Installation Appears to Be Missing the MySQL Extension which is required by WordPress
There are various routines to fix PHP installation, which is missing the required MySQL extension for WordPress. In this case – users are advised to perform Two Things – WordPress backup and accessing File Manager on the Web Hosting cPanel interface.
Let’s start and describe various routines to fix the PHP installation’s MySQL extension error in WordPress. In this case, let’s focus on the basics FIRST.
Update the WordPress Core Installation
The WordPress Core Files refer to Files that come packed in WordPress installation. Once you’ve downloaded and extracted the WordPress core from its official website, you can see a list of WordPress Core Files.
One way to update the WordPress Core is to download the latest ZIP from official resources. In this case – if you’re creating a WordPress site, you would be installing the latest WordPress Core THAT will help you prevent future errors.
On the other hand – if you’ve installed WordPress and need to update the WordPress Core, you can initiate an update on the Dashboard -> Updates page.
Once landed on the page, you can see WordPress showing a prompt to update various assets (Themes, Plugins, and the WordPress Core). Here – even if the Core doesn’t need an update, WordPress can help you re-initiate and check the WordPress Core for updates – as shown in the screenshot below.
Note: You can leave Things as usual on this page if the WordPress Core doesn’t require an update. To this line, you’ve learned how to update WordPress Core to fix the error: PHP Installation is missing the MySQL Extension for WordPress.
Update the WordPress Assets (Themes, Plugins, 3rd party Scripts)
Let’s learn how to update WordPress assets to fix PHP and MySQL issues in WordPress. In this case – WordPress assets include Themes, Plugins, and 3rd party Scripts installed in WordPress.
In WordPress dashboard, updating assets is a matter of minutes. All you have to do is to land on the respective pages and initiate the updating process.
For example – to update WordPress Themes, land and initiate the process on the Appearance -> Themes page. Similarly – if you need to update WordPress Plugins, head over to the Plugins page in the dashboard and initiate the updating process. Here – Child Themes, uploaded plugins, and staging Scripts fall under the 3rd party scripts in WordPress. To proceed with updating 3rd party scripts, you can take the respective maneuvers or perform the usual updating for Child Themes and uploaded Plugins.
Make sure the MySQL Extension is Installed and Enabled
You can check the installation of MySQL extension if the previous methods don’t work. The case is – some Operating Systems don’t provide MySQL extension packed in Core Files. If you’re using one of Them, you’ll need to confirm the MySQL extension’s installation.
Let’s learn how to confirm if the MySQL extension is installed.
STEP (1) – Create an Info.PHP File
Inside the site’s Public_HTML (Root Directory), you’ll need to create a file called Info.PHP. In this case, the process do need login to Web Hosting File Manager or use an FTP client if possible.
To proceed, see if you can log into Hosting with Login credentials. Once logged in, browse to the Public_HTML directory and use the New File option – as shown in the snapshot below.
STEP (2) – Insert the Code Snippet
The option requires a file name and extension. Enter the required information and proceed to save changes. Once you’re editing the file, you’ll need to insert and save the file with the following code snippet.
<? php
phpinfo( );
?>
In the end, save the file as info.php and proceed. If, for example – you’re comfortable with an FTP client, such as File Zilla – ensure you’ve created the Info.PHP file in the site’s Root directory – Public_HTML. Once completed, you’re ready to proceed to the next step.
STEP (3) – Access the Info.PHP File
Next – access the following URL on your site and see the page’s content for a MySQL section.
sitedomain.com/info.php
Under the MySQL section, if the Client API field is filled with MySQL’s version, the MySQL is installed on the system. To this line – you’ve confirmed and learned how to check if the MySQL extension is installed. If, for example, the field doesn’t include an entry next to Client API, the MySQL extension is missing.
STEP (4) – Install the MySQL Extension
Let’s suppose – the MySQL Extension is missing from the system. Let’s learn how to install the extension. Once logged into the Hosting cPanel area, look for an option That says Select PHP Version. Once there, choose the latest PHP version, Tick the boxes That say MySQLi or MySQLnd, and proceed to save changes at the end.
Now – once the changes are saved, see if the problem has been solved in WordPress.
Note: To this line – you’ve learned how to check, confirm, or install and enable the MySQL extension in WordPress.
Make sure the PHP Extension is properly configured
If the problem hasn’t been fixed yet, you will need to see if the PHP is appropriately configured. In this case – you need to go back and load the sitedomain.com/info.php file in the browser.
Once the page has loaded, you need to make a note of Two labels – (Loaded Configuration File) and (Extension_DIR).
In this case – the values next to the labels should match. If not, you’ll need to update your site’s php.ini file – by learning how to deal with PHP.ini file in WordPress.
Note: Ask for the developer’s attention if you lack expertise on how to deal with PHP files in a WordPress website. Minor gaps may damage your site’s core and access controls or put together various scenarios That may lead to conflicts between WordPress assets.
Check and make sure the PHP version is Up-to-Date
The one thing That results in PHP errors is PHP core itself. For example – if it carries outdated routines, versions, or function calls, errors originating from other agents may seem confusing. In this case – the first thing users need to see is PHP’s version.
Fortunately, the WordPress dashboard supports checking PHP version in the dashboard. Once logged in, you can see PHP’s version on the Tools -> Site Health page. Let’s see the following screenshot That outlines information about PHP’s version in WordPress dashboard.
Here – if the PHP version is updated, and the WordPress dashboard’s Tools page doesn’t highlight a prompt to update PHP – you’re good. On the other hand, you need to update PHP version if the Tools page includes a highlighted prompt.
To update your site’s PHP version, you can proceed on Two roads.
Hosting support professionals can help you update your site’s PHP version. On the other hand – you can look for an option in the Hosting cPanel area. In both cases, you should have taken your site’s backup before you initiate the PHP update process.
Upon verification, hosting Support professionals can update your site’s PHP in a moment. In this case – you’ll need to initiate a Support Ticket or go for a live chat session. If you’re looking towards a cPanel option to update your site’s PHP, log into Hosting cPanel.
Once logged in, you can find the option Select PHP Version. Once opened, you can choose a PHP version, the latest one, and proceed to save changes at the end. In this case, saving changes will automatically install, set up, or configure the latest PHP on your WordPress website.
Note: To this line – you’ve learned to check and update your site’s PHP version. For more information on updating WordPress’ infrastructure, ask your site’s developer or consult WordPress Support Professionals.
Best Practices
First – In software, every piece of code has a stable version, and so is The case with PHP. Users are advised to confirm PHP’s latest version on official resources. Once verified, updating PHP in WordPress should result in positive measures.
Second – always keep WordPress Assets up-to-date. For example – updating themes and plugins helps users avoid WordPress conflicts. Although PHP’s version may not cause trouble, outdated Themes and Plugins can create PHP issues in WordPress.
Third – if possible, optimize your site’s Database on a regular basis. Similarly – apply changes on a staging site first before proceeding with stable versions on a live WordPress website – helping users avoid issues in WordPress, PHP, and MySQL extensions.
Fourth – if possible, use the web hosting plan That keeps the updated version of PHP. If you can afford it, hiring WordPress Support Professionals can help you keep track of updates, such as updates for Themes, Plugins, WordPress Core, and PHP versions.
Fifth – The Info.PHP is not present by default in WordPress. Once required, you’ll need to create one by logging into Hosting cPanel with FTP or a web interface.
Sixth – a web hosting infrastructure is composed of various aspects. For example – depending on the server’s operating system and configuration – you may find an interface different from what we have shown in this write-up. In this case – focus on the basic workflow, the steps required are similar in most cases in the Hosting cPanel areas of different companies.
Seventh – the WordPress Tools -> Site Health page outlines various information about a site’s health. You can find more information there, such as outdated assets in WordPress, APIs’ information, and Cache.
Over to You
In this resource – you’ve learned how to fix WordPress PHP issue – PHP Installation is missing the required MySQL extension for WordPress. Simply put, the solution to this problem doesn’t require complex maneuvers in WordPress; beginner’s stuff can help owners fix PHP issues.
After you make changes, don’t forget to check your site for the error. If the changes have worked, you can ignore taking extra maneuvers described in this article. Otherwise, from basics to advance – take actions accordingly. In this case, use a staging site to avoid gaps, if possible.
For more information on fixing WordPress issues, improving performance, and marketing your WordPress business – ask our support professionals.
Frequently Asked Questions (FAQs)
What is PHP, and do/why we use PHP in WordPress?
PHP is a scripting language – specifically used to create dynamic web applications for the Internet. By dynamic applications, we mean the ones that can handle dynamic data, not static. Web applications are sites, Tools, or scripts developed in PHP.
We use PHP in WordPress for so many reasons. The first thing is: WordPress is created in PHP; thus, requiring PHP support on a server infrastructure is mandatory to use WordPress. On the other hand, WordPress Themes and Plugins are also developed in PHP. Having no PHP infrastructure in WordPress or on a server will make Themes and Plugins useless.
What is meant by MySQL and MySQL Extension?
MySQL is the name of WordPress-supported database management system. MySQL is a relational DBMS – storing data in Rows and Columns.
On the other hand, MySQL extension refers to the requirement for PHP in WordPress. By having installed the MySQL extension, PHP can initiate connections to a WordPress database. In this case – the error MySQL missing occurs due to the absence of MySQL extension in PHP.
How to fix MySQL missing errors in WordPress – without expertise?
Beginners should adopt fixing basics in WordPress in order to fix PHP and MySQL issues. If the basics don’t work, more complex maneuvers can be done.
Whether or not you’re going to take specific actions, don’t forget to take your site’s backup. A backup plan helps web owners restore a site in minutes if something goes wrong. In this case, significantly when changing WordPress core; taking backups becomes undeniable. As described, this write-up includes several ways to fix the error: PHP is missing the MySQL extension in WordPress.
Does re-installing WordPress stop the site from loading?
When you’re updating WordPress core in the dashboard, it doesn’t prevent a site from functioning. In this case, updating WordPress only requires clicking the Update button in Dashboard.
In this case – WordPress automatically checks for available updates, initiates the process, and controls everything – without letting WordPress go offline or provide limited access levels. However, staying on the Updates page while the update process is running is better.
If, for example – there are multiple update processes at a Time, WordPress can count on race conditions, which refers to performing various Tasks at a Time. Hence, in this case – the WordPress core may count issues while focusing on specific Things at a Time, such as Tasks priority, not recommended for WordPress users.
What are WordPress assets?
Themes, Plugins, and 3rd party Scripts – all fall under WordPress assets. In this case – the focus is kept on the Technical aspects of WordPress assets, not content-based elements, such as pages and posts.
Having That clarified, when dealing with WordPress errors, Themes and Plugins are what we consider the most in order to track, identify, and fix gaps accordingly. On the other hand – Textual content can’t create WordPress errors in most cases. WordPress pages and posts are influenced mainly by designing or formatting content snippets in a specific manner.
Can you delete the Info.PHP file after work?
Yes – if not required, you can remove the file safely.
For example – once you have obtained PHP data with Info.PHP – you can remove the file from the site’s root directory – Public_HTML.
The Info.PHP file is a separately created, independent, and external File for obtaining the server’s infrastructure information. In this case – once the work has been finished, you can safely remove the file. For WordPress users, creating and removing Info.PHP file is identical. The way you make an Info.PHP file, you can remove the file in a WordPress site’s root directory, by using the options on the Top Bar.
How to update PHP without prior expertise?
Updating PHP requires information gathering first. In WordPress dashboard, you can see the Tools -> Site Health page for PHP’s version information.
Once you’ve obtained the PHP version information, you can contact your hosting cPanel support channel to update your site’s PHP. On the other hand – if you can log in and know how to deal with cPanel options, you can edit the PHP version yourself. However, ensure you know what you’re doing while changing PHP’s information in cPanel.
Why do Beginners need to look for MySQL extension?
In typical scenarios, beginners don’t need to look for MySQL extension. Once a WordPress site has been set up, beginners are set to wander freely. In this case – if a WordPress site shows MySQL-specific issues, you’ll need to look for MySQL existence on a WordPress website.
In this case – pay special attention to what WordPress error statements show on Front-end. Hence, the error PHP installation is missing the MySQL extension for WordPress shows database gaps; you’ll need to see if the site is loading correctly to see how much the error has caused trouble. For more information on fixing the issue, refer to the fixing routines described in this resource.