{"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 plugin v28.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\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:publisher\" content=\"https:\/\/www.facebook.com\/OWN-WEB-SERVERS-107052961577434\" \/>\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=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@OwnWebservers\" \/>\n<meta name=\"twitter:site\" content=\"@OwnWebservers\" \/>\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\":\"Article\",\"@id\":\"https:\\\/\\\/ownwebservers.com\\\/kb\\\/how-to-change-the-memory_limit-in-htaccess-file\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ownwebservers.com\\\/kb\\\/how-to-change-the-memory_limit-in-htaccess-file\\\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/ownwebservers.com\\\/kb\\\/#\\\/schema\\\/person\\\/4a40fe3fe17a08ddd1d7c113668e75f2\"},\"headline\":\"How to change the memory_limit in .htaccess file\",\"datePublished\":\"2021-08-24T10:36:00+00:00\",\"dateModified\":\"2021-08-24T10:36:53+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/ownwebservers.com\\\/kb\\\/how-to-change-the-memory_limit-in-htaccess-file\\\/\"},\"wordCount\":421,\"publisher\":{\"@id\":\"https:\\\/\\\/ownwebservers.com\\\/kb\\\/#organization\"},\"inLanguage\":\"en-US\"},{\"@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 - 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\",\"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,\"name\":\"Home\",\"item\":\"https:\\\/\\\/ownwebservers.com\\\/kb\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to change the memory_limit in .htaccess file\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/ownwebservers.com\\\/kb\\\/#website\",\"url\":\"https:\\\/\\\/ownwebservers.com\\\/kb\\\/\",\"name\":\"OWS KB\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/ownwebservers.com\\\/kb\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/ownwebservers.com\\\/kb\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/ownwebservers.com\\\/kb\\\/#organization\",\"name\":\"Own Web Servers\",\"url\":\"https:\\\/\\\/ownwebservers.com\\\/kb\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/ownwebservers.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/ownwebservers.com\\\/kb\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/OWS-Logo-with-punchline-front-scaled.png\",\"contentUrl\":\"https:\\\/\\\/ownwebservers.com\\\/kb\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/OWS-Logo-with-punchline-front-scaled.png\",\"width\":2560,\"height\":994,\"caption\":\"Own Web Servers\"},\"image\":{\"@id\":\"https:\\\/\\\/ownwebservers.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/OWN-WEB-SERVERS-107052961577434\",\"https:\\\/\\\/x.com\\\/OwnWebservers\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/ownwebservers.com\\\/kb\\\/#\\\/schema\\\/person\\\/4a40fe3fe17a08ddd1d7c113668e75f2\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ba5db5841d48bd7517bb2583e13983e6d2fa56a4099a0b3c61ad2daefc321303?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ba5db5841d48bd7517bb2583e13983e6d2fa56a4099a0b3c61ad2daefc321303?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ba5db5841d48bd7517bb2583e13983e6d2fa56a4099a0b3c61ad2daefc321303?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"https:\\\/\\\/ownwebservers.com\\\/kb\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to change the memory_limit in .htaccess file - OWS KB","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ownwebservers.com\/kb\/how-to-change-the-memory_limit-in-htaccess-file\/","og_locale":"en_US","og_type":"article","og_title":"How to change the memory_limit in .htaccess file - OWS KB","og_description":"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;]","og_url":"https:\/\/ownwebservers.com\/kb\/how-to-change-the-memory_limit-in-htaccess-file\/","og_site_name":"OWS KB","article_publisher":"https:\/\/www.facebook.com\/OWN-WEB-SERVERS-107052961577434","article_published_time":"2021-08-24T10:36:00+00:00","article_modified_time":"2021-08-24T10:36:53+00:00","author":"admin","twitter_card":"summary_large_image","twitter_creator":"@OwnWebservers","twitter_site":"@OwnWebservers","twitter_misc":{"Written by":"admin","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ownwebservers.com\/kb\/how-to-change-the-memory_limit-in-htaccess-file\/#article","isPartOf":{"@id":"https:\/\/ownwebservers.com\/kb\/how-to-change-the-memory_limit-in-htaccess-file\/"},"author":{"name":"admin","@id":"https:\/\/ownwebservers.com\/kb\/#\/schema\/person\/4a40fe3fe17a08ddd1d7c113668e75f2"},"headline":"How to change the memory_limit in .htaccess file","datePublished":"2021-08-24T10:36:00+00:00","dateModified":"2021-08-24T10:36:53+00:00","mainEntityOfPage":{"@id":"https:\/\/ownwebservers.com\/kb\/how-to-change-the-memory_limit-in-htaccess-file\/"},"wordCount":421,"publisher":{"@id":"https:\/\/ownwebservers.com\/kb\/#organization"},"inLanguage":"en-US"},{"@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 - 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","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,"name":"Home","item":"https:\/\/ownwebservers.com\/kb\/"},{"@type":"ListItem","position":2,"name":"How to change the memory_limit in .htaccess file"}]},{"@type":"WebSite","@id":"https:\/\/ownwebservers.com\/kb\/#website","url":"https:\/\/ownwebservers.com\/kb\/","name":"OWS KB","description":"","publisher":{"@id":"https:\/\/ownwebservers.com\/kb\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ownwebservers.com\/kb\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/ownwebservers.com\/kb\/#organization","name":"Own Web Servers","url":"https:\/\/ownwebservers.com\/kb\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ownwebservers.com\/kb\/#\/schema\/logo\/image\/","url":"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2026\/07\/OWS-Logo-with-punchline-front-scaled.png","contentUrl":"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2026\/07\/OWS-Logo-with-punchline-front-scaled.png","width":2560,"height":994,"caption":"Own Web Servers"},"image":{"@id":"https:\/\/ownwebservers.com\/kb\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/OWN-WEB-SERVERS-107052961577434","https:\/\/x.com\/OwnWebservers"]},{"@type":"Person","@id":"https:\/\/ownwebservers.com\/kb\/#\/schema\/person\/4a40fe3fe17a08ddd1d7c113668e75f2","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ba5db5841d48bd7517bb2583e13983e6d2fa56a4099a0b3c61ad2daefc321303?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ba5db5841d48bd7517bb2583e13983e6d2fa56a4099a0b3c61ad2daefc321303?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ba5db5841d48bd7517bb2583e13983e6d2fa56a4099a0b3c61ad2daefc321303?s=96&d=mm&r=g","caption":"admin"},"sameAs":["https:\/\/ownwebservers.com\/kb"]}]}},"_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}]}}