Learn about Centmin Mod LEMP Stack today
Become a Member

Wordpress domain directory weird problem

Discussion in 'Blogs & CMS usage' started by hitman, Mar 24, 2017.

  1. hitman

    hitman Member

    115
    9
    18
    Jul 18, 2014
    Ratings:
    +13
    Local Time:
    6:11 PM
    hello
    i had a site created with option 22 (wordpress), lets call it domain1.com.
    Later i changed the domain name of the site to domain2.com with wp-cli tool.
    Now i moved this site to another server and i noticed that althgouth in the path

    /home/nginx/domains
    the domain domain1.com should not exist, it gets created with contents
    public/wp-content/uploads/sucuri
    [​IMG]

    any idea why this happens?

     
  2. eva2000

    eva2000 Administrator Staff Member

    30,186
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    1:11 AM
    Nginx 1.13.x
    MariaDB 5.5
    What's output for these commands changing /home/nginx/domains/domain.com/public/ to the path to where you installed wordpress i.e. if domain.com/blog then it would be /home/nginx/domains/domain.com/public/blog
    Code (Text):
    cd /home/nginx/domains/domain.com/public/
    wp option get siteurl --allow-root
    wp option get home --allow-root
    

    see an example of switching subdirectories/url for wordpress at https://community.centminmod.com/th...how-to-switch-wordpress-to-subdirectory.5603/
     
  3. hitman

    hitman Member

    115
    9
    18
    Jul 18, 2014
    Ratings:
    +13
    Local Time:
    6:11 PM
    the output in both the commands is the same
    domain2.com in this case, which is the proper site
    Please note that the site works flawlessly. The only weird thing is the presence of the old domain in a completely new server. Does centmin option 22 has something regarding sucuri that could interfere?
     
  4. eva2000

    eva2000 Administrator Staff Member

    30,186
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    1:11 AM
    Nginx 1.13.x
    MariaDB 5.5
    When you create a new nginx vhost domain via centmin.sh menu option 2 or menu option 22 or via /usr/bin/nv cli command line, you will create the Nginx vhost files and directories. You will get an outputted the path location where it will create the domain name's vhost conf file named newdomain.com.conf (and newdomain.com.ssl.conf if you selected yes to self signed SSL)
    • Nginx vhost conf path will be at /usr/local/nginx/conf/conf.d/newdomain.com.conf
    • Nginx HTTP/2 SSL vhost conf path will be at /usr/local/nginx/conf/conf.d/newdomain.com.ssl.conf
    • Nginx Self-Signed SSL Certificate Directory at /usr/local/nginx/conf/ssl/newdomain.com
    • Vhost public web root will be at /home/nginx/domains/newdomain.com/public
    • Vhost log directory will be at /home/nginx/domains/newdomain.com/log
    So your nginx vhosts config files are at /usr/local/nginx/conf/conf.d/newdomain.com.conf and if applicable /usr/local/nginx/conf/conf.d/newdomain.com.ssl.conf. If you changed newdomain.com to newdomain2.com, you would of needed to change all references of newdomain.com to newdomain2.com in both nginx vhost files as well as change directory names /home/nginx/domains/newdomain.com to /home/nginx/domains/newdomain2.com. Other if you didn't do the last part for directory names, it will still work for accessing newdomain2.com as long as nginx vhost file server_names were changed.