• I’m building a website which requires both Codeigniter and WordPress to work side-by-side. So far I’ve gotten them to play nicely together, but I finally ran into a brick wall.

    Codeigniter runs the website, except for the WordPress blog which runs from a subfolder, for example: https://mysite.com/wordpress/.

    To display a page using Codeigniter, I need to call WordPress functions such as get_header, get_sidebar, and get_footer. In order for these to work, I need to include wp-blog-header.php. However, as soon as wp-blog-header.php is called, the browser redirects me to the wp-admin/install.php page (which does not exist anymore).

    I don’t believe this is a configuration problem, because the WordPress blog pages run fine by themselves. I did a repair on the entire database with no change. I’m thinking that WordPress is noticing that the request URL does not belong to itself, so it sends a redirect header to the browser, but I’m not sure.

    Anyone have any ideas on why it’s redirecting? Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter darioism

    (@darioism)

    Shameless bump cause I need HELP! Anyone? Would be greatly appreciated. Thanks!

    I’ve just run into the same problem today! Haven’t figured anything out yet

    Sorted, check out the following post;

    https://codeigniter.com/forums/viewthread/126707/#635828

    Thread Starter darioism

    (@darioism)

    Thanks gevans. I think my issue here was that I was calling wp-blog-header later on in the CI code. When I moved wp-blog-header to the beginning of Codeigniter’s core index.php file, the problems went away. I was trying to avoid having to load WP’s functions for every page load of the site, but it looks like there’s no way around it. Hopefully this tidbit will be able to help someone else in the future.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Codeigniter and WordPress redirect to install.php’ is closed to new replies.