Moving WordPress from one sub-directory to another

email

I needed to move a site from the sub-directory /wordpress/to the new one /blog/. No worries:

  1. Change the settings of the URL in two places in the General settings,
  2. Save,
  3. Go change the name of the directory using FTP (from wordpress to blog),
  4. Do a search and replace for /wordpress/ to /blog/.

Great, done. However, there were a handful of old posts that might have caught a bit of traffic and I wanted to set up a redirect so that /wordpress/article-about-whatever/ went to /blog/article-about-whatever/. I knew enough to know I needed to use the .htaccess file. I was hoping that the Redirection plugin could do it (and it probably could, but I couldn't figure it out). So I came across this article (How to Move WordPress With htaccess and 301 Redirect) and I just altered the code a bit to get this:

CODE:
  1. RewriteEngine On
  2. RewriteBase /wordpress/
  3. RewriteRule ^(.*)$ http://the-m-line.com/blog/$1 [L,R=301]

However, I couldn't figure out where to put that. Finally, I read it closely again and I needed to re-create that /wordpress/ directory and put the .htaccess file there. Aha! Now it's working beautifully. See this post:

http://the-m-line.com/wordpress/business/is-print-dead-not-in-new-jersey/

Thanks Zaib Kaleem.

Related posts:

  1. NextGen Gallery: upload_max_filesize
  2. WordPress “comments” in .htaccess file
  3. Setting up a member/user directory in WordPress
  4. E-Commerce
  5. WordPress And CMS: How To Make It Work

About Bradley Charbonneau

I've done the big corporate thing. I've done the creative writer thing. Now I'm happily in the middle. I like to help small businesses who are interested in "working their website before their website works them." I'm also interested in creating beautiful sites with powerful WordPress themes.

, ,

12 Responses to Moving WordPress from one sub-directory to another

  1. Villy June 18, 2009 at 2:31 am #

    Just the guide I was missing to finish moving my site around..Thx!

  2. antalya evden eve June 20, 2009 at 3:47 am #

    very nice thanks admin

  3. Business Forum July 11, 2009 at 2:05 am #

    Thanks for the info. Was searching for this and you explained it easy :)

  4. Catherine July 24, 2009 at 7:04 am #

    Hello I found this blog by Google; it’s by this post I found my answer for what I was looking for. Thanks for the great post looking for more quality post.

  5. www.antalyaevdenevenakliyat.gen.tr July 26, 2009 at 5:19 am #

    Thanks for the info. Was searching for this and you explained it

  6. discount electronics October 19, 2009 at 1:21 am #

    I'm looking for it!
    Thanks!

  7. John January 10, 2010 at 6:48 am #

    Hey, just wanted to thank you for this post and for your example ... making the redirect from my old WordPress directory solved most of the problems I'm having.

  8. pandora charms January 10, 2010 at 4:05 pm #

    Thanks for you share....it is very useful for me....

  9. gemstone beads January 10, 2010 at 4:06 pm #

    just find it....great thanks...

  10. Bursa Haber January 11, 2010 at 11:42 pm #

    WordPress directory solved most of the problems I'm having.

  11. carspidey June 30, 2011 at 11:30 am #

    thanks for this... it worked like i expected!!!

    thanks...

Trackbacks/Pingbacks

  1. Leveraging Localhost WordPress for Learning Webmaster Skills | Website In A Weekend - July 30, 2009

    [...] example for your blog. Or whatever. Bradley Charbonneau provides a distinctly telegraphic procedure for moving WordPress between subdirectories, which works fine for me, but bears a bit more in-depth examination for some [...]

Leave a Reply

CommentLuv badge