Skip to main content

Shared Hosting Guide (cPanel, Plesk, DirectAdmin)

LeadHub is built from the ground up to run on shared hosting. You do not need a VPS, a dedicated server, SSH access, or any command-line knowledge whatsoever. If you can upload a file and fill out a web form, you can install and run LeadHub.

This guide covers everything specific to shared hosting environments.


LeadHub on Shared Hosting โ€” What You Need to Knowโ€‹

What you absolutely do NOT needโ€‹

  • No SSH / terminal / command line โ€” ever
  • No artisan commands โ€” LeadHub never requires you to type commands
  • No Composer โ€” all PHP dependencies are pre-installed in the vendor/ folder that comes in your download package
  • No Node.js or npm โ€” all CSS and JavaScript is pre-compiled and ready to go
  • No Redis โ€” LeadHub uses file-based sessions and caching by default
  • No Supervisor โ€” the cron.php file replaces all background processing
  • No root access โ€” standard shared hosting user permissions are sufficient

What you DO needโ€‹

  • PHP 8.3 or higher (selectable in cPanel/Plesk/DirectAdmin)
  • A MySQL database (all shared hosts provide this โ€” you create one in one minute)
  • The ability to add a cron job (all major shared hosts support this)
  • Around 500 MB of free disk space
  • Apache with mod_rewrite enabled (the default on virtually all shared hosts)

Choosing How to Install โ€” Option A or Option Bโ€‹

There are two ways to install LeadHub on shared hosting depending on how your hosting is set up:

  • Option A โ€” Addon Domain (Recommended): LeadHub gets its own dedicated domain or subdomain (e.g., leads.yourdomain.com or crm.yourdomain.com). This is the cleanest setup.
  • Option B โ€” Flat install in public_html: You install LeadHub directly inside your main public_html/ folder. This works but requires a few extra steps.

This is the best way to install LeadHub on shared hosting. You give LeadHub its own domain or subdomain, such as leads.yourdomain.com. It stays completely separate from any other website on your account.

Step 1: Create an Addon Domain or Subdomainโ€‹

In cPanel:

  1. Log in to cPanel.
  2. Click Addon Domains (in the Domains section).
  3. Fill in:
    • New Domain Name: e.g., leads.yourdomain.com
    • Subdomain / FTP Username: cPanel fills this in automatically
    • Document Root: This is the important one โ€” change it to something like public_html/leadhub/public. This means cPanel's web server will point the domain at LeadHub's public/ folder, which is exactly what it needs. (More on this below.)
  4. Click Add Domain.

Why point to public/? LeadHub's application files (app/, config/, database/, storage/, vendor/) are meant to live above the web root โ€” meaning they should not be directly accessible from a browser. Only the public/ folder should be web-accessible. This is the same design used by WordPress, Magento, and most modern PHP applications. It keeps your data files secure.

In Plesk:

  1. Log in to Plesk.
  2. Click Add Domain or Add Subdomain.
  3. Enter the domain name (e.g., leads.yourdomain.com).
  4. Under "Document Root" (or "Web Root"), you will set this to your leadhub/public folder after uploading โ€” Plesk may let you set this during domain creation, or you may set it afterward in the domain's Apache/Nginx settings.

In DirectAdmin:

  1. Log in to DirectAdmin.
  2. Go to Domain Setup โ†’ Add Another Domain.
  3. Enter the domain name.
  4. Set the document root to point to your leadhub/public folder.

Step 2: Upload the LeadHub Filesโ€‹

You need to upload the LeadHub files so that the folder structure looks like this on your server:

public_html/
leadhub/ โ† all LeadHub files go here (app, config, storage, vendor, etc.)
app/
bootstrap/
config/
database/
public/ โ† this is what your addon domain points to
resources/
routes/
storage/
vendor/
cron.php
.env.example
...etc

