Skip to content

Instantly share code, notes, and snippets.

@stefanRepac
Created January 28, 2019 13:27
Show Gist options
  • Save stefanRepac/f9685f0ad016aefc0d2886c1d3725645 to your computer and use it in GitHub Desktop.
Save stefanRepac/f9685f0ad016aefc0d2886c1d3725645 to your computer and use it in GitHub Desktop.
Changing PHP version in SiteGround with .htaccess
https://www.reviewplan.com/wp-content/uploads/2018/07/Siteground-php-version-change-edit.jpg
If you want to update to PHP 7.2– AddHandler application/x-httpd-php72 .php .php5 .php4 .php3
For PHP 7.1– AddHandler application/x-httpd-php71 .php .php5 .php4 .php3
For PHP 7.0– AddHandler application/x-httpd-php70 .php .php5 .php4 .php3
For PHP 5.6– AddHandler application/x-httpd-php56 .php .php5 .php4 .php3
For PHP 5.5– AddHandler application/x-httpd-php55 .php .php5 .php4 .php3
So, copy and paste one of the lines from above to change the PHP version of your website.
For example, we have pasted the line‘AddHandler application/x-httpd-php72 .php .php5 .php4 .php3’ as we wanted to switch to PHP version 7.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment