cancel
Showing results for 
Search instead for 
Did you mean: 

how do i run php commands etc from magento admin?

how do i run php commands etc from magento admin?

I am getting a lot of advice about running command lines to improve performance etc of magento 2.

but how do i run commands in Magento?

as my files are on remote server and not local server.

 

Magento newbie!!

 

8 REPLIES 8

Re: how do i run php commands etc from magento admin?

Hello @luke_mersh 

 

There are lots of options to run the command but here two options will useful for you

 

1. Via PHP script

You can run the command via making one file in root or pub directory and add command like

 

$command = 'php -dmemory_limit=1G bin/magento setup:upgrade';
echo '<pre>' . shell_exec($command) . '</pre>';

 

for this you no need to access of remote server. you can run easily via url. 

 

2. Via SSH Command line

You can login with your remote ssh username and password and run the command.

 

Problem solved?? please Accept as Solution & give Kudos

 

 

 

Thank you
Anant Prajapati
Magento Certified Developer

Re: how do i run php commands etc from magento admin?

@luke_mersh if you have ssh credentials you can use the below command to connect with the remote server.

 

ssh username@hostname -p portno.

 

After that just enter the password and you are now connected to your remote server.

Then you have to go to your root directory and there you can run the commands.

 

If you stuck anywhere then do let me know.

 

Thanks

Re: how do i run php commands etc from magento admin?

definitely stuck.

I have no idea about command line or SSH.

I am a newbie, just installed Mage2 on remote server and I am using backend to configure display.

I download Weltpixel Owl Carusel, but i need to upgrade php limit as mentioned.

I have never used the command line or SSH for development.

 

Re: how do i run php commands etc from magento admin?

@luke_mersh you can contact your hosting server providers to connect with ssh or they will share the credentials with you.

 

For increasing the limit you require ssh or cpanel of your server.

 

One of the thing is required to change any of the server confiuguration.

 

Thanks

Re: how do i run php commands etc from magento admin?

i do have cpanel on server i shall look at that next.

many thanks

Re: how do i run php commands etc from magento admin?

@luke_mersh connect through cpanel and there you find the option for php settings.

 

There you get the option for increasing the size. 

 

Thanks

Re: how do i run php commands etc from magento admin?

i can also download the files from the server and change the setting and then re-upload the files- would that be possible and if so which files holds though settings?

many thanks

Re: how do i run php commands etc from magento admin?

@luke_mersh for changing the php settings you don't have to download any file instead you can get the option for changing the size there only.

 

One more thing you can also create a ssh account using cpanel.

 

Thanks