{"id":1421,"date":"2021-08-24T10:36:00","date_gmt":"2021-08-24T10:36:00","guid":{"rendered":"https:\/\/ownwebservers.com\/kb\/?p=1421"},"modified":"2021-08-24T10:36:53","modified_gmt":"2021-08-24T10:36:53","slug":"how-to-change-the-memory_limit-in-htaccess-file","status":"publish","type":"post","link":"https:\/\/ownwebservers.com\/kb\/how-to-change-the-memory_limit-in-htaccess-file\/","title":{"rendered":"How to change the memory_limit in .htaccess file"},"content":{"rendered":"<p>Users will build alterations within the memory_limit using php.ini file located at \/etc\/php.ini. Incase you&#8217;ve got a shared server, it&#8217;s not suggested to make these changes on your own. the most reason is that, if you make changes to memory_limit on a shared server using php.ini file, each account on the server would replicate these changes. Though, this is often the case with Windows servers.<\/p>\n<p>Alternately, you&#8217;ll copy the php.ini file into the individual linux user account and search for the memory_limit within the file using a appropriate editor on the server and make amendments to the values.<\/p>\n<p>There is also one additional method to go about doing this, ie. with the .htaccess file. Users can easily create a .htaccess file and add a code therein file.<\/p>\n<p>Here are the steps to do that:<\/p>\n<p><strong>Step 1:<\/strong>\u00a0Build a .htaccess file using .<\/p>\n<blockquote><p><em><strong>pico .htaccess<\/strong><\/em><\/p><\/blockquote>\n<p><strong>Step 2:<\/strong>\u00a0If you wish to set a memory_limit of 64 MB, you must use the following code within the .htaccess file :<\/p>\n<blockquote><p><em><strong>php_value memory_limit 64M<\/strong><\/em><\/p><\/blockquote>\n<p><strong>Step 3:<\/strong>\u00a0Press ctrl + c for saving and exiting the file.<\/p>\n<p><strong>Step 4:<\/strong>\u00a0You must then create a\u00a0<strong>phpinfo.php<\/strong>\u00a0file using the following :<\/p>\n<blockquote><p><em><strong>pico phpinfo.php<\/strong><\/em><\/p><\/blockquote>\n<p><strong>Step 5:<\/strong>\u00a0Now use the following code within the file.<\/p>\n<blockquote><p><em><strong>&lt;?<br \/>\nphpinfo();<br \/>\n?&gt;<\/strong><\/em><\/p><\/blockquote>\n<p><strong>Step 6:<\/strong>\u00a0Now look for the file in the browser and for the\u00a0<strong>memory_limit<\/strong>\u00a0and confirm if the changes have been applied.<\/p>\n<h2><strong>Incase you wish to do it using FTP, then the following steps can be followed :<\/strong><\/h2>\n<p><strong>Step 1:<\/strong>\u00a0Make an\u00a0<strong>htaccess.txt<\/strong>\u00a0file on your local system.<\/p>\n<p><strong>Step 2:<\/strong>\u00a0Add the code for changing the\u00a0<strong>memory_limit<\/strong>\u00a0to the file.<\/p>\n<blockquote><p><em><strong>php_value memory_limit 64M<\/strong><\/em><\/p><\/blockquote>\n<p><strong>Step 3:<\/strong>\u00a0Then upload the\u00a0<strong>htaccess.txt<\/strong>\u00a0file using an FTP client software that you usually use.<\/p>\n<p><strong>Step 4:<\/strong>\u00a0Upon uploading the onto the server using FTP account, you must rename it to\u00a0<strong>.htaccess<\/strong>\u00a0using the FTP client software.<\/p>\n<p><strong>Step 5:<\/strong>\u00a0Create\u00a0<strong>phpinfo.php<\/strong>\u00a0file over your local machine.<\/p>\n<p>Step 6: Type the following code within the phpinfo.php file.<\/p>\n<blockquote><p><em><strong>&lt;?<br \/>\nphpinfo();<br \/>\n?&gt;<\/strong><\/em><\/p><\/blockquote>\n<p><strong>Step 7:<\/strong>\u00a0Again, using an FTP client, upload it onto your server.<\/p>\n<p><strong>Step 8:<\/strong>\u00a0Now look for the file in the browser and for the\u00a0<strong>memory_limit<\/strong>\u00a0and confirm if the changes have been applied.<\/p>\n<p><strong>NOTE:\u00a0<\/strong>These steps can only be used by customers who have a VPS or a higher web hosting account. Customers using a shared server specifically Linux Shared Hosting must contact Linux support department for increasing the php memory_limit.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Users will build alterations within the memory_limit using php.ini file located at \/etc\/php.ini. Incase you&#8217;ve got a shared server, it&#8217;s not suggested to make these changes on your own. the most reason is that, if you make changes to memory_limit on a shared server using php.ini file, each account on the server would replicate these [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-1421","post","type-post","status-publish","format-standard","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v15.2.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to change the memory_limit in .htaccess file - OWS KB<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ownwebservers.com\/kb\/how-to-change-the-memory_limit-in-htaccess-file\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to change the memory_limit in .htaccess file - OWS KB\" \/>\n<meta property=\"og:description\" content=\"Users will build alterations within the memory_limit using php.ini file located at \/etc\/php.ini. Incase you&#8217;ve got a shared server, it&#8217;s not suggested to make these changes on your own. the most reason is that, if you make changes to memory_limit on a shared server using php.ini file, each account on the server would replicate these [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ownwebservers.com\/kb\/how-to-change-the-memory_limit-in-htaccess-file\/\" \/>\n<meta property=\"og:site_name\" content=\"OWS KB\" \/>\n<meta property=\"article:published_time\" content=\"2021-08-24T10:36:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-08-24T10:36:53+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\">\n\t<meta name=\"twitter:data1\" content=\"admin\">\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\">\n\t<meta name=\"twitter:data2\" content=\"2 minutes\">\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/#website\",\"url\":\"https:\/\/ownwebservers.com\/kb\/\",\"name\":\"OWS KB\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/ownwebservers.com\/kb\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/how-to-change-the-memory_limit-in-htaccess-file\/#webpage\",\"url\":\"https:\/\/ownwebservers.com\/kb\/how-to-change-the-memory_limit-in-htaccess-file\/\",\"name\":\"How to change the memory_limit in .htaccess file - OWS KB\",\"isPartOf\":{\"@id\":\"https:\/\/ownwebservers.com\/kb\/#website\"},\"datePublished\":\"2021-08-24T10:36:00+00:00\",\"dateModified\":\"2021-08-24T10:36:53+00:00\",\"author\":{\"@id\":\"https:\/\/ownwebservers.com\/kb\/#\/schema\/person\/4a40fe3fe17a08ddd1d7c113668e75f2\"},\"breadcrumb\":{\"@id\":\"https:\/\/ownwebservers.com\/kb\/how-to-change-the-memory_limit-in-htaccess-file\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ownwebservers.com\/kb\/how-to-change-the-memory_limit-in-htaccess-file\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/how-to-change-the-memory_limit-in-htaccess-file\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/\",\"url\":\"https:\/\/ownwebservers.com\/kb\/\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/how-to-change-the-memory_limit-in-htaccess-file\/\",\"url\":\"https:\/\/ownwebservers.com\/kb\/how-to-change-the-memory_limit-in-htaccess-file\/\",\"name\":\"How to change the memory_limit in .htaccess file\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/#\/schema\/person\/4a40fe3fe17a08ddd1d7c113668e75f2\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ba5db5841d48bd7517bb2583e13983e6d2fa56a4099a0b3c61ad2daefc321303?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"https:\/\/ownwebservers.com\/kb\"]}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","_links":{"self":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/1421","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/comments?post=1421"}],"version-history":[{"count":2,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/1421\/revisions"}],"predecessor-version":[{"id":1423,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/1421\/revisions\/1423"}],"wp:attachment":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/media?parent=1421"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/categories?post=1421"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/tags?post=1421"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}