skip to Main Content

I am building a rest API using slim framework . everything works perfectly on my local machine .

Any one tell me the steps to how to deploy a slim rest API on shared hosting/cPanel/go-daddy

Where i put my URL

file name

index.php
.htaccess
dbconnect

2

Answers


    • Basically, you have to rename your public folder to public_html.

    • “…when you upload your files, your .htaccess and index.php files that were previously in your public folder will now go into the public_html folder.” (tflight answer)

    Answer based on: How to deploy slim on a shared host

    If doesn’t work please give us more details, how is your folder structure? what the logs file said? what do you mean with “where i put my URL?”

    Login or Signup to reply.
  1. Slim Framework 4

    For Slim version 4 the following line must be added in the index file inside the public folder, located in the root of the application.

    folder public/index.php

    add line:

    $app->setBasePath(‘/foldeHosting’);

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search