CodeIgniter Forums
How to integrate wordpress with codeigniter - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: How to integrate wordpress with codeigniter (/showthread.php?tid=52419)



How to integrate wordpress with codeigniter - El Forum - 06-10-2012

[eluser]ExpediteWebsys[/eluser]
Hello All,

I have a website built in Codeigniter 2.1.0 (modular structure) and have created a theme for wordpress. Now I want to integrate wordpress with my website created in CI.

I want to access the wordpress blog using the following link:

Code:
http://www.mywebsite.com/blogs

Request all the members to throw some light on this issue. I am pretty sure there must be a way to achieve it.

Thanks,
ExpediteWebsys Team


How to integrate wordpress with codeigniter - El Forum - 06-10-2012

[eluser]Rok Biderman[/eluser]
Could you specify a bit more what you mean by "integrate"? If you only want them to work side by side, just put Wp in blogs folder. This actually saves you quite a lot of headache.

Otherwise, there are two ways I've ever done this, one of them was to write a plugin in Codeigniter. That one probably isn't interesting for you. The other was including WP header files and working with WP login integrating a CI components into admin panel. The only problem with this was that both CI and WP define site_url and that it mustn't be the same. There are quite a few ways to solve this, either by not using site_url or by extending url helper. There are actually plenty of resources on how to do it. I suggest you start with official codex guide, then you'll have an easier time making sense from posts on the forums such as this, this or maybe try the XML-RPC approach if it would better suit you.


How to integrate wordpress with codeigniter - El Forum - 06-10-2012

[eluser]ExpediteWebsys[/eluser]
Thanks a lot. I created a folder name "blog" in the root folder and uploaded the WP folder in it. It worked as expected.

Thanks Smile