WordPress.org

Ready to get started?Download WordPress

Forums

Installation on Subdomain (6 posts)

  1. Matthew3man
    Member
    Posted 1 year ago #

    Hi all

    I've got WordPress running on a main domain but need a completely separate version running on a subdomain. I've installed it fine, that went as smooth as ever but when it comes to tried to get to /wp-admin/ it throws me to the main domain name's admin login. Any ideas here? My initial thoughts were a wildcard redirect catching it but that seems a bit backward. Does WordPress naturally know it's environment in terms of directory hierarchy or does it automatically assume it's in the root directory?

    Thanks in advance

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    Does WordPress naturally know it's environment in terms of directory hierarchy

    Yes. I'd check your root folder's .htaccess file.

  3. amvdsande
    Member
    Posted 1 year ago #

    I've got the same issue. What do we have to change in the htaccess file?

  4. Matthew3man
    Member
    Posted 1 year ago #

    I just added this to wp-config.php

    define('WP_HOME','http://subdomain.domain.co.uk');
    define('WP_SITEURL','http://subdomain.domain.co.uk');

  5. amvdsande
    Member
    Posted 1 year ago #

    Thanks matthew3man, but it doesn't work for me!

  6. esmi
    Forum Moderator
    Posted 1 year ago #

    @amvdsande: As per the Forum Welcome, please post your own topic. Posting in an existing topic prevents us from being able to track issues by topic. Added to which, your problem - despite any similarity in symptoms - is likely to be completely different.

Topic Closed

This topic has been closed to new replies.

About this Topic