Viewing 10 replies - 1 through 10 (of 10 total)
  • 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.

    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

    Thread Starter thomastwosome

    (@thomastwosome)

    Thank you – it worked!

    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.

    …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.

    Exactly which values in the options table need changed?

    The real ones! Where your WP install is.

    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 – https://www.thataintnormal.com
    Subdomain – https://www.thekingstons.name

    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: https://www.tamba2.org.uk/wordpress/site-url/

    That was it exactly! Thank you so much!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘WordPress in a subdomain’ is closed to new replies.