Just copy everything... You provide zero information here!!
Normally you would use GIT. When using GIT you can simply clone or pull the same project on another server and you're good to go!
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
please guide me step by step or suggest any reference link accurate .....
Just copy everything... You provide zero information here!!
Normally you would use GIT. When using GIT you can simply clone or pull the same project on another server and you're good to go!
Normally you would use source control (i.e. GIT). But if you are really just looking to test it once you can FTP the files over. You don't need to move the vendor directory.
Connect through ssh and deploy using Git. I wouldn't recommend shared hosting for Laravel projects. It is better to go with a cloud infrastructure. If you don't know how to setup your own server on cloud, then you can do it using Cloudways Laravel hosting platform that gives you managed Laravel servers in one click.
@pardeepkumar So you don't need the vendor directory??
please guide me step by step or suggest any reference link accurate
That would depend entirely on your setup, and the server you're moving it to. Is it your own server? Shared hosting? Do you have ssh access? You don't give any info to adequately give you an answer.
please guide me step by step or suggest any reference link accurate
Do you realize how many times this has been answered with details right here on this forum. I myself have uploaded screenshots of proper folder setup and everything.
@Cronix hello , sorry to share lesss information, i have shared hosting , no i have no ssh acess ..
@jlrdw hello may yes i have many guide but not any thing clear me , could you please share your guided link which one you share with everyone in larcasts ..
@bobbybouwmann , i haveno idea how to use git and how to pull or push environment do you share me any reference guide link...
Also here is one of the post where it was discussed in detail, Have to check the links in the post:
https://laracasts.com/discuss/channels/tips/hosting-on-shared-server-best-practice
That post I saved as it covers various aspects.
yes i solve my problem -
nothing is serious for local to live server - if you want to check then you use xampp and before project start inex.php and htaccess file move public folder to project root folder. and then open your index.php file and edit this two line
require __DIR__ . '/vendor/autoload.php';
to
require __DIR__ . '/../vendor/autoload.php';
and second one - is
$app = require_once __DIR__ . '/bootstrap/app.php'
to
$app = require_once __DIR__ . '/../bootstrap/app.php';
thats it [ if your project run perfectly in local server - after file move( index.php & htaccess ) then must be run live server ]
and others thing you please make sure the live server configuration these list ar need to open --
PHP >= 7.1.3
OpenSSL PHP Extension
PDO PHP Extension
Mbstring PHP Extension
Tokenizer PHP Extension
XML PHP Extension
Ctype PHP Extension
JSON PHP Extension
and last thing - if you use storage link in your local server - then you must be command generate after successfully transfer your project live server -
thank you
@towhid and then anyone can download /.env file
please don't advise other people to do this
@snapey sorry if i did any wrong here , i don't understand , could you please point me which thing is wrong . then i will delete my comment .
thank you
@towhid Can you go to http://yoursite.com/.env and see the .env file?
its show my .env file !! why this show what i will do for hide this file ? i never - see this problem - even my last project in live server but .env is not work its show this error -!!
Sorry, the page you are looking for could not be found.
please tell more about this thing. thank you @Cronix and @Snapey
Because of the way you set it up, .env is in your document root, and document root is publicly accessible by the internet.
It should be something like (I don't know your host or their dir structure)
/home/your-account/.env
/home/your-account/app
/home/your-account/bootstrap
/home/your-account/config
/home/your-account/ ...{other laravel dirs/files)
/home/your-account/public_html
/home/your-account/public_html/index.php
/home/your-account/public_html/.htaccess
all laravel files/dirs should be outside of public_html (or whatever your document root is)
what i will do for hide this file ?
Please tell me you are kidding. With a link to exactly what to do and how to do it you asked again. Totally amazing.
@jlrdw yes i understand need to move others - Folder - without - public_html thank you
yes i understand the whole process and the structure now -
if i move all public folder files move root folder and others files and folder move another folder in root folder -- is it right process or need to change any folder directory ?
thank you
The process is that the folder you serve to users is the public folder EVERYTHING else needs to be above that in the file system.
You can also rename public if your provider only serves public_html
If you find yourself moving .htaccess or renaming server.php to index.php then you are doing it wrong
How can I when I don't know what hosting you have.
One of these might help (just declaring, these are both my posts)
http://novate.co.uk/deploy-laravel-5-on-shared-hosting-from-heart-internet/
http://novate.co.uk/install-laravel-5-2-on-fasthosts-shared-hosting/
old, but the principles are still the same
Funny I already shared the link
http://novate.co.uk/deploy-laravel-5-on-shared-hosting-from-heart-internet/
With OP, oh well. snapey snapey.
Actually link in https://laracasts.com/discuss/channels/tips/hosting-on-shared-server-best-practice above. The one I use also and:
I have NEVER had any problems with hosting since I followed snapey's guide.
But there is one secret, you can't follow guide 98%, follow 100%.
@snapey And @cronix Sorry for post was not close , because of i was wrong thing local to live project transfer system ,
but my question is @cronix said this post
/home/your-account/.env
/home/your-account/app
/home/your-account/bootstrap
/home/your-account/config
/home/your-account/ ...{other laravel dirs/files)
/home/your-account/public_html
/home/your-account/public_html/index.php
/home/your-account/public_html/.htaccess
```
and @snapey said
```
http://novate.co.uk/deploy-laravel-5-on-shared-hosting-from-heart-internet/
```
two solution is same ? i have no live server hosting now in this moment where can i check , i am using - 000web host there have some problem . so need to know the answer from both of you then its really easy for me . thank you
Please or to participate in this conversation.