Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

BilboBago's avatar

Lumen app on a shared hosting public_html subfolder

I want to run Lumen on shared hosting public_html subfolder

By now this is my folder structure:

    user@lin49 [~]#
    .bash_history
    .bash_logout
    .bash_profile
    .bashrc
    .cagefs/
    .cl.selector/
    .composer/
    .contactemail
    .cpanel/
    .gemrc
    .htpasswds/
    .lastlogin
    .lesshst
    .ssh/
    .trash/
    access-logs -> /usr/local/apache/domlogs/user/
    bin/
    cpbackup-exclude.conf
    error_log
    etc/
    lumen/
    mail/
    perl5/
    public_ftp/
    public_html/
    ssl/
    tmp/
    www -> public_html/

I guess i need to install lumen application inside my account directory user@lin49 [~]# and then point public folder of lumen to public_html/app_name

Am i right? Can some one explain me this?

0 likes
2 replies
jlrdw's avatar

If you search this forum for deploy there's a lot of tips.

MarkLL's avatar

Hi @BilboBago, Actually Lumen is easier that to use than the full Laravel package on shared hosting because it does not rely on, or have, a public_path function.

All you need to do is edit the index.php file that you move from lumen/public to public_html and change one line.

$app = require __DIR__.'/../bootstrap/app.php';

becomes

$app = require __DIR__.'/../lumen/bootstrap/app.php';
2 likes

Please or to participate in this conversation.