CodeIgniter Forums
Running CI4 on web server - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=31)
+--- Thread: Running CI4 on web server (/showthread.php?tid=75382)



Running CI4 on web server - dev-guidolin - 01-31-2020

I searched a lot here on the forum but I didn't find any topic that talked about it.

In CI3 it was enough to upload the files to the root folder of the hosting, but now I can't run the system.

There is some way to run CI4 on regular hosting.

I can't change apache's "httpd-vhost.conf" to redirect the domain to the "public" folder.


RE: Running CI4 on web server - dev-guidolin - 01-31-2020

(01-31-2020, 06:47 AM)dev-guidolin Wrote: I searched a lot here on the forum but I didn't find any topic that talked about it.

In CI3 it was enough to upload the files to the root folder of the hosting, but now I can't run the system.

There is some way to run CI4 on regular hosting.

I can't change apache's "httpd-vhost.conf" to redirect the domain to the "public" folder.


I already found the solution, it is as simple as it should be.

in most hostings, your root folder is named "public_html".

Then you must upload all CI4 files, except the "public" folder, to a directory before the root folder of your hosting (eg public_html).

So, all your files on your CI4 that are inside the "public" folder, must be inside the root folder of your hosting (eg public_html - in the case of Hostinger).

Another detail, look at your ROUTE file, once you are on a Linux server, remember that it is case sensitive, so all uppercase and lowercase letters make a difference to your controllers and methods. Wink


RE: Running CI4 on web server - InsiteFX - 01-31-2020

On my server it's public_html all I have to do is upload CI 4 and change public to
public_html and it runs just fine.

See this Topic also:

Change CI 4 public folder