Move Laravel Project From localhost to live production server

Today, We want to share with you Move Laravel Project From localhost to live production server.In this post we will show you how to deploy laravel 5.7 project on linux server, hear for Moving Laravel 5.6 from local machine to live server we will give you demo and example for implement.In this post, we will learn about How to move Laravel Project from localhost to production server with an example.

Move Laravel Project From localhost to live production server

There are the Following The simple About Move Laravel Project From localhost to live production server Full Information With Example and source code.

As I will cover this Post with live Working example to develop how to upload laravel 5.6 project to cpanel, so the some upload laravel 5.6 project to server for this example is following below.

  • Zip your laravel app files
  • Export database On Your localhost Systtem
  • Change in .env file
  • Modify Laravel paths
  • set file permission

Following The step by step you have must All the step followed to move local Laravel Project(Application) to live server in Laravel.

Step 1 :Zip your laravel app files

Moving Laravel Project from local machine to live server

First of all create Zip All Files as well as folder. and then unzip On public_html Folder it in your linux Cpanel Web Explorer. as well as Move all The public folder data into root directory on Live

Step 2 : Export database On Your localhost Systtem

Export your Laravel Project Mysql database then set(import) it up on your Live server.

Step 3 : Change in .env file.

change .env file , DB_NAME=database name, DB_PASSWORD=Pa4587FDSf692, DB_HOST=”localhost”, APP_URL=”http://your_domain_name”,

And then We have open the .env config file showing on the live web root folder of your laravel project.Update the env files (username, Password, DB_DATABASE, DB_HOST, APP_URL, APP_NAME ) credentials.

move Laravel Project from localhost to production server some change below

Step 4 : Modify Laravel paths

index.php

Note: Step 1 laravel local project public folder move to public_html folder on Live server

here, edit simple main root file name index.php It is in main public folder in public_html (mani below two line) and change the following adjustments

Change:
require __DIR__.'/../bootstrap/autoload.php';
to:
require __DIR__.'/../laravel/bootstrap/autoload.php';

----------------------------------

Change:
$app = require_once __DIR__.'/../bootstrap/app.php';
to:
$app = require_once __DIR__.'/../laravel/bootstrap/app.php';

Step 5 : set file permission

Note :If You have getting some 403 Forbidden Access or 500 Internal Server message Error showing, so simple you try gaing to the changing
the permissions of your Laravel Application root path main Laravel structure storage folder found on the root folder of your laravel app.
Set the file permission to 0777.

Imp Note : set file permission to 777

That’s it Good Luck!, now Your URL check your live site. “Deploying Laravel Project on shared hosting Successfully”

Moving laravel Application from localhost to server issue

simple

php artisan cache:clear
php artisan config:clear
php artisan view:clear
Angular 6 CRUD Operations Application Tutorials

How to move Laravel Project from localhost to production server?

To move a Laravel project from localhost to a production server, you can follow the following steps:

  1. Upload your project files to the production server: You can upload your project files using FTP, SSH, or any other file transfer method to the appropriate location on your production server.
  2. Set file permissions: You need to set the appropriate file permissions for your project files and folders on the production server. For example, you may need to set the storage folder to 775 permissions to allow Laravel to write to the storage files.
  3. Configure the environment variables: You need to configure the environment variables on your production server. You can create a .env file on the server, or set the environment variables in your server’s control panel or using command-line tools.
  4. Set up the database: You need to create a new database on your production server, import your local database dump into it, and then update the database credentials in the .env file to match the production server’s database credentials.
  5. Run composer update: Run the composer update command on the production server to install all the necessary dependencies.
  6. Generate application key: Run the php artisan key:generate command on the production server to generate a new application key.
  7. Clear cache and config: Run the php artisan cache:clear and php artisan config:clear commands on the production server to clear the cache and config files.
  8. Point the domain to the production server: Update your domain’s DNS settings to point to your production server’s IP address.
  9. Test your application: Once the above steps are completed, test your application by visiting the domain in your web browser.

Following these steps will help you move your Laravel project from your localhost to your production server.

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about Move Laravel Project From localhost to live production server.
I would like to have feedback on my Pakainfo.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Leave a Comment