WordPress.org

Ready to get started?Download WordPress

Forums

Help With Configuring A Sub-Domain Install (9 posts)

  1. mark2
    Member
    Posted 1 year ago #

    Hi All,

    I know this isn't an overly complicated issue, but can't seem to figure it out myself... any help in the right direction would be appreciated.

    I'm having trouble with installing wordpress to a subdomain. I have a WordPress install on http://www.example.com & I'm installing a separate instance of WordPress on sub.example.com. I've successfully configured the database, uploaded the files & pointed the subdomain to the correct directory on my server.

    After I've installed wordpress on my subdomain, I'm redirected from sub.example.com to http://www.example.com/sub. I've changed the settings in WordPress to for the site address URL to be sub.example.com, but all pages continue to direct to http://www.example.com/sub/page etc.

    I imagine there is something I need to manually change in the HTCaccess file... not just exactly sure what I need to change & what instance of the HTC access file (eg. the one on the main site http://www.example.com or the one for sub.example.com)

    Hope someone can help me out, thanks!

  2. govpatel
    Member
    Posted 1 year ago #

    Have you tried to reset your permalinks

  3. mark2
    Member
    Posted 1 year ago #

    Ahhhh... failed to do that.

    Ok, I've now reset the permalinks, but now all the links are broken... When going to the site on the subdomain, sub.example.com I'm redirected to http://www.example.com/sub with all the links pointing to sub.example.com but they are broken... Anything I could be missing here?

  4. mark2
    Member
    Posted 1 year ago #

    Update # 2

    I've fixed the broken permalinks issue... however, all urls are still going to http://www.example.com/sub/pageexample when it should be sub.example.com/pageexample

    My URL settings in wordpress are:

    WordPress Address (URL): http://www.example.com/sub (where the file are located on the server)
    Sute Address (URL): http://sub.example.com (what I want the display URL for the site to be)

    Anything I could be missing...?

  5. govpatel
    Member
    Posted 1 year ago #

    They should be same unless you using from directory.

    Is this fresh install or did you use wordpress to add content with http://www.example.com/sub if so then you will change urls in database by using a Search and Replace plugin.

  6. mark2
    Member
    Posted 1 year ago #

    This is a fresh install.

  7. govpatel
    Member
    Posted 1 year ago #

    Then The urls in Settings>>>General should be same

  8. mark2
    Member
    Posted 1 year ago #

    But the location of where the wordpress files are located on my server & the actual URL address are different, so that's why I have 2 different urls in the settings

  9. govpatel
    Member
    Posted 1 year ago #

    If you want to use wordpress from subdomain name then they should be same only time have different is when you want to use wordpress from directory.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags