CodeIgniter Forums
docs: Deployment to Shared Hosting Services - 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: docs: Deployment to Shared Hosting Services (/showthread.php?tid=90202)



docs: Deployment to Shared Hosting Services - kenjis - 02-21-2024

The following section has been added in the in-progress User Guide.

https://codeigniter4.github.io/CodeIgniter4/installation/running.html#deployment-to-shared-hosting-services

Any comments, or Pull Requests to improve it are welcome.


RE: docs: Deployment to Shared Hosting Services - ramonpuig - 03-20-2024

(02-21-2024, 06:01 PM)kenjis Wrote: The following section has been added in the in-progress User Guide.

https://codeigniter4.github.io/CodeIgniter4/installation/running.html#deployment-to-shared-hosting-services

Any comments, or Pull Requests to improve it are welcome.

The instructions on this thread are still valid with 4.4.6? I dont see
PHP Code:
$pathsPath FCPATH '../example.com/app/Config/Paths.php'
anywhere in public/index.php


RE: docs: Deployment to Shared Hosting Services - kenjis - 03-20-2024

https://github.com/codeigniter4/CodeIgniter4/blob/813058769ac521625ec2cfd0212dc3f04d4e296d/public/index.php#L34

It seems it changed in v4.2.0:
https://github.com/codeigniter4/CodeIgniter4/commit/a2a9b6c11886735d2fd1ca5798a0ad6a43582b59


RE: docs: Deployment to Shared Hosting Services - InsiteFX - 03-20-2024

@kenjis,

Just a note on this, I change the public to public_html in my development system while coding,
If you do this you also need to edit the spark file and change public to public_html or spark will not work.


RE: docs: Deployment to Shared Hosting Services - kenjis - 03-21-2024

@InsiteFX Why?

If you change the location of "app" folder, you need to edit the spark file.

PHP Code:
// Load our paths config file
// This is the line that might need to be changed, depending on your folder structure.
require FCPATH '../app/Config/Paths.php';
// ^^^ Change this line if you move your application folder 

But there is no "public" in the spark file.
https://github.com/codeigniter4/CodeIgniter4/blob/develop/spark


RE: docs: Deployment to Shared Hosting Services - InsiteFX - 03-22-2024

spark file.
If I change public to public_html spark will not work, this is the only change I make is to public.
-----------------------------------------------------------------------------|
PHP Code:
// Path to the front controller
define('FCPATH'__DIR__ DIRECTORY_SEPARATOR 'public' DIRECTORY_SEPARATOR); 



RE: docs: Deployment to Shared Hosting Services - kenjis - 03-22-2024

Oh, I overlooked the line! Yes, there is "public".
https://github.com/codeigniter4/CodeIgniter4/blob/da4861c2492f0ff6945d3e375ad1d2f60115adef/spark#L53