Summary of "Как развернуть Laravel на хостинге Beget"
Summary of the Video: “Как развернуть Laravel на хостинге Beget”
This video tutorial by Max Orlov, a remote web developer, provides a detailed step-by-step guide on how to deploy a Laravel project on Beget hosting, using Git and GitHub for version control and deployment.
Key Technological Concepts & Product Features Covered
-
Hosting Choice and Setup
- Beget hosting is chosen due to its reliability, support, and evolving services.
- The process applies similarly to other shared hosting providers.
- Registration of a new Beget account and purchasing or connecting a domain.
- Domain setup, DNS propagation, and domain linking to the hosting site.
-
Beget Control Panel Overview
- Managing domains and websites via Beget’s control panel.
- Understanding the folder structure, particularly the
Public HTMLfolder where web requests are routed. - Using the file manager and terminal (SSH) access on Beget.
- Enabling SSH access for command-line operations.
-
Laravel Project Deployment Using Git
- Importance of Git for deployment versus manual upload.
- Initializing a Git repository locally and pushing it to a private GitHub repository.
- Cloning the repository directly on Beget hosting via SSH terminal.
- Handling private repository access by generating SSH keys on Beget and adding deploy keys to GitHub.
- Using
git cloneandgit pullcommands to manage project files on the server.
-
Handling Laravel’s Folder Structure on Beget
- Deleting the default
Public HTMLfolder on Beget. - Creating a symbolic link named
Public HTMLthat points to Laravel’spublicfolder to route requests correctly. - Explanation of symbolic links and their management in Laravel’s
filesystems.phpconfig. - Adding symbolic links to
.gitignoreto avoid path conflicts across environments.
- Deleting the default
-
PHP Version Management
- Checking and switching PHP version to 8.2 (required by Laravel) both in Beget’s site settings and terminal.
- Running Laravel Artisan commands with the correct PHP version prefix (e.g.,
php8.2 artisan).
-
Composer Dependency Management
- Beget hosting provides Composer version 1.x by default, but Laravel requires Composer 2.x.
- Installing Composer locally within the project by downloading
composer.phar. - Running
php8.2 composer.phar installto install Laravel dependencies on the server.
-
Laravel Environment Setup
- Creating
.envfile from.env.exampleon the server. - Generating Laravel application encryption key with
php8.2 artisan key:generate. - Editing
.envto configure app environment, domain, logging, and later database connection.
- Creating
-
Database Setup
- Creating a MySQL database on Beget (only MySQL supported).
- Configuring database credentials in
.env. - Running Laravel migrations (
php8.2 artisan migrate) to set up database tables. - Using PHPMyAdmin on Beget for database management.
-
SSL Certificate Installation
- Requesting and installing a free SSL certificate via Beget control panel.
- Enabling HTTP to HTTPS redirection after certificate issuance.
- Testing HTTPS access to ensure secure connections.
-
Updating the Laravel Project - Workflow for updating the project: commit changes locally → push to GitHub → pull changes on Beget. - Running Composer install and migrations after updates. - Using symbolic links and PHP artisan commands to maintain the deployment.
Reviews, Guides, or Tutorials Provided
- Complete tutorial on deploying a Laravel application on shared hosting using Beget as an example.
- Git and GitHub integration for deployment with private repository access via SSH keys.
- Composer version management workaround by installing a local
composer.phar. - Handling Laravel folder structure on shared hosting with symbolic links.
- Setting up SSL certificates and forcing HTTPS.
- Database creation and configuration on Beget.
- Tips on managing PHP versions and running artisan commands remotely.
Main Speaker / Source
- Max Orlov, STC remote web developer and content creator.
This video is a practical, hands-on guide for developers familiar with Laravel and Git who want to deploy their projects on Beget shared hosting, covering all necessary steps from domain registration to SSL setup and database connection.
Category
Technology