Upload via cPanel File Manager:

  1. In cPanel, click File Manager.
  2. Navigate to public_html/.
  3. Create a new folder called leadhub (click + Folder in the toolbar).
  4. Go inside the new leadhub folder.
  5. Click Upload and upload your leadhub-v1.0.0.zip file.
  6. Once uploaded, right-click the ZIP file and choose Extract. Extract it here.
  7. After extraction, check that you can see folders like app/, public/, storage/, vendor/ directly inside public_html/leadhub/. If the extraction created an extra nested folder (like leadhub/leadhub/), move the files up one level.

Upload via FTP:

  1. Connect to your server using your FTP client.
  2. On your computer, unzip the LeadHub package first.
  3. Upload the entire unzipped folder to public_html/leadhub/ on your server.

Step 3: Create a MySQL Databaseโ€‹

  1. In cPanel, go to MySQL Databases.
  2. Under "Create New Database", type a name (e.g., leadhub) and click Create Database. Note the full name cPanel shows (it will be yourusername_leadhub).
  3. Under "MySQL Users" โ†’ "Add New User", create a username (e.g., leadhub_user) and a strong password. Click Create User.
  4. Under "Add User to Database", select your new user and your new database. Click Add.
  5. On the next screen, tick All Privileges and click Make Changes.

Write down your database name, username, and password โ€” you will need them in the installer.

Step 4: Set File Permissionsโ€‹

In cPanel File Manager, navigate to public_html/leadhub/. Then:

  1. Right-click the storage folder โ†’ Change Permissions โ†’ set to 755 โ†’ tick "Recurse into subdirectories" โ†’ click Change Permissions.
  2. Right-click the bootstrap/cache folder โ†’ Change Permissions โ†’ set to 755 โ†’ click Change Permissions.

Step 5: Run the Installer Wizardโ€‹

Open your browser and go to:

https://leads.yourdomain.com/install

(Use whatever domain/subdomain you set up in Step 1.)

Follow the five installer steps:

  1. Welcome โ€” requirements check (should be all green)
  2. Database โ€” enter the database details from Step 3
  3. Admin Account โ€” create your account and workspace
  4. License โ€” enter your Envato purchase code (or skip and add later)
  5. Finish โ€” click "Install LeadHub" and wait for it to complete

After installation, you will be redirected to /admin automatically.


Option B โ€” Flat Install in public_html/โ€‹

