0

I have problem in laravel project to move live server to localhost. I have download application zip file and extract it to my localhost server directory and import data table to database and also it install composer and migrate data table but localhost server is not run my project onbrowser. so please help me how to i do this and run my application on localhost. I follow this tutorial but it's not work with me.

2
  • Have you done php artisan serve ? Did it throw an error when entering localhost:8000 ? Commented May 24, 2018 at 14:31
  • No i am set path and host in this file ( /etc/apache2/sites-available/laravel.conf). <VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /var/www/html/laravel/public ServerName example.com <Directory /var/www/html/laravel/public> Options +FollowSymlinks AllowOverride All Require all granted </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost> Commented May 24, 2018 at 14:36

1 Answer 1

1
  1. Go to live server then in your destination project directory
  2. Select all files and compress them to make a .zip file.
  3. Download this .zip file
  4. Decompress it
  5. Make a "public" directory in the same location where "laravelfiles" directory exist
  6. Select all files except "laravelfiles", move them into "public" directory
  7. In "public" directory open index.php file
  8. Edit this " require DIR.'/laravelfiles/vendor/autoload.php'; " to " require DIR.'/../vendor/autoload.php'; "
  9. Edit this " $app = require_once DIR.'/laravelfiles/bootstrap/app.php'; " to " $app = require_once DIR.'/../bootstrap/app.php'; "
  10. Go to "laravelfiles" directory,open cmd run "php artisan serve"
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.