CodeIgniter integration with WordPress
Is CodeIgniter integration with WordPress possible? Yes, in most situations it is possible and not very complicated. However you need to keep in mind two things:
- use folder with CodeIgniter inside of WordPress system NOT WordPress inside CodeIgniter and keep the folder name different than WordPress page name, post name, tag or category name
- avoid CodeIgniter controllers names the same like WordPress categories, tags or pages.
It means, that you can keep your CodeIgniter system at, for instance, http://example.com/interesting-pages/archive_listing where example.com is your main folder for WordPress, interesting-pages is folder name and archive_listing is CodeIgniter controller name. It most probably will work as long as folder interesting-pages is not any page name, post name, tag, category name of your WordPress installation. In such situation, we have WordPress installed in http://example.com and CodeIgniter installed in interesting-pages and in most situations it will work without problems. If there are any collisions the would be due to some plugins incompatibility with such solution, but this is rather exception (but happens).
However, to do it in opposite way, that is to try WordPress installation inside CodeIgniter folder will produce, most probably, serious incompatibility issues. What you have inside CodeIgniter folder should be CodeIgniter controller and having WordPress installation folder as controller name will not work, because WordPress pages, posts, tags, category names should be – in this solution – CodeIgniter controller methods with separate view. And now we have problem – what will be the view: CodeIgniter view (PHP file) or WordPress? To cut it short – it will not work in most situations.
What is a good news is that you can easily integrate WordPress database with CodeIgniter system. It is very useful, if you require access to some CodeIgniter system zones via login and pair of username/password – you can use WordPress users details keeping in mind passwords encryption used by WordPress.