{"id":2954,"date":"2016-12-31T04:24:00","date_gmt":"2016-12-31T04:24:00","guid":{"rendered":"https:\/\/www.milesweb.com\/hosting-faqs\/?p=2954"},"modified":"2018-06-02T09:02:51","modified_gmt":"2018-06-02T09:02:51","slug":"setting-php-settings-command-line","status":"publish","type":"post","link":"https:\/\/www.milesweb.in\/hosting-faqs\/setting-php-settings-command-line\/","title":{"rendered":"Setting Your PHP Settings in Command Line"},"content":{"rendered":"<p>When you are running a PHP file from command line, there might be times when you have to roll out improvements to the PHP settings. In this guide we will demonstrate to you generally accepted methods to determine the php.ini document, and change a PHP setting in summon line. In the event that you are not working in summon line, you can change your PHP settings in cPanel.<\/p>\n<p><strong>Specify the php.ini File in Command Line<\/strong><\/p>\n<ul>\n<li>Connect to your server using SSH.<\/li>\n<li>You can specify the php.ini file in command line by using the following syntax:<\/li>\n<\/ul>\n<p>php -c [Path to php.ini file] [Path to .php file]<\/p>\n<p>For example:<\/p>\n<p>php -c \/home\/userna5\/public_html\/php.ini \/home\/userna5\/public_html\/example.php<\/p>\n<p>Now the example.php file will run, with the limitations set in the php.ini file located here: \/home\/userna5\/public_html<\/p>\n<p><strong>Related:\u00a0<a href=\"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-connect-your-server-by-ssh\/\">How To Login to Your Server By SSH?<\/a><\/strong><\/p>\n<p><strong>Change PHP settings<\/strong><\/p>\n<ul>\n<li>Connect to your server using SSH.<\/li>\n<li>You can specify php.ini settings in command line with this syntax:<\/li>\n<\/ul>\n<p>php -c [Path to php.ini file] [Path to .php file] -d [PHP setting]<\/p>\n<p>For example:<\/p>\n<p>php -c \/home\/userna5\/public_html\/php.ini \/home\/userna5\/public_html\/example.php -d memory_limit=256M<\/p>\n<p>In this example, you can see I am setting the memory limit to 256 Megabytes. Here are some other PHP settings that are often modified:<\/p>\n<p>max_execution_time<\/p>\n<p>max_input_time<\/p>\n<p>upload_max_filesize<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When you are running a PHP file from command line, there might be times when you have to roll out improvements to the PHP settings. In this guide we will demonstrate to you generally accepted methods to determine the php.ini document, and change a PHP setting in summon line. In the event that you are [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2954","post","type-post","status-publish","format-standard","placeholder-for-hentry","category-domain-name-dns-issues"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Setting Your PHP Settings in Command Line<\/title>\n<meta name=\"description\" content=\"In this guide we will demonstrate to you generally accepted methods to determine the php.ini document, and change a PHP setting in summon line.\" \/>\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.milesweb.in\/hosting-faqs\/setting-php-settings-command-line\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Setting Your PHP Settings in Command Line\" \/>\n<meta property=\"og:description\" content=\"In this guide we will demonstrate to you generally accepted methods to determine the php.ini document, and change a PHP setting in summon line.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.milesweb.in\/hosting-faqs\/setting-php-settings-command-line\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Hosting FAQs by MilesWeb\" \/>\n<meta property=\"article:published_time\" content=\"2016-12-31T04:24:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-06-02T09:02:51+00:00\" \/>\n<meta name=\"author\" content=\"Komal Nerkar\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Komal Nerkar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/setting-php-settings-command-line\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/setting-php-settings-command-line\/\"},\"author\":{\"name\":\"Komal Nerkar\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/3bc8d279fa14cc1b47989a57655ec4af\"},\"headline\":\"Setting Your PHP Settings in Command Line\",\"datePublished\":\"2016-12-31T04:24:00+00:00\",\"dateModified\":\"2018-06-02T09:02:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/setting-php-settings-command-line\/\"},\"wordCount\":251,\"commentCount\":0,\"articleSection\":[\"Domain Name &amp; DNS Issues\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.milesweb.in\/hosting-faqs\/setting-php-settings-command-line\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/setting-php-settings-command-line\/\",\"url\":\"https:\/\/www.milesweb.in\/hosting-faqs\/setting-php-settings-command-line\/\",\"name\":\"Setting Your PHP Settings in Command Line\",\"isPartOf\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#website\"},\"datePublished\":\"2016-12-31T04:24:00+00:00\",\"dateModified\":\"2018-06-02T09:02:51+00:00\",\"author\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/3bc8d279fa14cc1b47989a57655ec4af\"},\"description\":\"In this guide we will demonstrate to you generally accepted methods to determine the php.ini document, and change a PHP setting in summon line.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/setting-php-settings-command-line\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.milesweb.in\/hosting-faqs\/setting-php-settings-command-line\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/setting-php-settings-command-line\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.milesweb.in\/hosting-faqs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Setting Your PHP Settings in Command Line\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#website\",\"url\":\"https:\/\/www.milesweb.in\/hosting-faqs\/\",\"name\":\"Web Hosting FAQs by MilesWeb\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.milesweb.in\/hosting-faqs\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/3bc8d279fa14cc1b47989a57655ec4af\",\"name\":\"Komal Nerkar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/fecb012a7d75401295b40f44970a054f6dbcd2f67f30e8f8870a57d6ad9371c9?s=96&d=blank&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/fecb012a7d75401295b40f44970a054f6dbcd2f67f30e8f8870a57d6ad9371c9?s=96&d=blank&r=g\",\"caption\":\"Komal Nerkar\"},\"sameAs\":[\"https:\/\/www.milesweb.com\/\"],\"url\":\"https:\/\/www.milesweb.in\/hosting-faqs\/author\/komal\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Setting Your PHP Settings in Command Line","description":"In this guide we will demonstrate to you generally accepted methods to determine the php.ini document, and change a PHP setting in summon line.","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.milesweb.in\/hosting-faqs\/setting-php-settings-command-line\/","og_locale":"en_US","og_type":"article","og_title":"Setting Your PHP Settings in Command Line","og_description":"In this guide we will demonstrate to you generally accepted methods to determine the php.ini document, and change a PHP setting in summon line.","og_url":"https:\/\/www.milesweb.in\/hosting-faqs\/setting-php-settings-command-line\/","og_site_name":"Web Hosting FAQs by MilesWeb","article_published_time":"2016-12-31T04:24:00+00:00","article_modified_time":"2018-06-02T09:02:51+00:00","author":"Komal Nerkar","twitter_misc":{"Written by":"Komal Nerkar","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/setting-php-settings-command-line\/#article","isPartOf":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/setting-php-settings-command-line\/"},"author":{"name":"Komal Nerkar","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/3bc8d279fa14cc1b47989a57655ec4af"},"headline":"Setting Your PHP Settings in Command Line","datePublished":"2016-12-31T04:24:00+00:00","dateModified":"2018-06-02T09:02:51+00:00","mainEntityOfPage":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/setting-php-settings-command-line\/"},"wordCount":251,"commentCount":0,"articleSection":["Domain Name &amp; DNS Issues"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.milesweb.in\/hosting-faqs\/setting-php-settings-command-line\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/setting-php-settings-command-line\/","url":"https:\/\/www.milesweb.in\/hosting-faqs\/setting-php-settings-command-line\/","name":"Setting Your PHP Settings in Command Line","isPartOf":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#website"},"datePublished":"2016-12-31T04:24:00+00:00","dateModified":"2018-06-02T09:02:51+00:00","author":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/3bc8d279fa14cc1b47989a57655ec4af"},"description":"In this guide we will demonstrate to you generally accepted methods to determine the php.ini document, and change a PHP setting in summon line.","breadcrumb":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/setting-php-settings-command-line\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.milesweb.in\/hosting-faqs\/setting-php-settings-command-line\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/setting-php-settings-command-line\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.milesweb.in\/hosting-faqs\/"},{"@type":"ListItem","position":2,"name":"Setting Your PHP Settings in Command Line"}]},{"@type":"WebSite","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#website","url":"https:\/\/www.milesweb.in\/hosting-faqs\/","name":"Web Hosting FAQs by MilesWeb","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.milesweb.in\/hosting-faqs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/3bc8d279fa14cc1b47989a57655ec4af","name":"Komal Nerkar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/fecb012a7d75401295b40f44970a054f6dbcd2f67f30e8f8870a57d6ad9371c9?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/fecb012a7d75401295b40f44970a054f6dbcd2f67f30e8f8870a57d6ad9371c9?s=96&d=blank&r=g","caption":"Komal Nerkar"},"sameAs":["https:\/\/www.milesweb.com\/"],"url":"https:\/\/www.milesweb.in\/hosting-faqs\/author\/komal\/"}]}},"_links":{"self":[{"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/posts\/2954","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/comments?post=2954"}],"version-history":[{"count":5,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/posts\/2954\/revisions"}],"predecessor-version":[{"id":5359,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/posts\/2954\/revisions\/5359"}],"wp:attachment":[{"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/media?parent=2954"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/categories?post=2954"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/tags?post=2954"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}