{"id":405,"date":"2024-10-04T15:04:20","date_gmt":"2024-10-04T15:04:20","guid":{"rendered":"https:\/\/orissawebhosting.in\/knowledgebase\/?p=405"},"modified":"2024-10-09T16:33:48","modified_gmt":"2024-10-09T16:33:48","slug":"change-the-php-version-in-plesk","status":"publish","type":"post","link":"https:\/\/orissawebhosting.in\/knowledgebase\/change-the-php-version-in-plesk\/","title":{"rendered":"Ultimate Guide to Easily Changing the PHP Version in Plesk for Optimal Performance"},"content":{"rendered":"\n<p>Plesk is a versatile <a href=\"https:\/\/www.squarebrothers.com\/windows-hosting-india\/\" data-type=\"link\" data-id=\"https:\/\/www.squarebrothers.com\/windows-hosting-india\/\" rel=\"nofollow noopener\" target=\"_blank\">web hosting<\/a> control panel that simplifies server management tasks for developers and website administrators. One essential feature of Plesk is its ability to easily switch between different PHP versions, depending on your application requirements. In this blog post, we will walk you through a step-by-step guide on how to change the PHP version in Plesk, why you might need to do so, and some common scenarios where this would be useful.<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li ><a href=\"#why-change-the-php-version-in-plesk\">Why Change the PHP Version in Plesk?<\/a><\/li><li ><a href=\"#prerequisites\">Prerequisites<\/a><\/li><li ><a href=\"#step-by-step-guide-to-changing-php-version-in-plesk\">Step-by-Step Guide to Changing PHP Version in Plesk<\/a><ul><li ><a href=\"#step-1-log-in-to-plesk\">Step 1: Log in to Plesk<\/a><\/li><li ><a href=\"#step-2-go-to-the-websites-domains-section\">Step 2: Go to the &#8220;Websites &amp; Domains&#8221; Section<\/a><\/li><li ><a href=\"#step-3-access-the-hosting-settings\">Step 3: Access the Hosting Settings<\/a><\/li><li ><a href=\"#step-4-choose-the-php-version\">Step 4: Choose the PHP Version<\/a><\/li><li ><a href=\"#step-5-configure-additional-php-settings-optional\">Step 5: Configure Additional PHP Settings (Optional)<\/a><\/li><li ><a href=\"#step-6-apply-changes\">Step 6: Apply Changes<\/a><\/li><\/ul><\/li><li ><a href=\"#common-scenarios-for-changing-php-version-in-plesk\">Common Scenarios for Changing PHP Version in Plesk<\/a><ul><li ><a href=\"#1-compatibility-with-word-press-joomla-or-other-cms\">1. Compatibility with WordPress, Joomla, or Other CMS<\/a><\/li><li ><a href=\"#2-running-legacy-applications\">2. Running Legacy Applications<\/a><\/li><li ><a href=\"#3-performance-enhancements\">3. Performance Enhancements<\/a><\/li><\/ul><\/li><li ><a href=\"#troubleshooting-common-issues\">Troubleshooting Common Issues<\/a><ul><li ><a href=\"#1-desired-php-version-not-available\">1. Desired PHP Version Not Available<\/a><\/li><li ><a href=\"#2-php-compatibility-issues\">2. PHP Compatibility Issues<\/a><\/li><li ><a href=\"#3-memory-or-timeout-errors\">3. Memory or Timeout Errors<\/a><\/li><\/ul><\/li><li ><a href=\"#conclusion\">Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"why-change-the-php-version-in-plesk\">Why Change the PHP Version in Plesk?<\/h2>\n\n\n\n<p>Different websites or web applications require different PHP versions to run smoothly. Some may depend on older versions, while others might benefit from the performance improvements and security patches of the latest PHP versions. Therefore, switching PHP versions can ensure your applications are optimized for compatibility, security, and speed.<\/p>\n\n\n\n<p>Reasons you might want to change the PHP version include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Compatibility<\/strong>: Some CMS or applications require specific PHP versions to function.<\/li>\n\n\n\n<li><strong>Performance<\/strong>: Newer PHP versions offer performance improvements.<\/li>\n\n\n\n<li><strong>Security<\/strong>: Each PHP version comes with new security updates, which help to protect your website from vulnerabilities.<\/li>\n\n\n\n<li><strong>Testing<\/strong>: Developers may need different PHP versions to test web applications in different environments.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"prerequisites\">Prerequisites<\/h2>\n\n\n\n<p>Before we dive into the steps, ensure the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You have <strong>Plesk admin access<\/strong> or user privileges to change PHP settings.<\/li>\n\n\n\n<li>The <strong>desired PHP version<\/strong> is installed on the server. If not, you may need to contact your server administrator or <a href=\"https:\/\/orissawebhosting.in\/\" data-type=\"link\" data-id=\"https:\/\/orissawebhosting.in\/\" rel=\"nofollow\">hosting provider<\/a> to install the required PHP version.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"step-by-step-guide-to-changing-php-version-in-plesk\">Step-by-Step Guide to Changing PHP Version in Plesk<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-1-log-in-to-plesk\">Step 1: Log in to Plesk<\/h3>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"557\" height=\"592\" src=\"https:\/\/orissawebhosting.in\/knowledgebase\/wp-content\/uploads\/2024\/10\/Plesk-control-panel.png\" alt=\"Plesk control panel\" class=\"wp-image-411\" style=\"width:414px;height:auto\" srcset=\"https:\/\/orissawebhosting.in\/knowledgebase\/wp-content\/uploads\/2024\/10\/Plesk-control-panel.png 557w, https:\/\/orissawebhosting.in\/knowledgebase\/wp-content\/uploads\/2024\/10\/Plesk-control-panel-282x300.png 282w\" sizes=\"(max-width: 557px) 100vw, 557px\" \/><\/figure><\/div>\n\n\n<p>Access your Plesk control panel by navigating to <code>https:\/\/yourdomain.com:8443<\/code> in your browser. Enter your username and password to log in. This will take you to the main dashboard of Plesk, where you can manage your websites, domains, and server settings.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-2-go-to-the-websites-domains-section\">Step 2: Go to the &#8220;Websites &amp; Domains&#8221; Section<\/h3>\n\n\n\n<p>Once logged in, find the <strong>&#8220;Websites &amp; Domains&#8221;<\/strong> section from the main menu. This is where you\u2019ll see a list of all the domains hosted under your Plesk account. If you are managing multiple domains, choose the domain for which you want to change the PHP version.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-3-access-the-hosting-settings\">Step 3: Access the Hosting Settings<\/h3>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"501\" src=\"https:\/\/orissawebhosting.in\/knowledgebase\/wp-content\/uploads\/2024\/10\/change-php-version-in-plesk.png\" alt=\"change php version in plesk\" class=\"wp-image-408\" style=\"width:659px;height:auto\" srcset=\"https:\/\/orissawebhosting.in\/knowledgebase\/wp-content\/uploads\/2024\/10\/change-php-version-in-plesk.png 800w, https:\/\/orissawebhosting.in\/knowledgebase\/wp-content\/uploads\/2024\/10\/change-php-version-in-plesk-300x188.png 300w, https:\/\/orissawebhosting.in\/knowledgebase\/wp-content\/uploads\/2024\/10\/change-php-version-in-plesk-768x481.png 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure><\/div>\n\n\n<p>After selecting the domain, click on <strong>&#8220;Hosting Settings&#8221;<\/strong> next to the domain name. This option allows you to configure various settings for the domain, including the ability to manage your PHP version.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-4-choose-the-php-version\">Step 4: Choose the PHP Version<\/h3>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"606\" src=\"https:\/\/orissawebhosting.in\/knowledgebase\/wp-content\/uploads\/2024\/10\/php-version-plesk-1024x606.png\" alt=\"php version plesk\" class=\"wp-image-410\" style=\"width:566px;height:auto\" srcset=\"https:\/\/orissawebhosting.in\/knowledgebase\/wp-content\/uploads\/2024\/10\/php-version-plesk-1024x606.png 1024w, https:\/\/orissawebhosting.in\/knowledgebase\/wp-content\/uploads\/2024\/10\/php-version-plesk-300x178.png 300w, https:\/\/orissawebhosting.in\/knowledgebase\/wp-content\/uploads\/2024\/10\/php-version-plesk-768x455.png 768w, https:\/\/orissawebhosting.in\/knowledgebase\/wp-content\/uploads\/2024\/10\/php-version-plesk.png 1436w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>In the <strong>Hosting Settings<\/strong> page, scroll down until you find the <strong>PHP support<\/strong> section. This section displays the current PHP version in use for the domain.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Select the PHP version dropdown<\/strong>: You will see a dropdown menu with a list of PHP versions that are installed and available for use.<\/li>\n\n\n\n<li><strong>Choose the desired PHP version<\/strong>: Select the PHP version you wish to use from the dropdown. For example, you might want to switch from PHP 7.4 to PHP 8.1, depending on your website requirements.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-5-configure-additional-php-settings-optional\">Step 5: Configure Additional PHP Settings (Optional)<\/h3>\n\n\n\n<p>Plesk also allows you to configure additional PHP settings such as <strong>memory limit<\/strong>, <strong>upload file size<\/strong>, <strong>max execution time<\/strong>, and more. These settings are located just below the PHP version dropdown.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"820\" height=\"486\" src=\"https:\/\/orissawebhosting.in\/knowledgebase\/wp-content\/uploads\/2024\/10\/additional-php-settings-in-plesk.png\" alt=\"additional php settings in plesk\" class=\"wp-image-406\" style=\"width:591px;height:auto\" srcset=\"https:\/\/orissawebhosting.in\/knowledgebase\/wp-content\/uploads\/2024\/10\/additional-php-settings-in-plesk.png 820w, https:\/\/orissawebhosting.in\/knowledgebase\/wp-content\/uploads\/2024\/10\/additional-php-settings-in-plesk-300x178.png 300w, https:\/\/orissawebhosting.in\/knowledgebase\/wp-content\/uploads\/2024\/10\/additional-php-settings-in-plesk-768x455.png 768w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/figure><\/div>\n\n\n<ul class=\"wp-block-list\">\n<li><strong>memory_limit<\/strong>: Adjust this to allocate more memory to your PHP scripts if needed.<\/li>\n\n\n\n<li><strong>upload_max_filesize<\/strong>: Change this value to allow larger file uploads via PHP.<\/li>\n\n\n\n<li><strong>max_execution_time<\/strong>: Increase this limit if you are running long scripts that may take time to execute.<\/li>\n<\/ul>\n\n\n\n<p>Once you&#8217;ve made the necessary changes to these settings, proceed to the next step.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-6-apply-changes\">Step 6: Apply Changes<\/h3>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"445\" src=\"https:\/\/orissawebhosting.in\/knowledgebase\/wp-content\/uploads\/2024\/10\/Apply-or-Ok-php-version-in-plesk-1024x445.png\" alt=\"Apply or Ok php version in plesk\" class=\"wp-image-407\" style=\"width:582px;height:auto\" srcset=\"https:\/\/orissawebhosting.in\/knowledgebase\/wp-content\/uploads\/2024\/10\/Apply-or-Ok-php-version-in-plesk-1024x445.png 1024w, https:\/\/orissawebhosting.in\/knowledgebase\/wp-content\/uploads\/2024\/10\/Apply-or-Ok-php-version-in-plesk-300x130.png 300w, https:\/\/orissawebhosting.in\/knowledgebase\/wp-content\/uploads\/2024\/10\/Apply-or-Ok-php-version-in-plesk-768x334.png 768w, https:\/\/orissawebhosting.in\/knowledgebase\/wp-content\/uploads\/2024\/10\/Apply-or-Ok-php-version-in-plesk-1536x668.png 1536w, https:\/\/orissawebhosting.in\/knowledgebase\/wp-content\/uploads\/2024\/10\/Apply-or-Ok-php-version-in-plesk.png 1658w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>After selecting the new PHP version and adjusting any additional PHP settings, scroll to the bottom of the page and click the <strong>&#8220;Apply&#8221;<\/strong> or <strong>&#8220;OK&#8221;<\/strong> button to save the changes.<\/p>\n\n\n\n<p>Plesk will now switch your website to the new PHP version, and the changes will take effect immediately.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"common-scenarios-for-changing-php-version-in-plesk\">Common Scenarios for Changing PHP Version in Plesk<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"1-compatibility-with-word-press-joomla-or-other-cms\">1. <strong>Compatibility with WordPress, Joomla, or Other CMS<\/strong><\/h3>\n\n\n\n<p>Content management systems (CMS) like WordPress and Joomla have specific PHP version requirements. For example, WordPress may require PHP 7.4 or higher for the best performance and security. Switching to the appropriate PHP version ensures your CMS runs smoothly without any compatibility issues.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"2-running-legacy-applications\">2. <strong>Running Legacy Applications<\/strong><\/h3>\n\n\n\n<p>Older web applications may rely on earlier PHP versions such as 5.6 or 7.1. If you&#8217;re managing a legacy application, changing the PHP version in <a href=\"https:\/\/www.plesk.com\/\" data-type=\"link\" data-id=\"https:\/\/www.plesk.com\/\" rel=\"nofollow noopener\" target=\"_blank\">Plesk<\/a> allows you to maintain compatibility with those applications.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"3-performance-enhancements\">3. <strong>Performance Enhancements<\/strong><\/h3>\n\n\n\n<p>Newer versions of PHP often include optimizations that can boost website performance. For instance, PHP 8.0 and later versions introduced just-in-time compilation (JIT), which can significantly speed up PHP execution for some applications.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"troubleshooting-common-issues\">Troubleshooting Common Issues<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"1-desired-php-version-not-available\">1. <strong>Desired PHP Version Not Available<\/strong><\/h3>\n\n\n\n<p>If you don\u2019t see the PHP version you want in the dropdown menu, it may not be installed on the server. Contact your hosting provider or server administrator to install the required version of PHP.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"2-php-compatibility-issues\">2. <strong>PHP Compatibility Issues<\/strong><\/h3>\n\n\n\n<p>Some web applications may not be compatible with the latest PHP versions. Always test your website after changing the PHP version to ensure everything works as expected. If you encounter errors, consider reverting to the previous version or updating your application to be compatible with the latest PHP version.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"3-memory-or-timeout-errors\">3. <strong>Memory or Timeout Errors<\/strong><\/h3>\n\n\n\n<p>If you receive memory or timeout errors after changing the PHP version, try increasing the <code>memory_limit<\/code> or <code>max_execution_time<\/code> settings in the PHP configuration.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"conclusion\">Conclusion<\/h2>\n\n\n\n<p>Changing the PHP version in Plesk is a straightforward process that allows you to optimize your websites for performance, compatibility, and security. Whether you&#8217;re running a modern CMS or maintaining a legacy application, Plesk provides an easy-to-use interface for managing PHP versions. By following the steps in this guide, you can confidently switch PHP versions in just a few minutes.<\/p>\n\n\n\n<p>Always ensure that the selected PHP version aligns with your website\u2019s requirements, and don\u2019t forget to test your site thoroughly after making the change.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Plesk is a versatile web hosting control panel that simplifies<\/p>\n","protected":false},"author":1,"featured_media":409,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,11,1],"tags":[],"class_list":["post-405","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-hosting","category-plesk-control-panel","category-tutorials"],"_links":{"self":[{"href":"https:\/\/orissawebhosting.in\/knowledgebase\/wp-json\/wp\/v2\/posts\/405"}],"collection":[{"href":"https:\/\/orissawebhosting.in\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/orissawebhosting.in\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/orissawebhosting.in\/knowledgebase\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/orissawebhosting.in\/knowledgebase\/wp-json\/wp\/v2\/comments?post=405"}],"version-history":[{"count":2,"href":"https:\/\/orissawebhosting.in\/knowledgebase\/wp-json\/wp\/v2\/posts\/405\/revisions"}],"predecessor-version":[{"id":429,"href":"https:\/\/orissawebhosting.in\/knowledgebase\/wp-json\/wp\/v2\/posts\/405\/revisions\/429"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/orissawebhosting.in\/knowledgebase\/wp-json\/wp\/v2\/media\/409"}],"wp:attachment":[{"href":"https:\/\/orissawebhosting.in\/knowledgebase\/wp-json\/wp\/v2\/media?parent=405"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/orissawebhosting.in\/knowledgebase\/wp-json\/wp\/v2\/categories?post=405"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/orissawebhosting.in\/knowledgebase\/wp-json\/wp\/v2\/tags?post=405"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}