{"id":285,"date":"2025-12-28T19:48:42","date_gmt":"2025-12-28T18:48:42","guid":{"rendered":"https:\/\/mybox.com\/help\/?post_type=manual_kb&#038;p=285"},"modified":"2026-01-09T09:14:16","modified_gmt":"2026-01-09T08:14:16","slug":"how-do-i-call-a-php-script-from-the-ssh-console","status":"publish","type":"manual_kb","link":"https:\/\/mybox.com\/help\/en\/knowledgebase\/how-do-i-call-a-php-script-from-the-ssh-console\/","title":{"rendered":"How do I call a PHP script from the SSH console?"},"content":{"rendered":"\n<div class=\"translation-block translation-block-merged\">\n<p class=\"wp-block-paragraph\">As part of your <strong>Flexible Web Hosting<\/strong>, you have the option of using the <strong>SSH (Secure Shell)<\/strong> console. <a href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/how-do-i-activate-my-ssh-account\/\">HERE<\/a> you will find a guide on how to activate <strong>SSH<\/strong> access on your account.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Sometimes there is a need to call the script directly from the console.<br>Once you have logged in and navigated to the directory where the script you want to run is located, issue the command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php your-script.php<\/code><\/pre>\n\n\n\n<\/div>\n\n<div id=\"mybox-309200367\" class=\"mybox-content mybox-entity-placement\"><div class=\"early-access-banner-inpost\">\r\n  <div class=\"banner-left-inpost\">\r\n    <div class=\"icon-box-inpost\">\r\n      <img decoding=\"async\" src=\"https:\/\/mybox.com\/help\/wp-content\/uploads\/2026\/02\/square-info-icon.svg\" alt=\"Info\">\r\n    <\/div>\r\n    <div class=\"text-box-inpost\">\r\n      <span class=\"label-inpost\"><span class=\"translation-block translation-block-banner-text\">Early access<\/span><\/span>\r\n      <h4><span class=\"translation-block translation-block-banner-text\">Still need help?<\/span><\/h4>\r\n      <p><span class=\"translation-block translation-block-banner-text\">Contact our customer service team.<\/span><\/p>\r\n    <\/div>\r\n  <\/div>\r\n\r\n  <div class=\"banner-right-inpost\">\r\n    <a href=\"https:\/\/panel.mybox.com\/helpdesk2\/v\/list\/\" class=\"banner-button-inpost\"><span class=\"translation-block translation-block-banner-text\">Message us<\/span><\/a>\r\n  <\/div>\r\n<\/div><\/div>\n\n<div class=\"translation-block translation-block-merged\"><p class=\"wp-block-paragraph\">similarly, if you want to use a version of PHP other than the default <strong>one<\/strong> , e.g. 7.3, you can issue the command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php73 your-script.php<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Please note that the PHP available at the SSH console level is not the same as the PHP version available on the web server where your pages are running, and the PHP interpreter version you select for your website is not related to the currently active and default version at the SSH console level. The default version of PHP on the SSH console is 5.3.<\/p>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"template":"","format":"standard","manualknowledgebasecat":[25,39],"manual_kb_tag":[2934,3609,3619,3704,3705,3706,3707,679,747,818,2323,2930],"class_list":["post-285","manual_kb","type-manual_kb","status-publish","format-standard","hentry","manualknowledgebasecat-hosting","manualknowledgebasecat-php-operations","manual_kb_tag-php-cli","manual_kb_tag-activate-ssh-access","manual_kb_tag-ssh-access","manual_kb_tag-command-line-php","manual_kb_tag-run-php-script","manual_kb_tag-execute-php-script","manual_kb_tag-php-command-line","manual_kb_tag-flexible-web-hosting","manual_kb_tag-secure-shell","manual_kb_tag-php","manual_kb_tag-php-script","manual_kb_tag-ssh-console"],"_links":{"self":[{"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb\/285","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb"}],"about":[{"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/types\/manual_kb"}],"author":[{"embeddable":true,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/users\/1"}],"version-history":[{"count":0,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb\/285\/revisions"}],"wp:attachment":[{"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/media?parent=285"}],"wp:term":[{"taxonomy":"manualknowledgebasecat","embeddable":true,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manualknowledgebasecat?post=285"},{"taxonomy":"manual_kb_tag","embeddable":true,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb_tag?post=285"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}