Jump to content

How to migrate Laravel Project to Localhost


sadith
 Share

Recommended Posts

Hello..

I need to host a Laravel website to localhost in PC, I have installed Xampp server. I created new database and imported the database file (MySQL) from server. and configured the .env file.

My question is, only the statics pages (Like, contact us, about us) is working, not the pages which are connected to the DB. 

Can I know how to migrate properly from server backup files to localhost. this is our website. https://www.albacars.ae/ for your reference. 

Thank you!

 

 

Link to comment
Share on other sites

Are there any errors in your logs that are telling you what's wrong?

Is your MySQL module on?

Have you set up the new config/connection info for localhost? ("localhost", "root", "", "db_name") by default

 

Link to comment
Share on other sites

  • 4 months later...

First of all you have create migration file with this command :

php artisan make: migration table_name

this command is execute and  create table with timestamp of above:

after this command is direct whenever you create database of below this command:

php artisan migrate

If you have specific table migrate this command is execute:

php artisan migrate  --path=/database/migrations/filename.php

 

Link to comment
Share on other sites

  • 7 months later...

Hello,

If you have already installed Laravel on local then you can run below commands after navigating to your project folder:

npm install (if you already have npm installed, skip this)
composer install (if you already have composer installed, skip this)
php artisan migrate
npm run dev

After that run the "PHP Artisan" command and browse the project.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...