Subdomains and website database

I've got an eCommerce site that I plan on adding a blog and a photo gallery to on the same VPS. Same domain.

So the store would be mysite.com and blog would be blog.mysite.com and gallery would be gallery.mysite.com.

In a case like this is it best to use the same database for all three? And just use prefixes like bl_ and ga_ for the blog and gallery database tables? The database for the store currently does not use prefixes.

Any reason to use/not use subdomains?

Advice, tips, suggestions appreciated.

Comments

  • I would definitely use diferrent databases for all three. Better practice, easier to manage and backup.

  • JabJab
    edited December 2022

    You seems clueless (c) MaxKVM (?) so fuck no.

    You don't want to wake up one day to see that all payments via your website went to different account or someone generated -99% coupon and you sold everything for 0.01$... because you forgot you had a blog/gallery on the same server, account, database and you did not apply any security patches for last 6 months and someone simply gained access to yours eCommerce because same user/database etc.

    Subdomains are fine, but isolate the important eCommerce part from the rest.

    Thanked by (2)AuroraZero JDMcPea

    Haven't bought a single service in VirMach Great Ryzen 2022 - 2023 Flash Sale.
    https://lowendspirit.com/uploads/editor/gi/ippw0lcmqowk.png

  • Personally so the subs on a different server if possible. That is just my two cents.

    Thanked by (2)bikegremlin JDMcPea

    "I would have gotten away with it too, if it wasn't for that meddling Frankz and Mason!!"

  • Good advice. After more research the best way seems to be putting the subdomains for less important blog and gallery on a separate low-end VPS and keeping the the shopping cart site on it's own "premium" VPS where it's been for the past 8 years or so

    For some reason in the back of my mind thought for SSL certificate the domain and subdomain had to be on the same server, which is obviously not the case.

    Guess I am was clueless :#

Sign In or Register to comment.