CI4 and wp in shared hosting |
(10-26-2020, 06:39 AM)ysarsilmaz Wrote: sure https://codeigniter.com/user_guide/intro...ments.htmlThis- Is not a replay , i would be know how can i do ...
(10-27-2020, 01:28 PM)pippuccio76 Wrote:(10-26-2020, 06:39 AM)ysarsilmaz Wrote: sure https://codeigniter.com/user_guide/intro...ments.htmlThis- Is not a replay , i would be know how can i do ... well if you do development on a local machine hopefully a linux one, and preferably Slackware then you have apache with a space at /var/www/htdocs to put say as a bare minimum index.html Then you start to get savy and want a a few projects but you only have one apache web server. So what you do is have sub-directories within /var/www/htdocs I have for instance directories wp, appstarter andrinaDesignStudio each directory is a web site in itself . To make it work i take advantage of a file called httpd-vhosts.conf at /etc/httpd/extra what i do is assign a slight different ip address such as 127.0.0.2 , 127.0.0.3 and in the file set up so that the info for wp (wordpress) is: <VirtualHost 127.0.0.8:80> ServerName wp.com ServerAlias www.wp.com DocumentRoot "/var/www/htdocs/wp" <Directory "/var/www/htdocs/wp"> Order allow,deny Allow from All AllowOverride All Require all granted </Directory> </VirtualHost> I do something similar for codeIgnitor except I make the document root bit end with/public Now i more or less have a similar setup on a live server. I pay for one hosting space but via cpanel I can have subdomains and add on domains. basically i can configure so that i can have several domains pointing to respective sub directories. I don't personally have any live Wordpress sites but if you had a live wordpress site in a sub domain and another sub domain using CI4 they would for all intents and purposes be separate entities.
sure, if you're using the shared hosting, and uploaded the wordpress on public_html folder, then you can create a sub folder in it for CI4.
But we need to modify the index.php file, you have to move it from public to outside and edit the location loader in the index.php file so that when you point the url to that folder it will automatically run the index.php
(10-29-2020, 01:52 AM)tmtuan Wrote: sure, if you're using the shared hosting, and uploaded the wordpress on public_html folder, then you can create a sub folder in it for CI4.with add on domain approach, which can be configured via cpanel, where each sub domain is a web app and for all intents and purposes separate you don't have to do anything except edit where root is for each sub domain. For Wp that would be the sub domain itself, whereas for CI4 the root would be public directory . Thats exacly my live set up (10-29-2020, 02:37 AM)captain-sensible Wrote:(10-29-2020, 01:52 AM)tmtuan Wrote: sure, if you're using the shared hosting, and uploaded the wordpress on public_html folder, then you can create a sub folder in it for CI4.with add on domain approach, which can be configured via cpanel, where each sub domain is a web app and for all intents and purposes separate you don't have to do anything except edit where root is for each sub domain. For Wp that would be the sub domain itself, whereas for CI4 the root would be public directory . yeah, if on the hosting CP had the way to edit, it's beter to config in the cpanel but i have some client that their hosting does not provide this function, so i have to modify it for the case |
Welcome Guest, Not a member yet? Register Sign In |