Use this method if you want LeadHub to run at your main domain (https://yourdomain.com) and you cannot or do not want to use an addon domain.

In a flat install, all of LeadHub's files โ€” including the app/, config/, storage/, and vendor/ folders โ€” are placed directly inside public_html/. The contents of LeadHub's public/ folder are also moved up into public_html/ alongside everything else.

Do not worry about security. The .htaccess file that comes with LeadHub automatically blocks browser access to all sensitive directories (app/, config/, database/, storage/, vendor/, cron.php, .env, etc.). Visitors can only ever access the public-facing files like index.php, CSS, and JavaScript.

Step 1: Upload the filesโ€‹

  1. In cPanel File Manager, navigate to public_html/.
  2. Upload and extract your leadhub-v1.0.0.zip file here.
  3. After extraction, you should have public_html/leadhub/ containing all the files.

Step 2: Rearrange the filesโ€‹

This is the key step. You need to:

A. Move everything from inside public_html/leadhub/public/ up into public_html/ directly. This includes index.php, the build/ folder, js/, css/, .htaccess, robots.txt, etc.

B. Move all other LeadHub folders and files from public_html/leadhub/ up into public_html/ as well. This means moving app/, bootstrap/, config/, database/, resources/, routes/, storage/, vendor/, cron.php, and all other files.

After this is done, your public_html/ should contain:

public_html/
index.php โ† moved from leadhub/public/
.htaccess โ† moved from leadhub/public/
build/ โ† moved from leadhub/public/
app/ โ† moved from leadhub/
bootstrap/ โ† moved from leadhub/
config/ โ† moved from leadhub/
database/ โ† moved from leadhub/
resources/ โ† moved from leadhub/
routes/ โ† moved from leadhub/
storage/ โ† moved from leadhub/
vendor/ โ† moved from leadhub/
cron.php โ† moved from leadhub/
...etc

The index.php file automatically detects this flat layout and adjusts the application's paths accordingly โ€” no configuration changes needed on your part.

Step 3: Create the database, set permissions, and run the installerโ€‹

The rest of the steps are identical to Option A:

  • Create a MySQL database in cPanel (see Option A, Step 3)
  • Set storage/ and bootstrap/cache/ to permission 755 (see Option A, Step 4)
  • Visit https://yourdomain.com/install in your browser and follow the five steps

Setting Up the Cron Job โ€” CRITICALโ€‹

This is the most important step after installation. Without the cron job, LeadHub will not process incoming leads from webhooks, automations will not run, scheduled emails will not send, and IMAP lead sources will not be checked.

The cron job runs a file called cron.php once every minute. Each time it runs, it:

  1. Processes up to 30 queued jobs (incoming leads from Facebook/Google/etc., outgoing emails, automation actions, webhook deliveries, etc.)
  2. Runs scheduled tasks (IMAP inbox checks, scheduled reports, periodic cleanups)

You only need one cron job โ€” cron.php. That is all.

Adding the cron job in cPanelโ€‹

  1. Log in to cPanel.

  2. In the Advanced section, click Cron Jobs.

  3. Under "Add New Cron Job", set the timing fields to run every minute:

    • Minute: *
    • Hour: *
    • Day: *
    • Month: *
    • Weekday: *

    (You can also select "Once Per Minute" from the "Common Settings" dropdown if your cPanel has one.)

  4. In the Command field, enter:

    php /home/yourusername/public_html/leadhub/cron.php >> /dev/null 2>&1

    Replace yourusername with your actual cPanel username, and adjust the path to match where you installed LeadHub.

  5. Click Add New Cron Job.

That is it. LeadHub will now process jobs and run scheduled tasks every minute automatically.

Adding the cron job in Pleskโ€‹

  1. Log in to Plesk.

  2. Click on your domain.

  3. Go to Scheduled Tasks (sometimes called "Cron Jobs").

  4. Click Add Task.

  5. Set the schedule to run every minute (set all fields to *).

  6. Set the command to:

    php /var/www/vhosts/yourdomain.com/leadhub/cron.php >> /dev/null 2>&1

    The exact path depends on how Plesk stores your files. You can find the correct path by clicking on your domain's File Manager and looking at the path shown in the address bar.

  7. Click OK.

Adding the cron job in DirectAdminโ€‹

  1. Log in to DirectAdmin.

  2. Go to Cron Manager (in the Advanced section or under Tools).

  3. Click Add or Create Cron Job.

  4. Set all time fields to * (every minute).

  5. Enter the command:

    php /home/yourusername/domains/yourdomain.com/leadhub/cron.php >> /dev/null 2>&1
  6. Save.

Finding the correct PHP pathโ€‹

The cron command uses php to run the cron file. On most shared hosts, just using php is enough and it automatically uses the PHP version you selected in MultiPHP Manager or Select PHP Version.

If you are getting errors in your cron logs or cron.php is not running, you may need to specify the full path to PHP. Common paths are:

  • /usr/local/bin/php โ€” most common on cPanel servers
  • /usr/bin/php โ€” common on Plesk and Debian-based servers
  • /opt/cpanel/ea-php83/root/usr/bin/php โ€” cPanel with EasyApache 4, PHP 8.3

To find the exact path on your server, you can ask your hosting provider's support team. Simply say: "What is the full path to PHP 8.3 for use in a cron job?"

The safe command using the full path would look like:

/usr/local/bin/php /home/yourusername/public_html/leadhub/cron.php >> /dev/null 2>&1

Alternative: Web-based cron (if your host does not support shell cron)โ€‹

A very small number of shared hosts do not provide cron job access, or only allow cron jobs to run via a URL rather than a shell command. LeadHub supports this through a secret token system.

To use web-based cron:

  1. Open your LeadHub .env file (located in your LeadHub root folder โ€” in cPanel File Manager you may need to enable "Show Hidden Files" to see it).
  2. Add this line:
    CRON_SECRET=YourRandomSecretHere
    Replace YourRandomSecretHere with a long random string of letters and numbers (at least 30 characters). Keep this secret โ€” do not share it.
  3. Save the file.
  4. Set up your hosting's URL-based cron to call this URL every minute:
    https://yourdomain.com/cron.php?token=YourRandomSecretHere

If your host offers an external cron service (some control panels call it "URL Cron" or "HTTP Cron"), enter that URL as the scheduled URL, set the frequency to every minute, and save.

Security note: Without CRON_SECRET set, cron.php blocks all browser/web access entirely. Never share your CRON_SECRET value publicly.


File Permissions Referenceโ€‹

Folder / FileCorrect PermissionWhy
storage/ (and all subdirectories)755LeadHub writes session files, logs, cache, and uploaded files here
bootstrap/cache/755LeadHub writes compiled configuration files here
public/755Web server needs to read files here
All PHP files (.php)644Readable by web server, not executable directly
.env640 or 644Sensitive โ€” readable by web server, not publicly accessible

If you are getting "Permission denied" or "Storage is not writable" errors, the most common fix is to set storage/ to 755 recursively.


Selecting the Right PHP Versionโ€‹

LeadHub requires PHP 8.3 or higher. Here is a quick reminder of how to change the PHP version on each panel:

cPanel: Software โ†’ MultiPHP Manager โ†’ select your domain โ†’ change version to PHP 8.3 โ†’ Apply.

Plesk: Websites & Domains โ†’ select your domain โ†’ PHP Settings โ†’ change PHP version to 8.3 โ†’ OK.

DirectAdmin: Domain Setup โ†’ select domain โ†’ PHP Version โ†’ select 8.3.

After changing the PHP version, refresh the LeadHub installer or admin panel to confirm the change took effect.


Troubleshootingโ€‹

ProblemLikely causeSolution
Blank white page at domainWrong PHP version or PHP not processing filesSwitch to PHP 8.3 in your control panel; confirm your domain is pointing to the right folder
"Page not found" / 404 errorFiles in wrong folder, or mod_rewrite not activeCheck file locations; make sure .htaccess was uploaded; contact host to confirm mod_rewrite is enabled
"Forbidden" / 403 errorWrong file permissionsSet storage/ and public/ to 755; check that index.php is at permission 644
Can't access /install after uploadFlat install path issueMake sure index.php is directly in public_html/ (not nested in a subfolder)
Cron job not runningWrong path to PHP or to cron.phpCheck the full path; try /usr/local/bin/php instead of just php; ask your host for the correct PHP path
Automations not triggeringCron job not set up, or running as wrong userVerify cron job is added and saved; check that the path in the cron command points to the correct location
File uploads fail (logo, imports)storage/app/public/ not writable, or symlink issueSet storage/ to 755 recursively; if symlinks are disabled, the installer creates a direct copy instead โ€” this should work automatically
Emails not sendingEmail not configured yetGo to Settings โ†’ Email and enter your SMTP details; click "Send Test Email"
"Cannot connect to database"Wrong database credentialsDouble-check name (include the cPanel username prefix), username, and password; verify user has all privileges
White screen after loginSession storage issueCheck that storage/framework/sessions/ exists and is writable (755)
Installer says already installedstorage/installed.lock file existsTo re-run installer: delete the installed.lock file from storage/ in File Manager
Addon domain shows parent siteAddon domain not pointing to public/ folderIn cPanel โ†’ Addon Domains, edit the domain's document root to end with /leadhub/public