Forums

Transfer from Dev subdomain to Live domain (5 posts)

  1. gr33nman
    Member
    Posted 4 years ago #

    Keeping in mind what I learned here:
    http://codex.wordpress.org/Moving_WordPress

    I'm developing at a domain: subdomain.mydomain.com. When it's done, I plan to overwrite the current live domain contents (not currently wordpress) at http://www.mydomain.com. I'll be using the same server and db.

    I'll copy the entire contents of the subdomain to the main domain and reset the appropriate content of the config file at the main domain. I'll then go to the subdomain and have tell it the correct domain in settings is the www domain. It will still be using the same db on the same server, so the transfer should be immediate.

    Are there any caveats when doing it this way?

  2. MichaelH
    Volunteer
    Posted 4 years ago #

    Don't believe you would have to change anything in wp-config.php.

    Will the sub-domain be abandoned (not needed)?

  3. gr33nman
    Member
    Posted 4 years ago #

    I thought as much.

    The sub-domain would then be deleted once the main site goes live. It's just for development.

    Cheers.

  4. MichaelH
    Volunteer
    Posted 4 years ago #

    Okay I'll assume the subdomain is called blog.yourdomain.com and that wordpress is now in the folder call blog under your web-root folder.

    You could leave everything intact but do this:
    1. Change in Settings->General, the Blog address (URL) to http://yourdomain.com
    2. Put this index.php file in your web-root folder (it is the same folder that contains the blog folder)

    <?php
    /* Short and sweet */
    define('WP_USE_THEMES', true);
    require('./blog/wp-blog-header.php');
    ?>

    Then update your permalinks in Settings->Permalinks.

    Then the blog is accessible at yourdomain.com

  5. MichaelH
    Volunteer
    Posted 4 years ago #

    Oops, Step 1 should read.

    1. Change in Settings->General, the Blog address (URL) to http://yourdomain.com, and the WordPress address (URL) to http://yourdomain.com/blog

Topic Closed

This topic has been closed to new replies.

About this Topic