How to upload laravel project on namecheap hosting - laravel-5

can somebody please tell me how to upload laravel project on namecheap shared hosting. I am using php version 7.2 and laravel version 5.7.

If you mean how to deploy your project! Just Follow these steps :
Create a new folder: example myfiles.
Copy all your files to this folder.
Go to myfiles -> public and copy these files to public_html (or your home folder - not myfiles).
Open index.php and edit these lines : 24 & 38
Like this :
require __DIR__.'/myfiles/vendor/autoload.php';
$app = require_once __DIR__.'/myfiles/bootstrap/app.php';
Check your host documentation and upload your project.
If you get an ERROR HTTP 500 after deploying your project, just
upgrade PHP version to 7.2 and everything will work inchallah! ;)

Related

Lumen Api deployement return 500 Internal Server Error

I develop a Laravel Api in local it's work, when I deploy I have a error 500.
I copied the folder to the server.
I moved the public folder to root and changed the path in index.php.
I modify the file .env with the prod value.
With I test with postman my route https://my-domain/public/api/v1/mytest : I have a error 500.
What did i miss ?
Please be sure you have followed all the steps. I assume you do not use a subdomain.
Move your zipped project to a folder in the server (e.x. /home/mollusk/project)
Unzip the project
After unzipping your project, move everything under public folder into public_html folder (e.x. /home/mollusk/public_html)
Edit index.php under public_html folder changing
$app = require __DIR__.'/../bootstrap/app.php';
to
$app = require __DIR__.'/../project/bootstrap/app.php';
Give your domain name as value to APP_URL variable in .env file
APP_URL=https://my-domain
I resolve this problem.
The version lumen in dev and prod was different. I upgraded the dev version (5.8) to be in phase with the server (8.x) and it's work !

how to Deploy VueJS, laravel App on live server

i want to deploy the App of laravel with inbuilt vuejs
on my local i just run the "PHP ARTISAN SERVE"
and boom its works for me
but what about the live ?
its not working on live server
my .htaccess and index.php is in public folder
for Laravel we just move the index.php and .htaccess out of public folder and edit some code lines and it will work.
but how it will work with vuejs templates ?
Follow these steps:
Please create a zip folder of your project except the vendor folder.
Deploy the folder on live and extract.
Change your DB and other configuration in env file.
In the terminal on live server, run this command : composer update
After the installation, look for your front page.
Hope it should work fine.

How to deploy Laravel 5.5 on shared hosting without composer

I am trying to deploy a Laravel project on shared hosting. I copied the Laravel folder in user's root directory (/home/shrpr) and copied the content of public directory in /home/shrpr/www folder. I modified the index.php in public folder to include "../Laravel" as explained in site. Since, composer is not allowed on this shared hosting, I also copied my local vendor and storage folder along with laravel folder. But I still keep on getting error 500. So, I added a test.php file in the laravel folder and included it in index.php file to test if path and all is correct as under:
require __DIR__.'/../laravel/test.php'; die;
This works fine as the content of test.php is getting displayed properly. So, it looks like some dependencies of vendor folder is missing. Is there a way of identifying and uploading complete dependencies of laravel and uploading it, that is without use of composer?
Try composer update before upload to shared hosting.
Change permissons of your index.php to 644.
Check your enviroment, maybe isn't works.
Wich version of php is running in your shared hosting? and wich is yor Laravel version, change php version to 7.0
Make sure you have PHP 5.5+ installed on the server. Move the index.php file from public to www and change the paths accordingly.
Another way to deploy laravel on shared hosting is to set up your domain as addon domain and then set root folder of the addon domain to the /public folder of the laravel project. eg. home/mili/laravelproject/public
I tried this with godaddy and it worked.

Uploading Laravel Project into the Web Server

I have the folder into the web server /, where I put all the files/folders except the public folder(with that index.php) of the new laravel project and also in /public_html/ I put all the files from the public folder.
I didn't have to change the paths in bootstrap folder containing 2 files app and autoload, and I did everything as is in the first path in
Uploading Laravel Project onto Web Server
Instead of showing the notorious Welcome to Laravel, it shows nothing.
I am using godaddy web hosting. What I am doing wrong?
Solution:
1.
You have the Home Directory in the web server
/
Which is the parent of Public_HTML folder, here you upload into a folder created by you all the files contenting your laravel project files, folders except the public folder.
In the
/Public_html
You upload all the files containing in the public folder of your laravel project
2. Open the index.php into the public_html and change these things:
require __DIR__.'/../bootstrap/autoload.php';
$app = require_once __DIR__.'/../bootstrap/app.php';
into
require __DIR__.'/../laravelfoldernameinroot/bootstrap/autoload.php';
$app = require_once __DIR__.'/../laravelfoldernameinroot/bootstrap/app.php';
3. Make sure to change the php version in cpanel into 5.6, this is obligatory in order the website to work.
4. All other changes depends on changes you made after building the fresh laravel project.

How to upload laravel 5.0 project on server

I need to upload laravel 5.0 project on server, my problem is how to upload without composer on server and run properly project.
Put the content of your public folder (Laravel public folder) in public_html.
Then any other files and folders upload them in your root directory:
So your folder structure will look something like this:
Remote server:
--App
bootstrap
Vendors
artisan
etc...
--public_html
|
|
--css
img
index.php
.htaccess
etc...
On localhost without composer:
Your Laravel project folder should be in www folder (if wampp server) or htdocs (xampp) and with this localhost/laravelProject/public your project should work.
You can copy all file form public to root folder or use a htacess file to point main doain to public folder.
Check this article it might help.

Resources