Support » Fixing WordPress » Switching locally installed WP site with live hosted WP site

  • Resolved doodlz


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

Viewing 8 replies - 1 through 8 (of 8 total)
  • esmi


    Forum Moderator

    Thanks, but I already know how to Move WP.

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

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

    try regenerating your .htaccess file for the test site.

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

    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?

    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.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Switching locally installed WP site with live hosted WP site’ is closed to new replies.