How to Set Codeigniter4 root directory to public folder?

I deployed Codeigiter4 on 000webhosting, but as it mentions there “You need to set your “document root” to the public folder inside your project.” mean my root folder should be public folder inside my code instead of public_html provided by server.
My Question is how to set this root folder?

1 Like

Open the application/Config/App.php file with a text editor and set your base URL.

Maybe?

1 Like

Hi, did you find the solution yet? I’m looking for the same.

Hello. It’s the answer above :slight_smile: