Sub-site and nginx directives

Discussion in 'General' started by Antonio Sanguigni, Jan 4, 2021.

  1. Antonio Sanguigni

    Antonio Sanguigni New Member

    Hello, I started to build a new website which will replace the first one. I created a subdirectory inside the first website and installed wordpress via packages. I have some trouble to put nginx directives. I cannot see this last new installation into ispconfig pages websites. I searched into nginx sites-available directory but there is only main site vconf file. Is there a chance to understand where to set these parameters ?
    Thank you
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Creating a new site in a subdirectory of an existing site is a really bad idea, create a new website instead.

    1) Remove the wp install you made in the original site.
    2) Create a new website, e.g. with domain new.yourdomain.tld
    3) Install wp into that new website and build the site.
    4) When you finished testing and setting up the new site, do this:
    - Rename the old site from domain.tld to old.domain.tld
    - Rename the new site from new.domain.tld to domain.tld
    - Login to wordpress nad change the URL in wp settings as well.
    Antonio Sanguigni and ahrasis like this.
  3. Antonio Sanguigni

    Antonio Sanguigni New Member

    Hello and thank you for your answer.
    1. May I remove it by installed packages trash icon ?
    2. So of course I have to create a subdomain for that website, dont' you ?
    3. ok
    4. How is it possible to do this rename ? Via shell ?
    Thank you
  4. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    1: Yes.
    2: There should be a DNS record for the address(es) you are going to use. But if it's only temporary, this is not needed, as long as you don't need to access the site while doing this.
    4: Rename it from the ISPConfig UI.
    Antonio Sanguigni likes this.
  5. Antonio Sanguigni

    Antonio Sanguigni New Member

    Just tested, it seems to work very well. I was not able to login into wordpress after the change, maybe for let's encrypt problem but I changed the siteurl via phpmyadmin and I solved it easily. For the first subdomain I created a CNAME record. After the switch I had to create a A record to point it.
    Thank you guys, I appreciated your help so much.
    Th0m likes this.

Share This Page