Deploying ElmapiCMS on shared hosting

Deploying ElmapiCMS on shared hosting

This guide is for shared hosting: PHP + MySQL (or MariaDB), a document root for web files, and usually cron for background tasks—without deploying from Git on the server.

The Elmapi3Cpanel.zip package (same filename for every channel) is built for upload, extract, and configure workflows that work across typical shared hosts.

Screenshots and menu names use cPanel as an example. If you use Plesk, DirectAdmin, InterWorx, or another panel, use the same ideas: file manager, database wizard, optional SSH/terminal, phpMyAdmin or equivalent, and scheduled tasks (cron).

This flow uses Elmapi3Cpanel.zip.

  • CodeCanyon — the file is in your product download.
  • GitHub — download Elmapi3Cpanel.zip from the Releases page of the repository you were granted access to. Do not clone the private repository onto shared hosting for deployment; this ZIP is the supported package.

1. Prerequisites

  • Shared hosting with PHP and MySQL (or MariaDB), and access to upload files (FTP/SFTP or control panel file manager).
  • Your domain (or subdomain) pointing at the host.
  • The Elmapi3Cpanel.zip file.

2. Upload and extract files

Example (cPanel): the steps below mention File Manager and your home directory; on other panels, open the equivalent file tool and upload to your account root (not necessarily named /home/username).

  1. Log in to your hosting control panel and open the File Manager (cPanel) or your host’s equivalent.
  2. Navigate to your home directory (e.g., /home/your_username).
  3. Upload the Elmapi3Cpanel.zip file.
  4. Extract the archive. You should get two folders: Elmapi3 (the application) and public (web-facing files).

Upload and Extract Files

Upload and Extract Files

3. Move public files

  1. Open the extracted public folder.
  2. Move all of its contents into your site’s document root (often public_html on cPanel; may be httpdocs, www, or another name on other hosts).

Move Public Files

You can delete the empty public folder afterward.

Installing on a subdomain

Subdomains need extra path tweaks. Use the dedicated guide and then return here at Set up the database.

Handling alternative public directories

If your document root is not named public_html (for example httpdocs), adjust bootstrap/app.php so ElmapiCMS can resolve asset URLs.

  1. In your file manager, open the Elmapi3 application directory.
  2. Edit bootstrap/app.php.

Find this code:

if (is_dir($app->basePath('../public_html'))) {
    $app->usePublicPath($app->basePath('../public_html'));
}

Replace public_html with your real public folder name (both occurrences in the path), for example:

if (is_dir($app->basePath('../httpdocs'))) {
    $app->usePublicPath($app->basePath('../httpdocs'));
}

4. Set up the database

Example (cPanel): MySQL® Database Wizard. Elsewhere, use Plesk → Databases, DirectAdmin → MySQL Management, or your host’s database tool.

  1. Create a database (e.g., elmapicms).
  2. Create a user with a strong password.
  3. Grant that user all privileges on the database.
  4. Save the database name, username, and password.

5. Configure your environment

  1. In Elmapi3, open the .env file for editing.
  2. Set your site URL:
APP_URL=https://your-domain.com
  1. Set database credentials:
DB_DATABASE=elmapi3
DB_USERNAME=elmapi3_user
DB_PASSWORD=elmapi3_password
  1. Leave APP_KEY blank for now.

6. Generate app key and run migrations

If your host provides SSH or a Terminal (cPanel Terminal, Plesk SSH, etc.), use it from the Elmapi3 directory:

cd Elmapi3
php artisan key:generate
php artisan migrate --seed --force

Crucial: If you used the terminal, remove key_generator.php from your document root when you are done—it must not stay publicly reachable.

Method B: No shell access

If you cannot run Artisan, use the bundled helper and SQL import.

  1. Generate app key
    • key_generator.php should be in your document root next to index.php.
    • Visit https://your-domain.com/key_generator.php.
    • When you see success, key generation is complete.

Crucial: Delete key_generator.php from the document root afterward.

  1. Import database
    • The package includes elmapi3.sql.
    • In phpMyAdmin (or your host’s SQL tool), select your database → Import → upload elmapi3.sql.

7. Login

Seeding creates a default admin. Sign in with:

Email:

[email protected]

Password:

password

Change the email and password after first login.

8. Set up cron job for webhooks

Learn more about webhooks here. If you use the database queue driver (typical on shared hosting), you need a cron (or scheduled task) so queued webhook jobs run.

Example (cPanel): Cron Jobs. Adjust paths and PHP binary for your host (php, /usr/bin/php, or the path your provider documents).

  1. Add a job to run once per minute (* * * * *) with a command like (replace your_username and PHP path):
/usr/local/bin/php /home/your_username/Elmapi3/artisan queue:work --queue=webhooks --stop-when-empty >> /dev/null 2>&1

Cron Job

Next step

Search documentation

Find guides and reference pages