Forums

[resolved] Upgrade and Move at the same time (4 posts)

  1. DiamondLime
    Member
    Posted 4 years ago #

    K, WordPress ninjas, here's a toughie for you.

    I currently run my blog using WP 2.0.4. I'm long overdue for an upgrade.

    I have WordPress installed in /wordpress/. I have it serving pages in /Blog/. I would like to move WordPress so that the files AND the served pages are in /blog/, WITHOUT losing search engine rankings. I'm gonna need some ideas for the process, including the redirects and .htaccess rules needed.

    So, what steps would you recommend to upgrade my blog AND get it running under /blog/ instead of /Blog/ and /wordpress/, without losing search engine rankings?

    My site is located at http://www.diamondlime.com/ and the blog is at http://www.diamondlime.com/Blog/

  2. Otto
    Tech Ninja
    Posted 4 years ago #

    Sanity tip: Do one at a time. Don't try to combine the two in one operation. Move then upgrade or upgrade then move.

    I'd move it first. Upgrading will cause you more problems than moving it will, because it's such a large upgrade and so many things have changed between 2.04 and now.

    http://codex.wordpress.org/Moving_WordPress

    Regarding keeping search engine rankings, you need a rewrite to redirect the old URLs to the new ones. If you leave the capital-Blog directory there after moving to the lowercase-blog directory, then you can put an .htaccess in the capital-Blog directory with these lines in it:

    RewriteEngine On
    RewriteBase /Blog
    RewriteRule ^(.*)$ http://www.diamondlime.com/blog/$1 [R=301,L]

    That will do a 301 redirect of everything in capital-Blog to lowercase-blog, which will correct the search engines as they find the links. This assume that your permalink structure itself does not change, of course, just the directory that you're in.

    You could also put the rules in the root directory's .htaccess with some minor changes, and eliminate the need to have the Blog directory. That would only be slightly trickier:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^Blog/(.*)$ http://www.diamondlime.com/blog/$1 [R=301,L]
  3. DiamondLime
    Member
    Posted 4 years ago #

    That sounds really good. Thanks for the quick reply! I will let you know how it goes (I will have to work on it later tonight)

  4. DiamondLime
    Member
    Posted 4 years ago #

    Everyone should know that Otto42 is a hero. His advice was spot on. Perfect.

    I moved my WordPress installation using the directions given in the article he pointed me to. I moved from one subdirectory to another (I didn't want my WordPress in the root because I have some other things installed). That worked great.

    I changed my .htaccess file in my old directory to include the redirect code. Since I didn't need to change my permalink structure, what he provided was perfect. I loaded some of my ranked pages by searching in Google and clicking on my result. Redirects just great, so I should be able to keep my search engine rankings. Again, perfect.

    Finally, I followed the standard upgrade instructions. Those were good, too.

    Anyone else wanting to perform a move AND upgrade while preserving search engine rankings should follow this process, too. Move, redirect, and upgrade.

    Thanks, Otto.

Topic Closed

This topic has been closed to new replies.

About this Topic