5

I have a working Laravel application on my desktop. I am trying to deploy it to a godaddy server. The application has been copied and verified on the server in the same structure format as on my desktop. I have changed the database information in the config to the proper entries. When I run from the server I get the error:

FatalErrorException

Class 'name of the class' not found.

The error is generated in the Routes.php file. Again this app works locally, any idea why it errors when deployed?

3
  • Does it output exactly that or have you substituted "name of the class"? Commented Jan 11, 2014 at 18:12
  • The class name is Book Commented Jan 11, 2014 at 22:23
  • 1
    Check 'name of the class' mainly small/capital letters - probably you have locally win OS and on server is Linux(case sensitive). Do not forget check model names in your definitions of relations(if you have relations)... Commented Jan 12, 2014 at 0:16

1 Answer 1

9

Assuming you have a VPS server running Apache (or whatever else) with a a properly configured vhost and terminal (ssh) access, if you want deploy a Laravel app there, you surely need to

  1. Copy all project files, except for the vendor directory, from localhost to your server
  2. Verify file ownage and access rights (chown/chmod)
  3. Change all necessary config
  4. run a composer update
  5. run php artisan migrate to create the database scheme
  6. clear cache php artisan cache:clear

Next thing is populating the database with your apps data from localhost. You can either do it manually (dump sql local, import it on server), or if you want Laravel for it you can use Seeding (Laravel docs).

There even is a nice package that let's you automaticaly generete Seeders from your current database content - so it's very useful for the purpose of moving the app to another server.

https://github.com/orangehill/iseed

Inverse seed generator (iSeed) is a Laravel 4 package that provides a method to generate a new seed file based on data from the existing database table.

EDIT

If you are using a shared hosting account, check out this guide

http://driesvints.com/blog/laravel-4-on-a-shared-host

This post from Laravel forum might also be of use

http://forums.laravel.io/viewtopic.php?id=9639

Sign up to request clarification or add additional context in comments.

2 Comments

On the server? Not sure how to do this.
Check the link support.godaddy.com/help/article/4943/…, briefly speeking you have to connect with ssh to your server and type in the commands

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.