Install a WordPress blog in CakePHP

If you’re using CakePHP, you may want to install WordPress for your blog.

CakePHP rewrites and serves public files out of app/webroot/

So let’s assume that your domain is and you want your blog to be then you’ll create a /blog/ folder inside app/webroot/ so you have app/webroot/blog/

Then go ahead and install WordPress files into the app/webroot/blog/ folder and inside that folder edit the existing .htaccess file or create a .htaccess file and put the following rewrite rules into it:

And that’s it, you’re set to go. There really isn’t anything tricky about it. You just need the correct rewrite base as shown above.



  1. Nice! That’s the exact info I’m looking for.
    And it works! 😉

  2. I did this and it keeps adding webroot to the url,

    so /blog redirects to webroot/blog

    any idea how to fix this ?

Leave a Reply to Antonio Cancel reply

Your email address will not be published.


© 2021 Contrid

Theme by Anders NorénUp ↑

Pin It on Pinterest

%d bloggers like this: