paint-brush
How to Change PHP Versions in Magentoby@ashishm
2,053 reads
2,053 reads

How to Change PHP Versions in Magento

by Ashish
Ashish HackerNoon profile picture

Ashish

@ashishm

I am a writer and i love to write about...

November 9th, 2019
Read on Terminal Reader
Read this story in a terminal
Print this story
Read this story w/o Javascript
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Magento permits a unique server setup that enables each customer to choose which version of PHP to utilize or switch PHP versions in Magento. Magento 2 supports those Php versions for today: PHP 5.6, PHP 7.0, 7.1, PHP.0,.PHPH 7.2 & 7.3 (such as Magent 2.3) To change the PHP version on your hosting accounts, follow the steps below:Log into cPanel to your Accounts.

Company Mentioned

Mention Thumbnail
Different
featured image - How to Change PHP Versions in Magento
1x
Read by Dr. One voice-avatar

Listen to this story

Ashish HackerNoon profile picture
Ashish

Ashish

@ashishm

I am a writer and i love to write about Magento, E-commerce, Wordpress, and all tech related topics.

About @ashishm
LEARN MORE ABOUT @ASHISHM'S
EXPERTISE AND PLACE ON THE INTERNET.

Magento permits a unique server setup that enables each customer to choose which version of PHP to utilize or switch PHP versions in Magento.

Magento 2 supports those Php versions for today: PHP 5.6, PHP 7.0, PHP 7.1, PHP 7.2 & PHP 7.3 (such as Magento 2.3.3).

image

image credit: meetanshi.com

To change the PHP version on your hosting accounts, follow the steps below:

  1. Log into cPanel to your Accounts
  2. Navigate to 1H Program Segment -> PHP Version Manager
  3. Visit the directory You Want to change the PHP version for (Please Be Aware this change applies to subdirectories to This Too )
  4. Click on the directory
  5. Title Pick the desired PHP Variant
  6. Click for save

Make the most from This Managed PHP Variant Services. Update your PHP version to the most recent when available, and protected one.

To execute it, Choose the Managed PHP Version choice and Conserve . It'll add the handler on your .htaccess document

AddHandler application/x-httpd-recommended-php .php .php5 .php4 .php3

It makes certain your shop is running on the PHP version that is advised in the side with no implementations.

Another option is to apply the changes manually by incorporating one of the under directives from the .htaccess record of your shop:

Switch to PHP 7.3

AddHandler application/x-httpd-php73 .php .php5 .php4 .php3

Switch to PHP 7.2

AddHandler application/x-httpd-php72 .php .php5 .php4 .php3

Switch to PHP 7.1

AddHandler application/x-httpd-php71 .php .php5 .php4 .php3

Doing this will alter the PHP model for this website and all its subfolders.

If you'd like a different version of PHP in a subdirectory, then make a new .htaccess document inside together with the directive to your desirable PHP version.








L O A D I N G
. . . comments & more!

About Author

Ashish HackerNoon profile picture
Ashish@ashishm
I am a writer and i love to write about Magento, E-commerce, Wordpress, and all tech related topics.

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
Learnrepo
X REMOVE AD