Knowledge Base

How to install and run a Laravel application

Laravel applications need PHP, Composer dependencies, a database, an .env file, and a public document root that points to Laravel's public folder.

Create

  1. Create the website/domain in the hosting panel.
  2. Create a database and database user for the application.
  3. Upload the Laravel project files outside the public web root when possible.
  4. Make sure the web-accessible document root points to the Laravel public folder.
  5. Create or update .env with the app URL, database name, database user, and password.
  6. Install dependencies with composer install --no-dev --optimize-autoloader.
  7. Run php artisan key:generate if the app key is not already set.
  8. Run database migrations only when you understand what they will change: php artisan migrate.
  9. Set writable permissions for storage and bootstrap/cache.
  10. Issue SSL and test the site.

For production, also run php artisan config:cache, php artisan route:cache, and php artisan view:cache when your deployment process supports it.

Manage

  • Upload code changes carefully and keep a backup before replacing files.
  • Use Composer for dependency changes and run Laravel cache commands after configuration changes.
  • Use phpMyAdmin for careful database exports/imports, but avoid manual table edits unless you understand the impact.
  • Open a support ticket for document-root changes, queue workers, cron scheduling, or permission issues.

Delete

  1. Export the database and download application files if you may need them later.
  2. Remove the website/subdomain if your account has permission, or request deletion from support.
  3. Delete the Laravel files, database, database user, FTP access, and related DNS records after the backup is confirmed.
  4. Ask support to remove any cron jobs or queue workers connected to the app.

Troubleshooting

  • If you see a 500 error, check storage/logs/laravel.log.
  • If the homepage lists files or shows the wrong folder, the document root is not pointing to public.
  • If database errors appear, verify DB_HOST, DB_DATABASE, DB_USERNAME, and DB_PASSWORD.
  • If uploaded files fail, check permissions for storage.
  • If queues, cron, or scheduled tasks are required, contact support so they can be configured safely.
Please rate this article to help us improve our Knowledge Base.

0 0