---
title: How to Deploy Laravel on Cyberpanel VPS
description: "Deploying Laravel on a cyberpanel Server is a seamless process that can be achieved by following the steps below. ### **Step 1. Create a website on Cyberpanel** Go to Cyberpanel -> Websites -> Create Website. ![](https://truehost.com/support/wp-content/uploads/2024/12/image-158.png) ### **Step 2: Upload…"
url: "https://truehost.com/support/knowledge-base/how-to-deploy-laravel-on-cyberpanel-vps/"
updated: "2024-12-10"
category: Cyberpanel
---

# How to Deploy Laravel on Cyberpanel VPS

Deploying Laravel on a cyberpanel Server is a seamless process that can be achieved by following the steps below.

### **Step 1. Create a website on Cyberpanel**

Go to Cyberpanel -> Websites -> Create Website.

![](https://truehost.com/support/wp-content/uploads/2024/12/image-158.png)

### **Step 2: Upload your website Files to Cyberpanel.**

![](https://truehost.com/support/wp-content/uploads/2024/12/image-159-1024x537.png)

### **Step 3: Extract the uploaded files**

Extract the files and then move them to the public_html directory of your application.

![](https://truehost.com/support/wp-content/uploads/2024/12/image-160-1024x268.png)

Move the files

![](https://truehost.com/support/wp-content/uploads/2024/12/image-162-1024x406.png)

### **Step 4: Create a .htaccess**

Create a .htacess file and add the code snipped below so as to redirect to **public** folder inside your **public_html** folder

![](https://truehost.com/support/wp-content/uploads/2024/12/image-163-1024x321.png)

Code snippet.

```
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^$ public/index.php [L]
    RewriteRule ^((?!public/).*)$ public/$1 [L,NC]
</IfModule>
```

### **Step 5: Access your site.**

![](https://truehost.com/support/wp-content/uploads/2024/12/image-166.png)

### **Step 6: Troubleshooting (In case of Issues)**

To troubleshoot errors

Error 404 - Ensure you've added the code snippet in your .htacess file.

Fix File permissions on Cyberpanel

Error 500.

You may need to enable debug so as to troubleshoot error 500.

In Laravel, you can do this in 2 files below.

a) .env file

Open the .env file and locate the APP_DEBUG and change this from false to true.

Once done, revert back the changes.

![](https://truehost.com/support/wp-content/uploads/2024/12/image-164-1024x363.png)

b) Open config/app.php file and locate

**`'debug' => (bool) env('APP_DEBUG', false),`**

Change the value to true.

![](https://truehost.com/support/wp-content/uploads/2024/12/image-165-1024x481.png)

You can also try clearing cache using commands below

**`php artisan config:cache`**

**`php artisan config:clear`**

Congratulations, You've successfully deployed your Laravel application on Cyberpanel.

Happy Hosting!
