{"id":632,"date":"2024-01-25T12:49:19","date_gmt":"2024-01-25T12:49:19","guid":{"rendered":"https:\/\/www.cmsgalaxy.com\/blog\/?p=632"},"modified":"2024-01-25T12:49:21","modified_gmt":"2024-01-25T12:49:21","slug":"how-to-change-php-version-in-wordpress-using-htaccess","status":"publish","type":"post","link":"https:\/\/www.cmsgalaxy.com\/blog\/how-to-change-php-version-in-wordpress-using-htaccess\/","title":{"rendered":"How to change PHP version in WordPress using .htaccess"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"338\" src=\"https:\/\/www.cmsgalaxy.com\/blog\/wp-content\/uploads\/2024\/01\/image-5-1024x338.png\" alt=\"\" class=\"wp-image-633\" srcset=\"https:\/\/www.cmsgalaxy.com\/blog\/wp-content\/uploads\/2024\/01\/image-5-1024x338.png 1024w, https:\/\/www.cmsgalaxy.com\/blog\/wp-content\/uploads\/2024\/01\/image-5-300x99.png 300w, https:\/\/www.cmsgalaxy.com\/blog\/wp-content\/uploads\/2024\/01\/image-5-768x253.png 768w, https:\/\/www.cmsgalaxy.com\/blog\/wp-content\/uploads\/2024\/01\/image-5.png 1092w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>$ git diff .htaccess\r\ndiff --git a\/.htaccess b\/.htaccess\r\nindex 42e86156..986472ac 100644\r\n--- a\/.htaccess\r\n+++ b\/.htaccess\r\n@@ -100,8 +100,8 @@ RewriteRule \"^(.*\/)?\\.git\/\" https:\/\/%{HTTP_HOST}\/? &#91;L]\r\n RedirectMatch 404 ^(.*\/)?\\.git+\r\n\r\n # php -- BEGIN cPanel-generated handler, do not edit\r\n-# Set the \u201cea-php74\u201d package as the default \u201cPHP\u201d programming language.\r\n+# Set the \u201cea-php82\u201d package as the default \u201cPHP\u201d programming language.\r\n &lt;IfModule mime_module>\r\n-  AddHandler application\/x-httpd-ea-php74 .php .php7 .phtml\r\n+  AddHandler application\/x-httpd-ea-php82 .php .php8 .phtml\r\n &lt;\/IfModule>\r\n # php -- END cPanel-generated handler, do not edit\r\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-632","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/posts\/632","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/comments?post=632"}],"version-history":[{"count":1,"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/posts\/632\/revisions"}],"predecessor-version":[{"id":634,"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/posts\/632\/revisions\/634"}],"wp:attachment":[{"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/media?parent=632"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/categories?post=632"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/tags?post=632"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}