We are running magento on our site www.xsmoke.com. The site is international, so we are using "/country code" - e.g.www.xsmoke.com/de/ etc.

Now we would like to install wordpress in one of the languages only and we want the URL to be "xsmoke.com/de/blog".

But i can't create a folder on that location for the wordpress files because of magento.. Does anyone have an idea for a workaround?

  • Please accept the answer if it helped you solving your problem. This way the question will no longer be counted as "unanswered" (magento.SE needs a higher rate of answered questions to go out of beta eventually) Feb 14, 2015 at 21:20
  • I would highly discourage to run Magento and WordPress on the same domain. WordPress has known many security issues and this will pose a risk to your Magento webshop too. I always keep every application on it's own (sub) domain.
    – 7ochem
    Jun 6, 2015 at 9:50
  • @7ochem Is the above comment (of keeping wordpress on a separate domain due to security issues) still valid and required even if create a separate folder outside of magento root and install wordpress in there as fschmengler suggested below ?
    – Vinu D
    Jun 25, 2016 at 19:04
  • 1
    @VinuD, this is still the case. WordPress (plugins) security is very low and once they have hacked your WordPress, they could probably also hack Magento. Any software package can have security issues, so it is always good practice to keep them all on separate servers.
    – 7ochem
    Jun 27, 2016 at 9:20
  • @70chem thanks a lot. We are a small site with magento and server root in the same folder. We prefer the subfolder structure but are not able to figure out how to create a subfolder structure on with a separate server i.e. we want our blog to look as www.oursite.com/blog in-spite of blog being on a separate server. Any tips or resource links. Cheers.
    – Vinu D
    Jun 27, 2016 at 10:10

3 Answers 3


Install Wordpress in a different location, ideally outside of the Magento root and add this rule to the .htaccess file of Magento:

RewriteRule ^/de/blog/(.*) /path/to/wordpress/$1 [QSA]

This way the server redirects requests like /de/blog/anything internally to /path/to/wordpress/anything (Note that the former is a URL, the latter a path on the server)

[QSA] makes sure that any query string like ?page=123 gets appended as well.

  • @fscgmengler this is such a fantastic comment, pity it is not marked as answer. I just have one question, 7ochem sort of confused me by saying that we need to create a separate domain due to security issues. Would we face security issues (due to word press plugins) using this separate folder root outside of magento root ?
    – Vinu D
    Jun 25, 2016 at 19:08
  • 1
    With my proposed solution, Magento and Wordpress will have to run under the same user, which indeed makes Magento only as secure as your Wordpress installation. Note that using different domains doesn't make it more secure per se, you also have to configure them to use different users and groups. Jun 27, 2016 at 6:26
  • @fscgmengler from a security point of view, what would be a good solution. Are the two equally vulnerable i.e. 1.Put word press inside magento 2. Put word press in parallel to magento. Sorry, we are security noobs and could use any architecture help. Thanks
    – Vinu D
    Jun 27, 2016 at 6:36
  • What about Nginx?
    – camdixon
    Oct 10, 2016 at 16:19

This solution worked for me. Now i can access wordpress blog in the magento subdirectory.. Put this code in the wordpress .htaccess file.

# BEGIN WordPress
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]
# END WordPress

All of these answers are incorrect. Using the FishPig_WordPress module, you can easily and securely integrate WordPress into Magento.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.