Is there is any way to use Magento 2 without SSH?

I have a server which doesn't have any SSH access.

6 Answers 6


If you can setup cron from same ui, you de not need ssh access. You can switch to production mode locally and than move all files to hosting.


As far as I know, it's quite impossible to have a Magento2 running without access and some knowledge of SSH. The amount of work going in to server configuration and the actions that can only be run via SSH like file deployment, setting development/production modes etc would be near impossible to run without SSH access.

As KAndy suggests, you could set up everything locally (with SSH access), develop and set up your Magento installation and copy that to the host. Though in my experience I couldn't have done any of this without extensive help from my hostingparty for the server-settings etc.


If you can upload file to your server, you can use my file to run magento command line enter image description here Realy sorry!I cannot upload php file here. So you can down it on this page http://www.mageoneplus.com/how-to-run-magento-command-line-without-ssh-access.html


Cron the cli commands.(Dirty I know) php-cli -q /home/yourname/public_html/bin/magento setup:upgrade >/dev/null 2>&1

Then delete cron after.


Here is the perfect solution. Even if system() and shell_exec() and other commands are disabled from server due to security reasons, this script will help you to execute commands.

Note : It will not give any output but it will execute the command successfully.

use Magento\Framework\App\Bootstrap;

require __DIR__ . '/app/bootstrap.php';

$bootstrap = Bootstrap::create(BP, $_SERVER);

$obj = $bootstrap->getObjectManager();

$state = $obj->get('Magento\Framework\App\State');
$k[1]='setup:upgrade'; // You can change command as you want like setup:static-content:deploy, cache:status etc.
try {
$handler = new \Magento\Framework\App\ErrorHandler();
set_error_handler([$handler, 'handler']);
$application = new Magento\Framework\Console\Cli('Magento CLI');
} catch (\Exception $e) {
while ($e) {
echo $e->getMessage();
echo $e->getTraceAsString();
echo "\n\n";
$e = $e->getPrevious();

I just want to add my inquiry to this. Our developer, busy cleaning up malware from our site, asked for SSH access in order to install the latest security patches on our Magento The hosting won't allow it for security reasons. OK, now I have to know for sure if those patches can be easily installed only by FTP access or if it is necessary in order to finish the job and secure the site to have SSH. In that case, I'll have to move to a different hosting. The developer is not helping a lot in this. Please help as the developer won't finish his job and I'm stuck in my ignorance of the topic and our site is down. Thanks

  • Yes! You can do it using ftp access..
    – Asish Hira
    Jan 20, 2017 at 8:56
  • This is not an answer. Sep 19, 2023 at 14:14
  • @Kishor Again, this isn't an answer. Editing from the Low Quality posts removes it from the queue, meaning it does not get deleted. Please select Recommend Deletion instead of editing when you see a non-answer. Sep 19, 2023 at 18:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.