• Harvi

    (@harvi)


    Hi,
    I want to create subdomain in wordpress. I`ve got page ‘test’ in WP , i want to create subdomain test:

    – mypage.com/test —> test.mypage.com

    How can I do it? Is it possible in WordPress?

Viewing 3 replies - 1 through 3 (of 3 total)
  • citynode

    (@citynode)

    That looks like a DNS change, not a WordPress change.

    Set up your subdomain on/with/through/by your host, through whatever handles the DNS for your domain. Wherever that happens to be, (could be a different server entirely, or a directory outside or inside your original document root) you will install WordPress afresh, just make sure its a directory that has all the requirements for WordPress available.

    Common mistake: calling a directory under a domain a ‘subdomain’ … like https://mydomain/test/ It doesn’t seem like you’re making that mistake, so good, you have that terminology straight.

    WordPress can’t make people on the internet find a subdomain to any particular document root, but it can serve up pages from there, if you install it.

    wmrom

    (@wmrom)

    to display a ‘single page’ on a subdomain, I copied the index.php file and put it in the subdomain’s directory and changed

    require(‘./wp-blog-header.php’);

    to

    require(‘../wp-blog-header.php’);

    This only works if your subdomain is run out of a child directory of the one WP is installed in. To make it display the content of the page I wanted on it, I added

    $_GET[‘page_id’]=XXX; where XXX is the page_id number. This only works if your permalinks are set to the default of p=XXX, page_id=XXX, etc.

    wmrom

    (@wmrom)

    to display a ‘single page’ on a subdomain, I copied the index.php file and put it in the subdomain’s directory and changed

    require('./wp-blog-header.php');

    to

    require('../wp-blog-header.php');

    This only works if your subdomain is run out of a child directory of the one WP is installed in. To make it display the content of the page I wanted on it, I added

    $_GET['page_id']=XXX;

    where XXX is the page_id number. This only works if your permalinks are set to the default of p=XXX, page_id=XXX, etc.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Single page as subdomain’ is closed to new replies.