Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

towhid's avatar

how to deployment laravel appplication in shared hosting without shell and composer any command apply ..

is it necessary dedicated server hosting for any laravel application deployment ?

0 likes
4 replies
bobbybouwmann's avatar

Well it's not necessary but definitely recommended!

You can use ftp to move all your project files including the vendor directory to the directory of your webserver and serve the website from there. Note that you need to watch out with the public directory.

Also you can't run migrations so you need to export your local database structure and import that on your shared hosting environment.

You can follow this tutorial if you like: https://dev.to/asapabedi/deploying-laravel-5-applications-on-shared-hosting-without-the-use-of-ssh--16a6 or you can Google for a tutorial with your hosting providers name!

Altogether I would try to move to an environment where you have more control. For example Laravel Forge is really easy to use and you don't need any server knowledge, because Forge will build up the server and bootstrap the website for you!

1 like
towhid's avatar

@bobbybouwmann thank you i am chekcing you r link if any kind of help need i will again knock you thnaks a lot ..

towhid's avatar

OK please help me like my requirement @bobbybouwmann

i have shared hosting , i am using this link dev.mydomain.com and there are lots of project my project file name is "live" so i am extract all file to here , there are all applications file , but two files move from public folder - index.php and .htaccess , could you please suggest me what is my index.php code change and what is my .htaccess code change .

this is my present index .php code

require __DIR__.'/../vendor/autoload.php';   

$app = require_once __DIR__.'/../bootstrap/app.php';

this is my present .htaccess file code

<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews -Indexes
    </IfModule>

    RewriteEngine On

    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} (.+)/$
    RewriteRule ^ %1 [L,R=301]

    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>


what i am doing for my this link when some one hit this link then show my application

dev.mydomain.com/live

towhid's avatar
towhid
OP
Best Answer
Level 5

The asking questions is how to command call without shell then i found it like if we want to use the migrate command then you can write down in your routes

 Route::get('/migrate', function () {
     $exitCode = \Artisan::call('migrate');
 });
1 like

Please or to participate in this conversation.