This article describes how to change the PHP version and additional settings by using MultiPHP in cPanel. Show Changing the PHP versionMultiPHP enables you to use multiple versions of PHP on your server at the same time. To do this, follow these steps:
Changing PHP settingsIn addition to changing the PHP version from cPanel, you can change various PHP settings using MultiPHP. You can enable and disable PHP extensions, as well as configuration directives such as allow_url_fopen, error_log, and many more. This feature removes the need to configure and maintain custom files for PHP settings from the command line. Instead, you control all PHP settings directly from cPanel. To change your PHP settings, follow these steps:
This article will discuss the workaround for your WordPress website if you encounter an issue similar to this one: The error will begin with: "Warning: Use of undefined constant WP_CONTENT_DIR - assumed 'WP_CONTENT_DIR' (this will throw an Error in a future version of PHP) in" Followed by a location in your cPanel directory and then: "Your PHP installation appears to be missing the MySQL extension, which WordPress requires." This fix requires you to navigate the File Manager and modify files. If you are not comfortable doing this, our Support team will assist you via phone or Live Chat. How to fix the "Missing MySQL Extension" errorNote: This workaround will work if you previously used the PHP Selector to manage the PHP version for your site, then recently used the new MultiPHP Manager to update your PHP version. In the video below, we will walk you through identifying the "Missing MySQL Extension" error and the steps to resolve it. Here are the steps outlined in the video guide. You may find some links below that will take you directly to your cPanel provided that the following conditions are met:
Still, getting the "Missing MySQL Extension" error? It is possible to have multiple .htaccess files that you may need to edit. If you find you are still getting this error after editing the .htaccess file in the public_html folder, you need to check your root directory. Try and continue with these steps.
If the error is still there, go to your cPanel's MultiPHP Manager and select your website name. Then, set your PHP version to inherit from the dropdown menu. Frequently Asked Questions (FAQs)What is the easiest way of viewing and updating the PHP version of my website? The cPanel has a MultiPHP Manager that allows you to view and update your websites' PHP versions. Please refer to this article to know more about this feature: What Version of PHP Are You Using? We also have a video guide discussing the use of the MultiPHP Manager. Where is my File Manager? All website files are stored inside your File Manager. To learn how to access your File Manager, please visit this article: How to Navigate Through File Manager. How can I edit my files inside the File Manager? Your website files can be created, modified, or removed from your File Manager. Please visit the article, How to Create/Edit/Delete a File Using the File Manager, for detailed instructions on managing your website files. I am done with the steps above, but my site now shows a different error page (403, 404, or 405 Error). How to resolve it? There are many possible causes why your website is showing an error page. Troubleshooting depends on the error page code (403, 404, 500, etc.) you are seeing. Please visit these helpful articles for more information on error page codes and how to resolve them.
Additional References
Need further assistance? HostGator's Support is here to help. Just reach out to us via phone or Live Chat! How do I install MultiPHP ini Editor in cPanel?Editor Mode. Login to cPanel.. In the Software section, click on MultiPHP INI Editor.. In the top-left hand section of the MultiPHP INI Editor page, click on Editor Mode.. Under Configure PHP INI basic settings click the dropdown menu that says — Select a location —. Select the domain you would like to make changes to.. Where is MultiPHP ini Editor in cPanel?cPanel users can view information about the server's PHP configuration in cPanel's MultiPHP INI Editor interface (cPanel >> Home >> Software >> MultiPHP INI Editor).
How do I add a MultiPHP in cPanel?The cPanel default profile includes PHP versions 7.4 and 8.0.. Select the checkbox for the domain that you wish to change.. Select the desired version of PHP from the PHP Version menu. ... . Click Apply.. Where do I find PHP ini in cPanel?Each file exists in the /opt/cpanel/ea-php72/root/etc/php. ini file, where 72 is the PHP version number.
|