Welcome Guest, Not a member yet? Register   Sign In
Using Wordpress Admin with CodeIgniter Application

Hey guys,

I've tried doing some research on this topic, but I haven't found an exact solution that suits my needs yet.

Basically I'm building a website in CodeIgniter, but using WordPress for the site's blog. Now what I would like to do is find a way to use the WordPress admin for administration of my CodeIgniter application, as opposed to writing a custom administration system from scratch directly in CodeIgniter.

All the other posts on this subject that I could find talked about implementing WordPress directly into CodeIgniter, so that you can use WordPress functions in your CodeIgniter application. This doesn't help me, because in my case, I want to keep my CodeIgniter application independent. The only function I may wish to share between the two applications is the user authentication system, but that can be implemented later.

Any ideas on how I would go about doing this? My first thought is to create some sort of custom API in my CodeIgniter application, that I can access through a WordPress plugin. I'm not too sure how I would do that though, and how secure it would be. Nonetheless I'm open to all suggestions.


If WP stores the logged in status in the php session, try doing a print_r($_SESSION) in any CI controller and see if anything usable shows up. If it does, you could copy the necessary values to a CI session and use those values throughout your app.

I'm not sure what your directory structure is?

Might be completely wrong on this.

The user authentication integration is only something I may consider adding in the long run, not really interested in how to incorporate it at this point. What I'm really focused on is the administration integration.

How did you go with a solution for this?

@stef25 nothing is shown in the session (I think WP uses DB sessions by default).

I've tried a few different ways, but I just get the WP login screen which just loops and won't show the CI pages.

Please provide us the code Sad

i`am need it

Theme © iAndrew 2016 - Forum software by © MyBB