FrankDevs

How to Deploy a Laravel Project on SiteGround WordPress Hosting GrowBig Plan

27 Jan 20265 min read
How to Deploy a Laravel Project on SiteGround WordPress Hosting GrowBig Plan

How to Deploy a Laravel Project on SiteGround WordPress Hosting GrowBig Plan

Introduction

While SiteGround’s WordPress Hosting GrowBig plan is specifically optimized for WordPress sites, many developers wonder if they can use it to host Laravel applications instead. The good news is that it’s entirely possible! In this guide, we’ll walk you through the process of deploying a Laravel project on SiteGround’s WordPress Hosting GrowBig plan.

Understanding SiteGround’s WordPress Hosting GrowBig

Before diving into the deployment process, let’s understand what the GrowBig plan offers. The WordPress Hosting GrowBig plan includes:

  • 20GB storage space
  • Unlimited bandwidth
  • Support for multiple websites
  • Enhanced security and backup features
  • SuperCacher technology for improved performance
  • WordPress staging environment
  • 24/7 customer support

While these features are tailored for WordPress, the underlying infrastructure is fully capable of supporting Laravel applications.

Expert Insights

Join 1,000+ business owners getting actionable web & marketing insights every month.

No spam, unsubscribe anytime.Privacy Policy

Prerequisites

Before you begin deploying Laravel on SiteGround’s WordPress Hosting GrowBig, ensure you have:

  • An active SiteGround WordPress Hosting GrowBig account
  • SSH access enabled on your account
  • Basic knowledge of command-line operations
  • Composer installed on the server (it comes pre-installed on SiteGround servers)
  • PHP 7.3 or higher (SiteGround supports multiple PHP versions up to 8.3)

Step-by-Step Deployment Guide

Step 1: Enable SSH Access

The first step is to enable SSH access to your account:

  1. Log in to your SiteGround Site Tools
  2. Navigate to Devs section and select SSH Keys Manager
  3. Import your public SSH key for secure authentication
  4. Optionally, restrict SSH access to specific IP addresses for enhanced security

Step 2: Connect via SSH

Once SSH is enabled, connect to your server:

Unknown block type "code", specify a component for it in the `components.types` option

Replace username with your SiteGround username and your-domain.com with your actual domain.

Step 3: Create Your Laravel Project

Navigate to your project directory and create a new Laravel project using Composer:

Unknown block type "code", specify a component for it in the `components.types` option

This command will create a new Laravel project in a folder named blog. If you prefer to install Laravel directly in the root directory (without a subfolder), you can use:

Unknown block type "code", specify a component for it in the `components.types` option

The dot (.) indicates the current directory.

Step 4: Configure Your Web Root

Laravel’s main entry point is the index.php file located in the public/ folder. You need to configure your domain or subdomain to point to this directory.

Option A: Using a Subdirectory

If you want to access your Laravel app at your-domain.com/blog, no additional configuration is needed. The Laravel application will be accessible at that URL.

Option B: Using the Main Domain

If you want your Laravel app to be the primary site (accessed directly from your domain), create a symbolic link:

Unknown block type "code", specify a component for it in the `components.types` option

Alternatively, you can rename directories or adjust your domain settings in the SiteGround control panel to point to the Laravel public folder.

Step 5: Configure Your Environment File

Navigate to your Laravel project directory and set up the .env file:

Unknown block type "code", specify a component for it in the `components.types` option

Edit the .env file with your database credentials:

Unknown block type "code", specify a component for it in the `components.types` option

Step 6: Create and Configure Your Database

In the SiteGround control panel:

  1. Go to Databases section
  2. Click MySQL Databases or MariaDB Databases
  3. Create a new database with your desired name
  4. Create a new database user with a strong password
  5. Assign the user to the database with all privileges

Update your .env file with these credentials.

Step 7: Run Database Migrations

Before your application can run properly, you need to create the necessary database tables:

Unknown block type "code", specify a component for it in the `components.types` option

If you have seeders to populate initial data:

Unknown block type "code", specify a component for it in the `components.types` option

Step 8: Set File Permissions

Ensure proper permissions for Laravel’s storage and bootstrap directories:

Unknown block type "code", specify a component for it in the `components.types` option

Step 9: Optimize Your Application (Optional but Recommended)

For improved performance in production, run these optimization commands:

Unknown block type "code", specify a component for it in the `components.types` option

Important Considerations

Is WordPress Hosting GrowBig the Best Choice for Laravel?

While technically possible, there are some points to consider:

  1. Plan Design: The WordPress Hosting plan is specifically optimized for WordPress. If Laravel is your primary use case, SiteGround’s general Hosting plans might offer better-suited features and support.
  2. Support and Tools: SiteGround’s support team is highly trained in WordPress support. While they can assist with general hosting issues, they may have limited expertise with Laravel-specific problems.
  3. One-Click Installation: The WordPress Hosting plan includes WordPress one-click installation, which won’t be useful for a Laravel project.
  4. Performance Optimization: Features like WordPress staging and WordPress-specific caching may not benefit your Laravel application.

When Should You Consider the Regular Hosting Plan Instead?

If any of the following apply, consider SiteGround’s regular Hosting plans instead:

  • Laravel is your primary or only application
  • You need Laravel-specific support and guidance
  • You plan to deploy multiple Laravel applications
  • You want to maximize performance for non-WordPress applications

Troubleshooting Common Issues

Composer Installation Fails

If Composer runs out of memory:

Unknown block type "code", specify a component for it in the `components.types` option

Permission Denied Errors

Ensure proper permissions for Laravel directories:

Unknown block type "code", specify a component for it in the `components.types` option

404 Errors After Deployment

Make sure your .htaccess file exists in the Laravel public directory. If not, create one with:

Unknown block type "code", specify a component for it in the `components.types` option

Database Connection Issues

Verify your database credentials in the .env file. Test the connection by running:

Unknown block type "code", specify a component for it in the `components.types` option

Then in the Tinker shell:

Unknown block type "code", specify a component for it in the `components.types` option

If successful, it will return a PDO object without errors.

Conclusion

Deploying Laravel on SiteGround’s WordPress Hosting GrowBig plan is feasible and can work well for small to medium-sized applications. However, it’s important to evaluate whether this plan aligns with your specific needs. If Laravel is your primary project, you might benefit more from SiteGround’s general Hosting plans that are designed to support various PHP-based applications without WordPress-specific limitations.

For the best experience, don’t hesitate to contact SiteGround’s 24/7 support team to discuss your specific Laravel deployment requirements and get their recommendations.

Additional Resources


Some assets in this article are Designed by Freepik.

Ready to grow your business?

Get a free consultation with our team.

Get Started Now
How to Deploy a Laravel Project on SiteGround WordPress Hosting GrowBig Plan | FrankDevs