Join the community today
Become a Member

install domain.com shop and domain.com/blog Wordpress on same domain

Discussion in 'System Administration' started by adamus007p, Feb 5, 2022.

  1. adamus007p

    adamus007p Member

    368
    18
    18
    Feb 8, 2019
    Ratings:
    +35
    Local Time:
    1:23 PM
    Hello,

    I would like to ask you for help.

    Let's assume I have a one domain: domain.com


    I want to install there:
    on domain.com - ecommerce
    on domain.com/blog - Wordress (option 22)

    How to do it? What is should be done first?

    Is is possible? How to do that?

    @eva2000 may you advise or any other more experienced user then me?
    Thank you in advance.
     
  2. eva2000

    eva2000 Administrator Staff Member

    54,564
    12,224
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,793
    Local Time:
    10:23 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Install Wordpress first via centmin.sh menu option 22 and when prompted if it's subdirectory install make sure to use /blog and then manually install the shop in the existing Nginx vhost though you may need some changes for php.conf include paths for the shop depending of how you install/what shop app it is.

    Or the cleaner method is 2 Nginx vhosts one for domain.com and one for subdomain blog.domain.com
     
  3. adamus007p

    adamus007p Member

    368
    18
    18
    Feb 8, 2019
    Ratings:
    +35
    Local Time:
    1:23 PM
    @eva2000 Thank you for your answer.

    Ok, but I do not want to use blog.domain.com but domain.com/blog and host there Wordpress blog. It would be the easiest way, but due to SEO I need to have domain.com/blog and domain.com.

    The question is if the config for Wordpress (domain.com/blog) will be overwritten by domain.com?
     
  4. eva2000

    eva2000 Administrator Staff Member

    54,564
    12,224
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,793
    Local Time:
    10:23 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    No because you install Wordpress first that is the config first. Then you would need to manually install domain.com shop's nginx config/rewrites in the same vhost and you'd be responsible for ensuring both work together and that you do not yourself mess with Wordpress's existing config.

    I suggest if unsure, you can always do a test dummy domain setup of what you want on a test VPS and make sure it all works before doing it on real live site/domain/server.
     
  5. adamus007p

    adamus007p Member

    368
    18
    18
    Feb 8, 2019
    Ratings:
    +35
    Local Time:
    1:23 PM
    I am playing with the test domian.


    @eva2000 how to do this?

    When I use option 2 add ninx vhost domain there is message:

    Code (Text):
    vhost for domain.com already exists
    /home/nginx/domains/domain.com already exists
    if you need to delete the domain read the guide at:
    centminmod.com/nginx_domain_dns_setup.html#deletevhost
    
     
    Last edited: Feb 5, 2022