WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Move a WordPress2.0 up a directory level

[Resolved] Move a WordPress2.0 up a directory level

  • Hello everyone,

    I just recently ditched Moveable Type, and moved to WordPress 2.0.

    The installation went well, and eveything is working properly!

    Now, I have one more thing I would like to do.
    Currently my WP installation is in my http://www.japannewbie.com/blog/ subdirectory. I would like to move the entire WP installation up a level, so it is at http://www.japannewbie.com/ Where my old blog was.

    Is there a way I could move the current installation up a level without breaking things?

    Any advise would be helpful!

    – Harvey

Viewing 15 replies - 1 through 15 (of 17 total)
  • Yes.
    1. Go admin > Options > General and change the two URIs to the new(future) address = the root.
    2. Do NOT try to see/open your blog in a browser!!!
    3. Move the files from the directory to the root.
    4. Now you can open your blog in a browser 🙂

    Won’t that break permalinks?

    The only way I can think of is to copy/manually edit an .htaccess file into your DocumentRoot… uncertain, though?

    All permalinks generated by WordPress are dynamic. But links to the person’s site located on another site will break.

    Easy to just do this though:

    RewriteEngine On
    RewriteRule ^blog/(.+)?$ http://www.japannewbie.com/$1 [QSA,L]

    How does one implement the code mentioned above?

    Go admin > Manage > Files

    And make sure your .htaccess file is writeable though. CHMOD that file like 666 or something. =) Hope this helps. Once you apply the following changes like Viper007Bond said, then click on the “Update File” button. =)

    spencerp

    Okay, so the steps would be…

    0.5. Edit .htaccess and include the 2 lines Viper007Bond has provided.
    1. Go admin > Options > General and change the two URIs to the new(future) address = the root.
    2. Do NOT try to see/open your blog in a browser!!!
    3. Move the files from the directory to the root.
    4. Now you can open your blog in a browser 🙂

    And that’s all I would have to do, to drop my WP2.0 installion down one level. The links within my site will be all OK. Some links from outside may break (thats OK by me).

    Just clarifying. I’m scared to try this!

    Harvey, you should be just fine. =) That’s what I had done with my main blog, and believe me, I’m always scared to do that..but that’s normal lol. =) Anyway, just do what Moshu said first, then what Viper007Bond said, by editing the .htaccess file like I said. LOL!

    Okay, so the steps would be…

    1. Go admin > Options > General and change the two URIs to the new(future) address = the root.
    2. Do NOT try to see/open your blog in a browser!!!
    3. Move the files from the directory to the root.
    4. Now you can open your blog in a browser 🙂

    Edit the .htaccess like I said and include the 2 lines Viper007Bond has provided. =)

    Good luck, and I’m sure you’ll be just fine.

    spencerp

    Okay, going to try right now!

    Hey guys, went thru it. But have trouble, seems links are broken~

    1. Go admin > Options > General and change the two URIs to the new(future) address = the root.

    Original:
    WordPress address (URI): http://www.japannewbie.com/blog
    Blog address (URI): http://www.japannewbie.com/blog

    New:
    http://www.japannewbie.com/
    http://www.japannewbie.com/

    UPDATE

    !!!
    Not Found
    The requested URL /wp-login.php was not found on this server.

    2. Do NOT try to see/open your blog in a browser!!!

    YES SIR

    3. Move the files from the directory to the root.

    cp -rf blog/* .

    OK.

    4. Now you can open your blog in a browser 🙂

    http://www.japannewbie.com — OK.
    Admin Panel also OK.

    5. Edit .htaccess

    RewriteEngine On
    RewriteRule ^blog/(.+)?$ http://www.japannewbie.com/$1 [QSA,L]

    New .htaccess has following contents.

    DirectoryIndex index.html index.shtml index.htm home.html welcome.html index
    .php
    Deny From 80.36.223.107 80.58.39.174
    RewriteEngine On
    RewriteRule ^blog/(.+)?$ http://www.japannewbie.com/$1 [QSA,L]

    Conclusion.
    http://www.japannewbie.com loads my blog OK.
    Admin Panel works OK.

    However when I click on links in my blog… Like permalinks to posts…

    The requested URL /2006/01/06/hizamakura-china-version/ was not found on this server.

    Or the PAGES links in the tabs…

    Not Found
    The requested URL /older-docs/ was not found on this server.

    I get links not found etc.

    Any ideas on this? I guess I’m close… it seems that the htaccess bit isn’t kicking in?

    I “rolled back” by resetting the config to the previous directory, and changing .htaccess back as well for now.

    Since in your OP permalinks were not mentioned I didn’t take them in consideration.
    Probably the only missing step in what you did was the Update of the permalinks settings.

    Viper007Bond, that’s what I meant. Was mostly concerned for all those incoming trackbacks/pingbacks that would be broken… internal structures matter, IMO, far less. 🙂

    Ahhh, to Update the Permalinks section, I just do Options > Permalinks > Update Permalink Structure? And it will run thru and update everything form me? Sounds like it’s worth a shot!

    Thanks all! Fixed fixed.

    No worky. 😉

    http://www.japannewbie.com/blog/2006/01/06/hizamakura-china-version/

    That should redirect to the correct URL.

    Do you have the rewrite rules I gave you ABOVE the WordPress rules in your root .htaccess file?

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘[Resolved] Move a WordPress2.0 up a directory level’ is closed to new replies.
Skip to toolbar