toggle menu

My project's requirement is to integrate codeigniter and wordpress. Codeigniter files are in root directory of wordpress. Everything is working fine in wordpress but when i access the codeigniter pages it redirect me on wordpress's page not found page. My site is running on LEMP server. i searched regarding it on google , there were some solutions so i tried them but nothing worked in my case. Please help. I thank you in advance.

  • 1 like
  • 1 comment

Dhananjay Kumar26 May at 11:05

I was getting the same issues with LEMP server cause there, not .htaccess file working.
Due to this reason Codeigniter files path "https://abc.com/xyz/" is followed WordPress URL.
I have done the following below script in /etc/nginx/sites-enabled/default file:

location /xyz {
try_files $uri $uri/ /xyz/index.php?$args;
}
location /test {
try_files $uri $uri/ /test/index.php?$args;
}

Added above multiple "location" path which using in CodeIgniter. And its working fine for me.
Please once try above, hope you getting the solution.

How to set cronjob on nginx server degitalocean?

Dhananjay Kumar |10 Apr at 05:04

I have setup cronjob on nginx server using below command :
$ crontab -e

and adding below script :
00 10 * * * /usr/bin/php /var/www/project_domain.com/index.php xyz_controller cronmethod

Above for the codeigniter function to run.

Not working any suggest.

  • 3 likes
  • 0 comment

I want to call codeigniter developed function inside the WordPress template page, suggest me about this its possible or not? 

  • 0 like
  • 0 comment