{"id":1213,"date":"2020-08-14T08:31:36","date_gmt":"2020-08-14T08:31:36","guid":{"rendered":"http:\/\/www.lcn-support.com\/?post_type=ht_kb&#038;p=1213"},"modified":"2020-08-28T11:44:52","modified_gmt":"2020-08-28T11:44:52","slug":"how-to-set-php-directives-using-php-ini","status":"publish","type":"ht_kb","link":"https:\/\/www.lcn.com\/support\/articles\/how-to-set-php-directives-using-php-ini\/","title":{"rendered":"How to set PHP directives using .php.ini"},"content":{"rendered":"\n<p>This guide will explain how to set PHP directives for your site by using a .php.ini file. For customers using LCN&nbsp;<a href=\"https:\/\/www.lcn.com\/web-hosting\" target=\"_blank\" rel=\"noreferrer noopener\">web hosting<\/a>&nbsp;and&nbsp;<a href=\"https:\/\/www.lcn.com\/web-hosting\/wordpress\" target=\"_blank\" rel=\"noreferrer noopener\">WordPress hosting<\/a>.<\/p>\n\n\n\n<p>Let\u2019s get started\u2026<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What are PHP directives?<\/h3>\n\n\n\n<p>PHP directives are the configuration settings used to control various behaviours of PHP functions on your site. This can include for example; the memory limit assigned for PHP, the maximum amount of time before a PHP process will time out and the maximum file-size that could be uploaded via a PHP script.<\/p>\n\n\n\n<p>For sites hosted on LCN Web hosting packages, changes to PHP directives can be applied by uploading a file named .user.ini to the hosting web directory. Changes specified in this file will only apply to the individual site that the file is uploaded to.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How to create a .php.ini file<\/h3>\n\n\n\n<p>You can use a text editor like Notepad, Wordpad, or Textedit to create a .php.ini file. You can start with an empty text file, then add each PHP directive that you need to set for your site on a new line and save the file, entering the file name as: .php.ini.<\/p>\n\n\n\n<div class=\"container row col-md-24 support-article panel panel-default panel-body\" style=\"background-color: #f6e9db; border-color: #ead9c7; border: 1px solid #ddd; border-radius: 4px; padding: 1% 2%; background-image: url('\/images\/my_account\/highlight.png'); background-position: left top; background-repeat: repeat-x;\">\n<p><span style=\"font-size: 17px;\"><strong style=\"color: #e77600 !important; font-size: 18px;\">Please Note:<\/strong>&nbsp;The file name starts with a dot \u2013 on some operating systems this may be treated as a hidden file. You may need to update your system settings to allow viewing hidden files to avoid problems with this.<\/span><\/p>\n<\/div>\n\n\n\n<p>Below are some examples of PHP directives you can add to the .php.ini:<\/p>\n\n\n\n<p><pre class=\"prettyprint linenums\">memory_limit=128M<br>post_max_size=128M<br>upload_max_filesize=128M<br>max_input_vars=1000<br>max_input_time=120<br>max_execution_time=120<\/pre><\/p>\n\n\n\n<div class=\"container row col-md-24 support-article panel panel-default panel-body\" style=\"background-color: #f6e9db; border-color: #ead9c7; border: 1px solid #ddd; border-radius: 4px; padding: 1% 2%; background-image: url('\/images\/my_account\/highlight.png'); background-position: left top; background-repeat: repeat-x;\">\n<p><span style=\"font-size: 17px;\"><strong style=\"color: #e77600 !important; font-size: 18px;\">Please Note:<\/strong>&nbsp;The values included above are the defaults for sites hosted with LCN using PHP7. You should not need to add a .php.ini file unless you need to increase the default values provided above.<\/span><\/p>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">How to upload your .php.ini file<\/h3>\n\n\n\n<p>After you\u2019ve created a .php.ini file, you can upload it to the webspace for your domain using FTP.<\/p>\n\n\n\n<p>For instructions on how to upload your file via FTP we have guide&nbsp;<a href=\"https:\/\/www.lcn.com\/support\/articles\/how-to-upload-files-to-your-website-with-ftp\/\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a><\/p>\n\n\n\n<p>Or you can use the File Manager as shown <a href=\"https:\/\/www.lcn.com\/support\/articles\/how-to-use-the-lcn-file-manager\/#Uploading\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>.<\/p>\n\n\n\n<p>That\u2019s it! You\u2019ve created or edited and uploaded a .php.ini file to your website. The new settings should take effect on your site within five minutes.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This guide will explain how to set PHP directives for your site by using a .php.ini file. For customers using LCN&nbsp;web hosting&nbsp;and&nbsp;WordPress hosting. Let\u2019s get started\u2026 What are PHP directives? PHP directives are the configuration settings used to control various behaviours of PHP functions on your site. This can include for example; the memory limit [&hellip;]<\/p>\n","protected":false},"author":3,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[4],"ht-kb-tag":[5],"class_list":["post-1213","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-managing-web-hosting","ht_kb_tag-web-hosting"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to set PHP directives using .php.ini - LCN.com<\/title>\n<meta name=\"description\" content=\"A guide for how to set PHP directives for your site by using a .php.ini file. For customers using LCN web hosting and WordPress hosting.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.lcn.com\/support\/articles\/how-to-set-php-directives-using-php-ini\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to set PHP directives using .php.ini - LCN.com\" \/>\n<meta property=\"og:description\" content=\"A guide for how to set PHP directives for your site by using a .php.ini file. For customers using LCN web hosting and WordPress hosting.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.lcn.com\/support\/articles\/how-to-set-php-directives-using-php-ini\/\" \/>\n<meta property=\"og:site_name\" content=\"Customer Support Guides - LCN\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/lcndotcom\" \/>\n<meta property=\"article:modified_time\" content=\"2020-08-28T11:44:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.lcn.com\/support\/wp-content\/uploads\/support-facebook-feed.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@lcndotcom\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.lcn.com\/support\/articles\/how-to-set-php-directives-using-php-ini\/\",\"url\":\"https:\/\/www.lcn.com\/support\/articles\/how-to-set-php-directives-using-php-ini\/\",\"name\":\"How to set PHP directives using .php.ini - LCN.com\",\"isPartOf\":{\"@id\":\"https:\/\/www.lcn.com\/support\/#website\"},\"datePublished\":\"2020-08-14T08:31:36+00:00\",\"dateModified\":\"2020-08-28T11:44:52+00:00\",\"description\":\"A guide for how to set PHP directives for your site by using a .php.ini file. For customers using LCN web hosting and WordPress hosting.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.lcn.com\/support\/articles\/how-to-set-php-directives-using-php-ini\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.lcn.com\/support\/articles\/how-to-set-php-directives-using-php-ini\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.lcn.com\/support\/articles\/how-to-set-php-directives-using-php-ini\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.lcn.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to set PHP directives using .php.ini\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.lcn.com\/support\/#website\",\"url\":\"https:\/\/www.lcn.com\/support\/\",\"name\":\"Customer Support Guides - LCN\",\"description\":\"- LCN\",\"publisher\":{\"@id\":\"https:\/\/www.lcn.com\/support\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.lcn.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.lcn.com\/support\/#organization\",\"name\":\"LCN.com\",\"url\":\"https:\/\/www.lcn.com\/support\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.lcn.com\/support\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.lcn.com\/support\/wp-content\/uploads\/2020\/02\/ZF_-hcc3.jpg\",\"contentUrl\":\"https:\/\/www.lcn.com\/support\/wp-content\/uploads\/2020\/02\/ZF_-hcc3.jpg\",\"width\":461,\"height\":461,\"caption\":\"LCN.com\"},\"image\":{\"@id\":\"https:\/\/www.lcn.com\/support\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/lcndotcom\",\"https:\/\/x.com\/lcndotcom\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to set PHP directives using .php.ini - LCN.com","description":"A guide for how to set PHP directives for your site by using a .php.ini file. For customers using LCN web hosting and WordPress hosting.","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:\/\/www.lcn.com\/support\/articles\/how-to-set-php-directives-using-php-ini\/","og_locale":"en_US","og_type":"article","og_title":"How to set PHP directives using .php.ini - LCN.com","og_description":"A guide for how to set PHP directives for your site by using a .php.ini file. For customers using LCN web hosting and WordPress hosting.","og_url":"https:\/\/www.lcn.com\/support\/articles\/how-to-set-php-directives-using-php-ini\/","og_site_name":"Customer Support Guides - LCN","article_publisher":"https:\/\/www.facebook.com\/lcndotcom","article_modified_time":"2020-08-28T11:44:52+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/www.lcn.com\/support\/wp-content\/uploads\/support-facebook-feed.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_site":"@lcndotcom","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.lcn.com\/support\/articles\/how-to-set-php-directives-using-php-ini\/","url":"https:\/\/www.lcn.com\/support\/articles\/how-to-set-php-directives-using-php-ini\/","name":"How to set PHP directives using .php.ini - LCN.com","isPartOf":{"@id":"https:\/\/www.lcn.com\/support\/#website"},"datePublished":"2020-08-14T08:31:36+00:00","dateModified":"2020-08-28T11:44:52+00:00","description":"A guide for how to set PHP directives for your site by using a .php.ini file. For customers using LCN web hosting and WordPress hosting.","breadcrumb":{"@id":"https:\/\/www.lcn.com\/support\/articles\/how-to-set-php-directives-using-php-ini\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.lcn.com\/support\/articles\/how-to-set-php-directives-using-php-ini\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.lcn.com\/support\/articles\/how-to-set-php-directives-using-php-ini\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.lcn.com\/support\/"},{"@type":"ListItem","position":2,"name":"How to set PHP directives using .php.ini"}]},{"@type":"WebSite","@id":"https:\/\/www.lcn.com\/support\/#website","url":"https:\/\/www.lcn.com\/support\/","name":"Customer Support Guides - LCN","description":"- LCN","publisher":{"@id":"https:\/\/www.lcn.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.lcn.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.lcn.com\/support\/#organization","name":"LCN.com","url":"https:\/\/www.lcn.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.lcn.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.lcn.com\/support\/wp-content\/uploads\/2020\/02\/ZF_-hcc3.jpg","contentUrl":"https:\/\/www.lcn.com\/support\/wp-content\/uploads\/2020\/02\/ZF_-hcc3.jpg","width":461,"height":461,"caption":"LCN.com"},"image":{"@id":"https:\/\/www.lcn.com\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/lcndotcom","https:\/\/x.com\/lcndotcom"]}]}},"_links":{"self":[{"href":"https:\/\/www.lcn.com\/support\/wp-json\/wp\/v2\/ht-kb\/1213","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lcn.com\/support\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.lcn.com\/support\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.lcn.com\/support\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lcn.com\/support\/wp-json\/wp\/v2\/comments?post=1213"}],"version-history":[{"count":2,"href":"https:\/\/www.lcn.com\/support\/wp-json\/wp\/v2\/ht-kb\/1213\/revisions"}],"predecessor-version":[{"id":1363,"href":"https:\/\/www.lcn.com\/support\/wp-json\/wp\/v2\/ht-kb\/1213\/revisions\/1363"}],"wp:attachment":[{"href":"https:\/\/www.lcn.com\/support\/wp-json\/wp\/v2\/media?parent=1213"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.lcn.com\/support\/wp-json\/wp\/v2\/ht-kb-category?post=1213"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.lcn.com\/support\/wp-json\/wp\/v2\/ht-kb-tag?post=1213"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}