Post by kelemvor » Sun Sep 10, 2017 10:48 am

Howdy,

I have a website that is a Wordpress blog. Let's called it www.mywebsite.com. I want to install Opencart in a subdomain so it'd be something like store1.mywebsite.com. I will eventually want to add a couple other stores on different subdomains for different things like store2.mywebsite.com, store3.mywebsite.com, etc.

Can anyone direct me how I go about starting to get this setup? My site is hosted on cPanel so I can create a subdomain but I don't know if it matters how/where I create the first subdomain and then where I create the second and third ones after that.

Thanks

Active Member

Posts

Joined
Fri Oct 12, 2012 6:58 am

Post by MrPhil » Mon Sep 11, 2017 1:53 am

You have no choice in where the "store" subdomain will be created. It will be in ..public_html/store/.

A bigger concern is that with WordPress in the root (..public_html/), all your traffic to your store will first pass through WordPress's .htaccess file, which may mess up URIs (especially SEF URIs) for your store. This is why I always recommend putting a major subsystem such as WP or OC in its own directory under the root (..public_html/blog/ and ..public_html/store/) and using a landing page to send visitors to the appropriate place. Initially, while there is only the WP blog, you could automatically rewrite incoming visitors via /.htaccess from / to /blog, and add the landing page later. The blog and the store will have their own .htaccess files in /blog/.htaccess and /store/.htaccess, and they won't interfere with each other.

Depending on how long established your blog is, and what kind of disruption there would be from moving it, you should at least consider moving it from / to /blog, with (temporarily) an .htaccess rewrite to send visitors from / to /blog. The search engines should get updated fairly soon, but you may be dealing with visitor bookmarked links for quite a while to come.

Note that there are no subdomains involved here, just top level directories.

Active Member

Posts

Joined
Wed May 10, 2017 11:52 pm
Who is online

Users browsing this forum: No registered users and 25 guests