Hallo,
aus bestimmten grunden kann ich Magento 2 nur mit FTP ohne SSH verwalten.
Kann mir jemand sagen, was ich im Backend machen soll, damit gleiche Wirkung haben, wie diese Befehle:
php bin/magento setup:upgrade
php -d memory_limit=1024M bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f de_DE --theme ..
php bin/magento cache:clean
php bin/magento cache:flush
php bin/magento indexer:reindex
Kann mir zu jedem Befehl entsprechende Handlung im Backend nennen?
Was wird gemacht wenn folgende Button angeklickt werden:
1.Cache-Speicher leeren
2.Magento-Cache leeren
3. Cashe statischer Daten leere
Welche Verzeichnisse werden dabei gelöscht? Was muss ich im Backend machen wenn ich compilieren muss?
Wie installiere ich ein neies Modul richtig? Ohne SSH.
Gruß
Vladimir
Solved! Go to Solution.
Hello @mironsoft_de
For installing module without SSH/CLI you just create command.php file in your Magento root, then write below code in this file.
<?php echo "<pre>"; system('php bin/magento setup:upgrade'); // You can change command as you want. echo "</pre>"; ?> |
And run this script with http://domain.com/command.php It will gives you resulted output.
You can also do the following steps:
If you want to run Magento 2 command without CLI then we have a another solution for that, but it doesn’t gives you any message (Success or Fail), but you can use this if you don’t have any option.
For that you have to create command.php file in your Magento root, and paste below code in command.php file.
<?php 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'); $state->setAreaCode('frontend'); $k[0]='bin/magento'; $k[1]='setup:upgrade'; // You can change command as you want like setup:static-content:deploy, cache:status etc. $_SERVER['argv']=$k; try { $handler = new \Magento\Framework\App\ErrorHandler(); set_error_handler([$handler, 'handler']); $application = new Magento\Framework\Console\Cli('Magento CLI'); $application->run(); } catch (\Exception $e) { while ($e) { echo $e->getMessage(); echo $e->getTraceAsString(); echo "\n\n"; $e = $e->getPrevious(); } } |
And run this script with http://domain.com/command.php it doesn’t gives you any message (Success or Fail), but you can use this as a second option.
Follow one of these two steps and in place of commands you can change the command according to your requirement.
You can also clean and flush cache types in the Magento Admin . Go to System > Tools > Cache Management. Flush Cache Storage is equivalent to bin/magento cache:flush. Flush Magento Cacheis equivalent to bin/magento cache:clean.
If found my answer useful. Please click Kudos and accept as solution!
Hello @mironsoft_de
For installing module without SSH/CLI you just create command.php file in your Magento root, then write below code in this file.
<?php echo "<pre>"; system('php bin/magento setup:upgrade'); // You can change command as you want. echo "</pre>"; ?> |
And run this script with http://domain.com/command.php It will gives you resulted output.
You can also do the following steps:
If you want to run Magento 2 command without CLI then we have a another solution for that, but it doesn’t gives you any message (Success or Fail), but you can use this if you don’t have any option.
For that you have to create command.php file in your Magento root, and paste below code in command.php file.
<?php 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'); $state->setAreaCode('frontend'); $k[0]='bin/magento'; $k[1]='setup:upgrade'; // You can change command as you want like setup:static-content:deploy, cache:status etc. $_SERVER['argv']=$k; try { $handler = new \Magento\Framework\App\ErrorHandler(); set_error_handler([$handler, 'handler']); $application = new Magento\Framework\Console\Cli('Magento CLI'); $application->run(); } catch (\Exception $e) { while ($e) { echo $e->getMessage(); echo $e->getTraceAsString(); echo "\n\n"; $e = $e->getPrevious(); } } |
And run this script with http://domain.com/command.php it doesn’t gives you any message (Success or Fail), but you can use this as a second option.
Follow one of these two steps and in place of commands you can change the command according to your requirement.
You can also clean and flush cache types in the Magento Admin . Go to System > Tools > Cache Management. Flush Cache Storage is equivalent to bin/magento cache:flush. Flush Magento Cacheis equivalent to bin/magento cache:clean.
If found my answer useful. Please click Kudos and accept as solution!