WordPress.org

Ready to get started?Download WordPress

Forums

Codeigniter + WordPress (7 posts)

  1. erdemcam
    Member
    Posted 4 years ago #

    Hi there,

    I'm new in wordpress and also in codeigniter. For my work i have to use codeigneter framework with wordpress.

    I don't know how i can integrate or install codeigniter with wordpress.

    Does anyone use codeigniter with wordpress?

    Please help!

  2. flamenco
    Member
    Posted 4 years ago #

    I could be wrong, but I don't see how those would go together easily, if at all. Codeigniter is a development framework for building applications. WordPress is a system that's already built.

    I think you could build a large application like WordPress with Codeigniter. But it would then rely on Codeigniter's libraries and framework, so to make that happen I think you would have to rebuild WordPress from scratch. Unless Codeigniter can be used as more of a PHP editing framework as well?

    Maybe a Codeigniter guru will weigh in.

  3. krisjay
    Member
    Posted 3 years ago #

    @erdemcam

    You can Intergrate WordPress with CodeIgniter, but it really Depends on what your ultimate application is going to be. But since WordPress and CodeIgniter's file struture is different, you can drop in a codeigniter setup.

    The easy way would be like this:

    a.) Get Your WordPress Install and Database Working.
    b.) Drop in your CodeIgniter Setup, and get the Database Working.
    c.) Open the 'index.php' file of the WordPress Core.
    d.) Replace it with the CodeIgniter 'index.php' file, but add the following to the bottom of the file right before the codeigniter require:

    /** Loads the WordPress Environment and Template */
    require('./wp-blog-header.php');

    That will give you a CodeIgniter FrontEnd, with a WordPress BackEnd (administration). You can then go about customizing the CodeIgniter Templates to Interact with The WordPress Setup (posts, pages, etc).

    Hope that helped!

  4. jfranzone
    Member
    Posted 3 years ago #

    That seems a bit silly. Why would you go through the trouble of installing WordPress and then... not use it.

    Perhaps what erdemcam really wants is to build a website using CodeIgniter and then use WordPress for the blogging portion of the site? In this case I think you'd just be looking at installing WordPress to a /blog subdirectory and then telling CodeIgniter to ignore that path.

  5. jorisw
    Member
    Posted 3 years ago #

    I came accross this thread thinking of CodeIgniter with WordPress on top.

    For those wondering what the use would be, personally I think that as much as WordPress rocks as a platform, the underlying core of WordPress sucks in terms of design pattern. And CodeIgniter I think has a great design pattern, which is MVC with some nicely separated libraries and helpers.

    So to me, working out how to convert the WordPress core into a CodeIgniter application could be very interesting, albeit pretty time consuming. The WordPress CMS, The Loop and everything would still be there, just sitting on top of a proper MVC framework. WordPress 4 anyone?

  6. pianoguy91
    Member
    Posted 3 years ago #

    @jorisw If I am understanding what you are saying, I completely agree that WordPress would be absolutely fantastic to use together with CodeIgniter. I came across this article just before I found this thread.

    What this will allow you to do is use all of the WordPress functions and queries you would usually use in a WP installation, but have the flexibility and power of the MVC pattern. This would be absolutely fantastic in a simple website that utilizes the power of both.

  7. jorisw
    Member
    Posted 3 years ago #

    Interesting, will dive into it, thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic