WordPress inside Codeigniter
WordPress is great CMS but it has it’s limitations and it is not suitable for doing complex stuff, especially if you want your database to be clean. Wordpress is blogging platform, so it isn’t meant for big systems and I guess developers should keep this in mind when using it.
On the other hand Codeigniter is one of the best if not the best PHP framework out there, and it’s good pick for development of big systems. It is based on MVC pattern and even has HMVC support so if you know what you’re doing you basically have no limitations.
You don’t want to create new news system when perfect one is already available. So you can use WordPress as plugin for Codeigniter project and cut your development time.
So how to do this:
- Put new Codeigniter installation in the root of WordPress installation (or vice versa).
- Go to index.php of your Codeigniter.
- Put following line of code at the beginning of index.php
require_once '../wp-load.php'; //change wp-load.php location according to your setup
Now you can call any WordPress function or WordPress plugin function from inside of Codeigniter.