WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] WordPress in a subdomain (11 posts)

  1. thomastwosome
    Member
    Posted 8 years ago #

    I have a subdomain setup (blog.domainname.com) and want my WordPress blog to live there. I currently have it here: http://www.domainname.com/wordpress.

    Can someone point me to instructions on how to do this?

    Is this topic what I want? http://codex.wordpress.org/Moving_WordPress

    Please and thank you!!!

  2. moshu
    Member
    Posted 8 years ago #

    Basically, yes - that page has all the info you need.
    Warning: if that subdomain isn't a "genuine" one (i.e. will redirect to yourdomain.com/blog) you will have a lot of troubles with the permalinks.

  3. TechGnome
    Moderator
    Posted 8 years ago #

    YEs, that's exactly the guide you need.
    Depending on your host, you may not even need to physically move it... just point the subdomain at that folder, then use PHPMyAdmin to change the values in the options table to reflect the new url....

    -tg

  4. thomastwosome
    Member
    Posted 8 years ago #

    Thank you - it worked!

  5. phflupp
    Member
    Posted 8 years ago #

    When you say:

    "Warning: if that subdomain isn't a "genuine" one (i.e. will redirect to yourdomain.com/blog) you will have a lot of troubles with the permalinks."

    ...can such an "artificial" subdomain be configured properly with permalinks, or is this not a recommended practice?

    If the latter, it would be great to add a notation to the Codex documentation (which I have been following carefully, but without success :-(

    I've encountered very wierd stuff with permalinks in this situation.

  6. moshu
    Member
    Posted 8 years ago #

    ...can such an "artificial" subdomain be configured properly with permalinks, or is this not a recommended practice?

    The only thing I can say for sure, based on the many cases when users were trying to make it work and ended up here in the forum, that WP "hates" any kind of redirects, domain ponting to another domain's subfolder and stuff like that.

    All the internal links (permalinks) work on the assumption that the index is where your URIs in the Options > GEneral point to, e.g.
    blog.example.com > so it will put together an address like
    blog.example.com/another-page
    Now if your real URI is
    example.com/blog that will confuse WP: it won't be able to build working links.

    I am not a coder, so I have no idea what the technical explanation is - but I have seen enough help requests for blogs in similar situation to dare to put up that warning above.

  7. pwkingston
    Member
    Posted 7 years ago #

    Exactly which values in the options table need changed?

  8. moshu
    Member
    Posted 7 years ago #

    The real ones! Where your WP install is.

  9. pwkingston
    Member
    Posted 7 years ago #

    I might be asking the wrong questions.

    I started with one wp install in the root of my public_html directory, and then I purchased another domain, and it is in a subdirectory in my public_html folder. I did another install of wp in the subdonain folder, and put it in the same database, with a unique prefix. When I try to login to the subdomain install, I get redirected to the original installs admin panel.

    Original install - http://www.thataintnormal.com
    Subdomain - http://www.thekingstons.name

  10. moshu
    Member
    Posted 7 years ago #

    I did another install of wp in the subdonain folder, and put it in the same database

    Having another (or more) domains hosted under the same account makes it to seem you are in a subfolder - but you are NOT!
    The reason you get redirected - because you put the wrong URI values in the admin > Options > General.
    Change them: http://www.tamba2.org.uk/wordpress/site-url/

  11. pwkingston
    Member
    Posted 7 years ago #

    That was it exactly! Thank you so much!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags