I really hope someone can help with this as I have been researching this for a good few hours now and still I have been unable to find a solution.

Essentially, I am need to install OpenCart in a Wordpress subfolder so that we have the Wordpress site as the primary website and Opencart as a secondary ecommerce solution. I realise Woocommerce is available for Wordpress but there are specific reasons why we must use Opencart due to this application. So the challenge is to get them to work together.

/home/sites/wordpress/ - this is the Wordpress installation /home/sites/wordpress/store - this is the Opencart installation

If you visit the site on www.thisdomain.com the site appears If you visit the store on www.thisdomain.com/store the store appears If you try to visit a category on www.thisdomain.com/store/widgets Wordpress interferes and says that it can't find the page - but ordinarily it would display the opencart category using the SEO urls that are configured.

It's an .htaccess issue with Wordpress interpreting that the actual path does not exist and as it is unable to identify a permalink within its own database will display the page not found message.

What I need .htaccess to do completely ignore the /store/ path and any URLs in which /store/ has been used. I've made a start with this as you will see from the line containing store|store when searching for the subject of 'ignore paths in wordpress', but it doesn't work with any of the SEO urls in Opencart.

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_URI} !^/(store|store/.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

I am sure this must be simple. Can anyone advise what can be done to ignore all /store/ paths?

Alternatively, perhaps the other way is to somehow merge the .htaccess files so that the installation is aware of both Wordpress and Opencart? Someone must have got this to work, somewhere, sometime?

I really appreciate any help.



1 Answer 1


Typical, hours of searching, post the question, think about it, change my search query slightly and I have found my problem.

It is important to ensure that Opencart understands where its base installation is in the .htaccess file.

For Wordpress it will be:

RewriteBase /

For Opencart it will be:

RewriteBase /store/

And that's it, Opencart will now look in the correct folder for its SEO URLs and each application works independently based on what path you're using.

I hope this helps someone.


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.