1


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.

Imrul.H
  • 5,760
  • 14
  • 55
  • 88
  • 1
    So this should work already if your new server uses the same MySQL database name, user and password. If they are different edit your `app/config/database.php` and fill in the new database name, user and password. If this doesn't solve your problem please edit your question and tell us what your error messages are. – Pᴇʜ Sep 21 '15 at 14:09

2 Answers2

2

Follow the following steps:

  1. Create a new database from phpmyadmin of your new cpanel
  2. Import your previous database to the new database
  3. In app/config/database.php change your data config to new database configure
  4. Just transfer all your files and folder to new cpanel

If the paths are not changed then your website should work fine.

Zahan Safallwa
  • 3,880
  • 2
  • 25
  • 32
  • This works perfect, except the fact about URL re-write with .htaccess. If try to write any rule (mainly to remove index.php), It goes to server's default 404 page. If I put index.php in URL, then it works. For this problem, some pictures and assets are also not loading. Do you know anything about that? – Imrul.H Sep 24 '15 at 10:46
  • http://stackoverflow.com/a/32746953/3975838 follow this link. there will be no need of index.php in url. – Zahan Safallwa Sep 24 '15 at 16:50
0

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.

Hayk Manasyan
  • 508
  • 2
  • 20