Answer the question
In order to leave comments, you need to log in
How to migrate laravel database?
It is necessary to transfer the laravel project to another vps, there are files and a database.
For the test, I tried to deploy locally, but I couldn’t connect the database (I’m not familiar with laravel).
1. Apache document root points to /public folder
2. updated DB_X constants in .env file to actual (new) ones and imported base
As a result, main page is displayed (only text, images with address '/storage/X' are not displayed), and other pages display 404. I can’t find any logs, I don’t write anything in storage / logs, in apache error log too. In config/database.php, several types are specified in connections (sqlite, mysql, pgsql, sqlsrv), everything with a forge user except mysql, I also specified new parameters in mysql, but without result. Who knows, tell me what files need to be updated.
UPD:Thanks to everyone, especially Sergey delphinpro (in the comments) for the answer.
My final list is:
1. Apache document root to public folder
2. Install composer packages
3. Update database connection details in .env file
4. Link public/storage to storage/app/public
(in app root php artisan storage:link
)
Also make sure that in Apache config is set to AllowOverride so that .htaccess rules for CNC work correctly
Answer the question
In order to leave comments, you need to log in
You need to configure apache on index.php
To display images, you need to make a link to the public.
Read the documentation, it's all explained there.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question