What are best practices for changing the directory of a Wordpress blog?
November 29, 2008 1:06 PM Subscribe
I want to move my Wordpress blog from a subdirectory on my domain to the root directory -- i.e., I want the URL of my posts to be changed from http://www.domain.com/blog/post-permalink to http://www.domain.com/permalink . What's the best way to ensure that external links don't die? Is there a way to make sure that individual posts will retain their Google PageRank?
I know that some variation on a RewriteRule in the site's .htaccess file is what I'm looking for, but I'm unclear on the specifics. What are best practices for this sort of transition?
I know that some variation on a RewriteRule in the site's .htaccess file is what I'm looking for, but I'm unclear on the specifics. What are best practices for this sort of transition?
Response by poster: Well, to be clear, I figure that doing a simple redirect would be easy -- what I want to be sure about is what kind of redirect Google and other robots will respect the most.
posted by tweebiscuit at 1:15 PM on November 29, 2008
posted by tweebiscuit at 1:15 PM on November 29, 2008
Ah. I'm not knowledgeable about SEO. Carry on, then. :)
posted by sonic meat machine at 1:17 PM on November 29, 2008
posted by sonic meat machine at 1:17 PM on November 29, 2008
Response by poster: One more clarification: Instead of just changing the permalink options in Wordpress, I'm going to be moving the whole Wordpress installation to the root directory of my domain, rather than a subdirectory. Otherwise, I would just rely on Wordpress to do the redirection for me!
posted by tweebiscuit at 1:27 PM on November 29, 2008
posted by tweebiscuit at 1:27 PM on November 29, 2008
I wonder if Permalink Redirect would be of any use to you?
Don't forget to change the Blog URL under Settings/General too. :)
posted by Solomon at 2:00 PM on November 29, 2008
Don't forget to change the Blog URL under Settings/General too. :)
posted by Solomon at 2:00 PM on November 29, 2008
Best answer: But you don't need to move the whole WordPress installation to the root directory. WordPress makes it very easy to do this. See these step-by-step instructions on Giving WordPress its Own Directory. This is really the right way to do it: You just change the directory on the Options tab and then update the .htaccess file, as you inferred.
posted by lgandme0717 at 3:20 PM on November 29, 2008
posted by lgandme0717 at 3:20 PM on November 29, 2008
Response by poster: Awesome, Igandme0717! If I do this, will http://www.domain.com/podcast/permalink still work (or at least redirect) as well, though?
posted by tweebiscuit at 7:39 PM on November 29, 2008
posted by tweebiscuit at 7:39 PM on November 29, 2008
Response by poster: Actually, rereading this, looks like it will -- it's actually the root level that's getting redirected to the /podcast/ directory (which is what my directory is called) rather than the other way around, so the /podcast/ links should still work, right?
posted by tweebiscuit at 7:44 PM on November 29, 2008
posted by tweebiscuit at 7:44 PM on November 29, 2008
Yes, you can make the "new" directory either the root level or the name of any other subdirectory. I believe your old permalinks will still work as you anticipate -- at the very least, you can instantly try that out once you change the blog address (as per the instructions I referred to) and update the .htaccess file. Good luck!
posted by lgandme0717 at 9:25 PM on November 29, 2008
posted by lgandme0717 at 9:25 PM on November 29, 2008
This thread is closed to new comments.
redirect permanent /blog /
...but I haven't tested this. Try it out.
posted by sonic meat machine at 1:11 PM on November 29, 2008