WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Switching locally installed WP site with live hosted WP site (9 posts)

  1. doodlz
    Member
    Posted 3 years ago #

    I have a live, hosted site built on WP. I'm developing a new version of the site (with the Genesis theme) locally. I was told that I should export my DB from the live site, then do a fresh install of WP locally and import the DB.

    I now need to develop the new site on the hosted server. I know how to move it and install it in a hidden subdirectory. However, what should I do when I'm finished developing? Since the new install contains all my new settings, pages, etc. should I delete the original WP live site first? My old site exists in the public folder, but I would like to keep the new site in a subdirectory that points to my domain.

    If I delete the original site, then change wp-config and WP URL settings on the new site, everything should be fine, right? Will I lose anything? Link juice, settings, etc.?

  2. esmi
    Theme Diva & Forum Moderator
    Posted 3 years ago #

  3. doodlz
    Member
    Posted 3 years ago #

    Thanks, but I already know how to Move WP.

  4. fonglh
    Member
    Posted 3 years ago #

    You might have missed the section on Giving WordPress its own Directory, which has a link to another codex page.

  5. doodlz
    Member
    Posted 3 years ago #

    @fonglh, I have read that codex article a number of times, and have changed both URL settings to point to the subdirectory for now because I don't want it to be live yet. Sorry this post is a bit irrelevant at the moment. I started a new thread but it was closed.

    Both codex articles don't answer my question. I need the old site (in the public folder) to work while I'm developing the new site (in the subdirectory). The new site gets redirected to the live site, which means I can't develop the new site.

  6. fonglh
    Member
    Posted 3 years ago #

    try regenerating your .htaccess file for the test site.

  7. doodlz
    Member
    Posted 3 years ago #

    Thanks fonglh! That did it. I completely forgot to update the permalink structure.

  8. doodlz
    Member
    Posted 3 years ago #

    I finally made the switch to the newly designed/developed site. I deleted the old site (located in the public folder) and switched to the new site (located in a subdirectory). I followed the instructions in this article.

    I first tried leaving the htaccess file in the subdirectory, but some of my links didn't work. Then I tried placing htaccess in the public folder and updated the permalink structure. All the links on my site worked for about 20 minutes. Now, however, only parent Pages work, while child Pages, including blog posts, give me a 404 error. The only things I did in between it working and not working was change some links in text widgets, and updated links on a single WP Page.

    Does anyone have insight on this? And should I continue to post here, or should I start a new thread?

  9. doodlz
    Member
    Posted 3 years ago #

    I figured it out. Apparently I had to have the exact same htaccess file within both the subdirectory and the public directory. Now all my links work.

Topic Closed

This topic has been closed to new replies.

About this Topic