问题
I have an existing laravel (v4) project in one server. Now I want to upload it to a new server. Can anyone explain the steps how to do this?
I am very new in Laravel. This is what I have done so far:
I have downloaded all the files to my machine and then uploaded to my new cPanel server. Created mysql database and imported tables.
回答1:
Follow the following steps:
- Create a new database from phpmyadmin of your new cpanel
- Import your previous database to the new database
- In app/config/database.php change your data config to new database configure
- Just transfer all your files and folder to new cpanel
If the paths are not changed then your website should work fine.
回答2:
You should add to new server db, dump your db in past server, after add in new server with php my admin, change db configs in application configuration.
来源:https://stackoverflow.com/questions/32696893/move-laravel-project-to-new-server