Sunday, 16th December 2018
16 December 2018

How to deploy Laravel project into 000webhost site

1. Go to 000webhost cPanel > Settings > General > Reset website. You must make sure no other content is present in your site to prevent interference.

2. Archive your entire Laravel Project in ZIP format. I already did.

3. Upload the archive to 000webhost site to /public_html using File Manager.

4. Move all files/folders which are on the same level with package.json to /

5. Delete /public_html. You won’t need it anymore.

6. Rename /public to /public_html

7. Go to /app/Providers/AppServiceProvider.php at register() method and append the following code inside it:

$this -> app -> bind(‘path.public’, function() { return base_path(‘public_html’); });

8. Open /.env. Copy APP_KEY value without base64:

9. Go to /config/app.php, find ‘key’ and replace the line with the following code: ‘key’ => env(‘APP_KEY’, base64_decode(‘%YOUR_COPIED_APPKEY%’));

10. Update the database credentials from /config/database.php or .env file. Lookup for mysql vector and update the database, username, password properly.

11. Clear old Laravel cache: Delete all files from /bootstrap/cache except .gitignore

Like/Follow us on facebook: