WordPress.org

Ready to get started?Download WordPress

Forums

How to change sub-domain to main domain (6 posts)

  1. charslan
    Member
    Posted 1 year ago #

    I installed WordPress on sub domain and when it prepared now I want move it to main domain.

    Both domains folders are on root(on same level) i.e

    /www/www/ for example.com (an html site running)
    /www/test/ for test.example.com (WP site running)

    I need when someone visit example.com it redirects WordPress site not HTML site.

    How it will happen?

  2. Ted Rubin
    Member
    Posted 1 year ago #

    Excellent Question!

    I ran into this problem when I started using WordPress a few years ago.

    What you want to do is you would need to change the Blog address of the server.

    Attached is the WordPress Codex regarding this

    What you would do is change the Blog and Web Address in your General Settings.

    This will allow WordPress to look for your install in another directory or server.

    Then what you would want to do is change the Index.php file in the root director of Server one to point to the new directory on server too.

    Let me now if this works for you and if I can be any more help.

    Ted

  3. charslan
    Member
    Posted 1 year ago #

    Thanks for the reply Ted.

    Both folders are on same server and both are on root.

    Could not understand how to do this.

  4. Ted Rubin
    Member
    Posted 1 year ago #

    Cool, Here is the link for redirecting it from the root

    You want to move your site from wordpres.com to wordpress.com/domain but still have it come up wordpress.com correct?

    Ted

  5. charslan
    Member
    Posted 1 year ago #

    No . Please read this.

    I installed WordPress on sub domain and when it prepared now I want move it to main domain.

    Both domains folders are on root(on same level) i.e

    /www/www/ for example.com (an html site running)
    /www/test/ for test.example.com (WP site running)

  6. Ted Rubin
    Member
    Posted 1 year ago #

    Here are the steps you need to follow.

    Go here

    You want to follow the section

    Using a pre-existing subdirectory install

    Hope this helps.

    Ted

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.