Download StackFood Multi Restaurant, Food Delivery App with Laravel Admin and Restaurant Panel Buy Full App on $79
Download FlutKit - Flutter UI Kit Most beautiful Flutter UI Kit with 20+ Full App, 450+ Screens. Buy Full Kit on $39
Download Fluxstore Multi Vendor WooCommerce/Dokan Plugin compatible WordPress eCommerce Flutter App. Buy Full App on $79

How to Deploy Flutter Web App on cPanel Shared Hosting

In this example, we are going to show you the easiest way to host the Flutter Web app on cPanel hosting. The Flutter web is not matured yet, but it is developing very rapidly. In this example, you will learn to deploy Flutter Web files to cPanel/VPS hosting.

Read this also: How to deploy Flutter Web App on VPS Server with Domain Name

1. Build Web App

In command prompt hit the command below to generate files to deploy on cPanel/Hosting server.

flutter build web

Now, it will generate files at your_project/build/web/. Files may look like below:

2. Edit index.html and Remove <base> Tag:

Open index.html with your code editors like VSCode or Notepad and remove the code line.

<base href="/">

Remove this line from index.html

Read this: Why you should remove <base> tag from index.html

3. Buy Hosting

There are lots of web hosting on the market, I suggest buying one among the following hostings.

  1. Bluehost ($2.97/Month)
  2. Hostgator ($2.75/Month)

When you buy Hosting from it, it will provide you the cPanel login.

4. log in to cPanel and go to FIle Manager

Log into cPanel with credentials provided by the Hosting provider, and go to "File Manager".

6. Upload file to public_html folder:

In the file manager, go to the public_html folder and upload all the build files.

7. Now open Your Domain.

Now open your primary domain or any domain pointed to public_html folder. Here is the example we have uploaded.

https://deploy-example.fluttercampus.com/ (Wait for few seconds on slow Loading)

In this way, you can host your Flutter Web app to cPanel hosting or any kind of hosting.

No any Comments on this Article


Please Wait...