How do I move WordPress from a subdirectory to the root directory?

Q. I’ve installed my website in a subdirectory of our domain, because I didn’t want visitors to see the site until I was finished with our development.

Now I want to have the site show up in the root directory (not in the http://mydomain.com/wordpress directory). How do I do this? I’ve read the information on moving WordPress, and it seems really complicated.

A. The good news is that you DO NOT need to MOVE WordPress in order to have your content display without the subdirectory name. You only need to move 1 file and change one line of code and make one modification to your General Settings, and you’re good to go (see instructions below).

Installing WordPress in a subdirectory is good idea because:

  1. It keeps your root directory clean and tidy (in case you need to add any other PHP applications to your site).
  2. It adds another layer of security by obscuring the location of your WordPress application files. Ideally, you want to name the subdirectory something not too obvious (ie don’t call it wp or WordPress). I’m not sure how obscure this really makes WordPress, because you can obviously get the subdirectory name from any images uploaded to the site, since they will still read as sitename.com/subdirectory/wp-content/uploads/image.jpg, so I usually install WP in a subdirectory for development purposes or to simply keep the root directory clean in case I install any subdomains or other applications.
  3. It allows you to develop a new WordPress site while maintaining your current website in the root directory. Once you’re finished with your WordPress development, you can backup and then delete your current site’s files, and use the following instructions to display WordPress from the root directory of the site.

“Moving” WordPress from Subdirectory to the Site’s Root Directory

1. Install WordPress as you normally would, but instead of installing it in the root directory (ie in the www or public_html directory), install it in a subdirectory in the www or public_html folder. Before continuing with this process, I highly recommend:

a) de-activating caching, broken link checker and any redirection plugins;

b) removing any old site files from the root directory — perhaps copy them to a folder called _backup;

c) making sure you don’t have any other folders in the root directory that have the same name as any pages on your WordPress site, for example “blog” unless of course this is the name of your subdirectory install of WordPress in which case you cannot have a page of the same name because the browser will get confused and look for that page in that folder, then things are really confused;

d) using wp-db-backup to make a backup of your database;

e) getting access to your database via phpMyAdmin on your web host’s control panel in case you type the URLs wrong in the next step. Your database username and password are in the wp-config.php file.

2. Once you’ve completed your design work, adding pages to the site, etc., login to the WordPress Dashboard. From the Settings -> General tab, set your WordPress address URL to the subdirectory you installed WordPress in (without the trailing slash). Note: This will already be displayed in the WordPress address field, so you don’t have to change it. What you do need to change is the Site address URL. Set this to  your site’s root address (without the trailing slash).

3. Next, using an FTP application or your web host’s File Manager, DOWNLOAD the index.php file that is in the WordPress application directory (not the one in your theme’s folder or elsewhere) and then UPLOAD the copy you downloaded to the root directory. (By root, I mean the www, htdocs, or httpdocs folder — NOT the root of your hosting account! You simply want to upload the copy of the index.php file and put it in the parent folder of your subdirectory which presumably is the location for the main URL of your website.)

Alternately, you can use your FTP application and MOVE the index.php “to the parent” but then you MUST read and follow step 6 below.

(Note: If you have a site already in the root directory, such as an old static html site, then you should backup and delete those files first.)

4. In a text or HTML editor, open the index.php file that you just copied and/or moved to the root (aka main url) directory and change the location of your wp-blog-header.php to tell WordPress where it can find the WordPress application files in the subdirectory:

Example: if your WordPress installation folder is ‘mywp’, you would change:

<?php require('./wp-blog-header.php'); ?>

to

<?php require('./mywp/wp-blog-header.php'); ?>

Important: Be sure you type this correctly! A missing / or too many slashes or missing period or apostrophe can make this not work. Believe me, I’ve seen people be totally freaked out things didn’t work and it was because they typed this line wrong.

5. Visit the site and click an interior page to make sure it displays correctly. If it doesn’t, you may need to update your permalinks (Settings -> Permalinks and click Save Changes). If you still cannot access your interior pages, then the .htaccess may need to be moved to the same location as the index.php file (i.e. the root directory). This is not necessary on all web hosts. Be sure to update the permalinks again after you move the .htaccess file.

Remember that your login and registration links will still be http://www.yoursite.com/mywp/wp-login.php.

Now, when people visit your site, they will see all the URLs of all the pages and posts as if you had installed WordPress in the root directory, and you will have a neat WordPress directory behind the scenes.

6. Create a “Silence is Golden” index.php file in the WordPress directory.

If you copied the index.php file instead of moved it, this step is optional. Essentially, you don’t “need” this duplicate index.php file in the subdirectory because it doesn’t really do anything other than prevent people from reading the directory contents. However, if you moved the index.php file leaving the WP directory without an index.php file, then you should create a new blank index.php file and put the following code in the file:

<!--?php // Silence is golden. ?-->

Alternatively, you can install the Silence is Golden Guard plugin, which provides a lot of other useful security tools as well: http://wordpress.org/extend/plugins/silence-is-golden-guard/

A Note About Using Cforms if WordPress is Installed in a Subdirectory

If you are using Cforms contact form plugin for WordPress, you will need to tell the Cforms javascript that Cforms is in a subdirectory. You’ll want to do this BEFORE you activate the Cforms plugin. Hyperarts.com created a good post about how to do this:

Telling Cforms JS that WordPress is installed in a subdirectory

A Note About Web Hosting

If you have a current site with a non-WordPress friendly host, you may want to set up hosting with a WordPress friendly hosting company and move your current site’s files to the new host and then install WordPress as instructed above.

Problems?

If you have any trouble with this process, please visit my FAQ at: http://askwpgirl.com/moving-wordpress-from-subdirectory-to-root-faq/

Please comment on that page.

Success?

If this process was successful, please comment with a thumbs UP below, share on Twitter, follow me on Facebook. Thanks!!!

  • http://www.mybuiltenvironment.com Terence Hoaglund

    Where were you when I was trying to figure this out a few weeks ago? LOL! Great tips!

  • Angela

    LOL. Sorry, Terence, next time, shoot me an email! You know I’ll write a special post just for you :-)

  • http://ezentialmassage.com Kira Woodmansee

    I’ve been developing a site in a subdirectory and we’re ready to go live. The instructions here and on Bizquarium’s site make sense, but my index.php file does not contain that line! I did a search for the line “wp-blog-header.php” in all of my WP files, and it did not appear anywhere! I’m not sure if this is a quirk of the ComicPress theme or what, but I’m not sure what to do.

  • Angela

    Hi Kira,

    The index.php file that needs to be moved and edited is the index.php file that is in the main WordPress application directory. This is at the top level of your WordPress installation. It’s not in the themes folder or any other folder. Please give me a call or email me again if you have questions.

    Also, remember to MOVE this file, don’t copy it. Another note: be sure to edit the General settings exactly as shown above.

    Once you’ve successfully done this once, it’s a piece of cake. One more thing to consider: you may need to go to Settings > Permalinks and click Save to prompt a rewrite of the permalinks to the new location. I’ve only found this to be an issue on GoDaddy hosting. GoDaddy updates it’s mod rewrite once an hour, so you might have to do that and sit back for a bit to see the URLs rewritten to the new root directory correctly. Blue Host, Host Gater, and Host Monster work instantaneously with the updated permalinks.

    Good luck!

    Angela

  • http://goldmineexpert.com bob mcc

    Hello, I use Yahoo for my Web host. They have great support but I’m wonder if there is something wrong with Yahoo and WP.

    I update something using WP it then will update my pages (somewhat) then slowly update my goldmineexpert.com/gold (installed blog folder) but it will not update my main goldmineexpert.com. I just notice after many hours the changes did come thru.

    Do you have any comments about Yahoo or experienced this problem?

    thank you bob

  • Angela

    Hi Bob,

    I’m looking at your site again. Disregard my previous reply. It looks to me like you need to check your General Settings again as indicated in this post and be sure the Blog Address (aka Site Address) is the root directory and that you’ve MOVED (not copied) the Index.php in the WordPress directory (the gold directory) to the www or public_html folder of your site and then made the code change to that index.php as indicated above (< ?php require('./gold/wp-blog-header.php'); ?>), then go to Settings ->Permalinks and click Save Changes.

    Angela

  • Angela

    You may also need to move the .htacess file to the www folder. If you’ve installed WP using Yahoo’s tools, redirecting the blog to the root directory may be an issue, because I don’t know if you have control of the .htaccess file. Yahoo has nice services, but it also restricts some of this functionality which you can readily do with another web host.

  • http://goldmineexpert.com bob mcc

    Thanks for your reply. I will be working on this shortly and will keep you posted. I did run into one issue: When I tried to manually change the site url I got this message and it would not let me change the url.

    Warning: Modifying this field will cause your permalinks to malfunction. We strongly recommend that you do not change this field.

    Please note that this field should match the web address of your blog installation directory. If you chose to make your blog your home page when you installed WordPress, your blog was automatically configured to display at your domain. You should NOT change the value of this field to match your domain.

    Any ideas? thx bob

  • http://goldmineexpert.com bob mcc

    well, I moved the index file to the root but still could not change the Site URL or could not adjust the permalinks. If you notice on the main page the home button points to \goldmine\gold and the software button goes to a page it can’t find. Feeling kinda stupid at this point. Any additional ideas?

    You available to log on and take a look and maybe help with the design?

    thx bob

  • Angela

    Hi Bob,

    I think you are not stupid, but Yahoo is. I’ve been reading some forum posts, and it seems that Yahoo does not allow you to view or edit the .htaccess file, which is the file responsible for rewriting the permalinks correctly. This sucks. So Yahoo does not enable you to do what I have instructed in this post, which is to install WordPress in a subdirectory. Your best bet is to go to Tool -> Export and export all your posts. Backup your wp-content folder. Delete your WordPress install and reinstall WordPress in the root directory, then go to Tools -> Import and import your posts and copy back over your wp-content folder. You may need to check your image links in your posts because those will still be pointed to the gold directory. Before you go to all of this trouble, you might find call Yahoo and explain to them that the .htaccess file needs to modified to view the pages/posts from the root rather than the subdirectory. I don’t know if they can modify that for you, but it’s your only hope.

    Another old post from SEO Egghead had an interesting fix to put some code in that index.php file that you moved which does a redirect of the site. You might try this before going to the trouble to reinstall everything in the root. Be sure to complain loudly to Yahoo as well. Here’s the post:

    http://www.seoegghead.com/blog/seo/yahoo-hostings-lack-of-htaccess-support-p8.html

  • Angela

    Hi Bob, Now replying to this post:

    The warning is a Yahoo warning. What this means is that you can’t do what I’ve suggested in this post. Yahoo will show the HOME page from the root, but all other pages will show from the gold directory, and you can’t have them show from the root directory. Sorry.

  • http://goldmineexpert.com bob mcc

    You’ve been a great help. I will try both suggestion and let you know what happens. What provider do you recommend to your clients other than Yahoo. I don’t mind moving. I have another site at Network Solutions are they any better ? I’m actually thinking of moving from them cause there more expensive than the current going rates. Maybe I will move all my urls.

    Thanks again bob

  • Angela

    Network Solutions connections to their MySQL servers are really slow, so are Go Daddy’s – so working in the WordPress Dashboard can be excruciatingly slow and tedious at times – and the page load times are very slow. I had to move clients off of both of them because of this. On Network Solutions, one site ended up going down several times in a few months because their shared hosting server was hacked at the root level. It was intensely time consuming and frustrating. The client lost all Google ranking as a result of being down for so long. Once we moved them to Blue Host, their ranking came back after a couple weeks, and the site loaded many times faster.

    You might want to join the WordPress Group on LinkedIn. There was a great discussion about web hosts for WordPress. Some good hosts are: Host Gator, Dreamhost, Blue Host, and Host Monster. Blue Host and Host Monster are the same company out of Provo, Utah. They have great customer service, but I’ve had several sites down 3 or 4 times over the past several months. They had some power issues because Provo is off the grid and produces it’s own power. Host Gator is probably my current recommendation. With shared hosting, you just never know. I’m using Known Host for VPS, but that’s expensive compared to shared hosting.

  • Pingback: Developing WordPress in a subdirectory and then redirecting to the root directory | Boulder Digital Arts Blog

  • http://www.freerangelongmont.com/ M. Douglas Wray

    Great post Angela! Superb resource for WordPress users. Thanks for giving this outstanding support.

  • http://www.maria-murray.com Maria Murray

    Hi Angela,

    Thanks so much for the great blog! It’s so useful.

    This post is exactly what i’ve been looking for, however i’m having some trouble, I followed the post above, ie changed the site name, moved my index.php and changed that line of code (to “./working/wp-blog-header.php” in my case, as my files are in a subdirectory called “working”) and updated my .htaccess from within wordpress, the .htaccess was in the root directory of the entire site already. My site is http://www.corkaccommodation.ie, none of the links are working for me, any advice?!

    Thanks again for taking the time to do this blog!
    Maria

  • http://www.maria-murray.com Maria Murray

    Just saw this…
    http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory It says ‘Copy (NOT MOVE!) the index.php…” are they wrong?! I moved, not copied, as per your instructions.

    Thanks Angela!

  • http://www.maria-murray.com Maria Murray

    Sorry for the millions of replys! I ended up making some edits to the .htaccess file & now it seems to be working (fingers crossed!). I moved it back into the subdirectory, got the code that was needed from inside the wordpress admin site, deleted what wordpress had updated the .htaccess file with and replaced it with the new code, then moved it back up to the root directory, phew! So now it seems to be working.

    Thanks again for the great blog, sorry for the bombardment of replies!

    Maria

  • Angela

    Hi Maria,

    Yes, the codex has this very confused. That is why I wrote the blog post. You do want to MOVE the index.php. And, you should put a blank index.php with the Silence is Golden code in the WordPress directory that you just moved the other index.php file from to prevent people from being able to read that directory. The wp-content folder has a Silence is Golden index.php file in it that you can copy.

    Some hosts want the .htaccess in the same directory as where you moved the index.php and some don’t. Only one of the hosts I work with required me to move the .htaccess file. You usually don’t have to edit the .htaccess file, as going to Settings > Permalinks and clicking Save Changes will usually rewrite the .htaccess file for you. If it doesn’t, sometimes just deleting the contents of the .htacccess file then going to the Permalinks and clicking Save Changes will do the trick. You have to be patient because some hosts like GoDaddy update the mod rewrite once per hour, so sometimes you have to click Save Changes and walk away from the computer for a bit.

    Glad you got it working.

  • Angela

    Thanks, Doug! You’re welcome. Glad to spread the love.

  • Neil

    HI Angela,

    I am trying to follow these instructions but when I try to move the index.php file to the root directory I get an error message saying that this file name may already exist or I may have typed the directory name incorrectly. As I had already moved the index.htm file from the root directory (and now can’t move it back – same error message) I have an existing site that now doesn’t display and my new site (which was set up in the subdirectory of /development) can’t be moved. Any ideas?

    Thanks

    Neil

  • Angela

    Hi Neil,

    Open the index.php file that is in that directory and check the content. If it’s “Silence is Golden” or starts with a PHP template tag to “get_header();” then you moved the wrong index.php to the root. Let me know what it says. The index.php file you want to move contains the following text:

    < ?php
    /**
    * Front to the WordPress application. This file doesn't do anything, but loads
    * wp-blog-header.php which does and tells WordPress to load the theme.
    *
    * @package WordPress
    */

    /**
    * Tells WordPress to load the WordPress theme and output it.
    *
    * @var bool
    */
    define('WP_USE_THEMES', true);

    /** Loads the WordPress Environment and Template */
    require('./wp-blog-header.php');
    ?>

    You will want to completely remove your OLD site, because the browser may get confused between trying to load the index.php versus the index.html file.

    I find it helpful to use an FTP application like Transmit (for Mac OS) or WS-FTP Pro (for PC) for file transfers because sometimes working in the web host’s file manager can be confusing.

    Angela

  • Shane

    Thanks for the info… works fine. Just to let you know – Networks Solutions is hosting the site and I needed to do the permalinks save.

  • Angela

    Cool. Glad it all worked out! It seems saving the Permalinks is really more of a mandatory step, because the .htaccess mod rewrite needs to get updated.

  • http://www.mijndesigns.com renzo

    thanks Angela….thats what I needed last nite and what I couldnt figure out after a couple of beers!

  • http://www.patentmarkingcontrol.com Dannyboy C.

    Angela,
    Many thanks for this tip, which worked like a snap!

    Couple questions, though.

    It seems as though my Contact Form 7 autoresponder e-mail message command no longer works following the program switches you recommend.

    Also, the web access speed became really slow upon implementing your recommended changes.

    Any thoughts as to what is going on with these items?

  • http://www.patentmarkingcontrol.com Dannyboy C.

    I notice that you have several posts about wordpress-friendly hosting companies. I’m using Network Solutions as a hosting service, but the slowdown seems to be caused by the recommended changes. I would have mentioned the hosting issue in my earlier post, but it did not seem relevant to the problem I encountered.

  • Angela

    Hi Danny,

    It’s possible that the Contact Form plugin does not know how to reference itself in the sub-directory. You might need to check their documentation or try to uninstall and reinstall the plugin.

    In terms of the changes on this post (moving WP to reference from the root directory), that would not cause slowness on the site unless perhaps, and I’m just making a wild guess, that a certain plugin is not working properly after this shift. You might try disabling any suspect plugins, like the Contact Form 7 and see if that resolves the slowness problem. Without knowing more about what your set up is, it’s hard for me to know what else to suggest.

    Keep me posted!

    Angela

  • http://www.patentmarkingcontrol.com Dannyboy C.

    I deactivated all plug-in’s and it’s still bone slow (4.703 second(s) (0.264 s/Kb) load time based on woorank). My regular site, which is not wordpress-based, is around 0.1 second or less.

  • Angela

    Hi Danny,

    I had the same experience at Network Solutions with my WordPress sites. The problem has something to do with the location of the database server and how WordPress must connect to that server to render the content. In this case, the best thing you can do is install a plugin called W3 Total Cache. This plugin will cache all the pages on the site as HTML pages. Everyone should run a caching plugin with WordPress especially if they are on shared hosting. You will want to go to the W3 Total Cache preferences and exclude your contact page from caching, otherwise if you have a captcha or anti-spam challenge, it won’t work. Please note that the W3 Total Cache does not show cached pages for logged in users. So, set the plugin, then open a different browser or log out and visit all the pages on the site to force the pages to cache. You should notice about a 700% improvement in performance.

    Angela

  • http://www.patentmarkingcontrol.com Dannyboy C.

    Angela,
    Well great minds think alike, or discover similar solutions. I discovered the W3 total plugin after NS technician told me it wasn’t their fault for my complaining about a 4 second upload. When I installed W3 Total Cache and enabled everything except CDN [I don't know what CDN is, nor do I have any clue what to put into the prompt box], I got a crappy woorank score [I'm using woorank as a tool to evaluate the site optimization parameters.] I got blazingly fast upload times that were reduced from 4-15 seconds to at 0.11 sec, which is what I wanted. But it killed a lot of other parameters [stripped out my title, my description, my images, all headers—presumably this is due to everything being converted to an HTML format?? So I disabled W3 Total Cach this morning.

    Then I read your post, got curious again, and tried a couple things. First, I enabled only Page Cache. That single functionality was responsible for the blazing speed (0.11 second load time) and the stripping of much data (presumably due to Page Cache converting everything into html code-speak. So that explains why woorank gave me a crappy score, despite the considerably improved load times.

    So next test that I did was to enable everything except Page Cache and CDN. Bingo! Improved load speeds (0.30 second load time) and improved woorank score (up 4 points).

    Finally, I tested the contact forms for their functionality. Everything works okay without conflicts!

    One last question (or two): how does one reset the permissions, mechanically speaking? I noticed that there was a highlighted box about this, but I ‘ve not the faintest idea how to do this.

    Second, what do I do with the CDN functionality, leave it disabled?

    Thanks!

  • http://www.krowchukdressage.com Krowchuk

    Thank you for the great article! This was really a timely find for me as I have been researching and procrastinating this very change on my site.

    Several years ago I opted to install wordpress into a subfolder to use it as an “add-on” blog for my static html pages. Over time WP has grown up into a nice CMS and I migrated my static html pages into WP pages leaving an index.html at the root level for an entry point.

    Now I have over 500 pages and images at http://www.mydomain.com/blog/ and would like to get rid of the /blog/ part. I worry though what will happen to SEO and incoming links and internal links to images etc.

    Would you please expand a little on your article to cover the pitfalls and procedures? I know I would really appreciate it!

  • Angela

    Hi Danny,

    I’m just now learning all the W3 Total Cache settings myself, so I’m sorry I can’t be of much help. CDN allows you to host the cached files elsewhere, like on Amazon S3 cloud. Here are a couple tutorials on Total Cache that might be helpful:

    http://zemalf.com/1443/w3-total-cache/

    http://www.wpbeginner.com/plugins/how-to-install-and-setup-w3-total-cache-for-beginners/

    http://www.strictlyonlinebiz.com/blog/speed-up-wordpress-with-w3-total-cache/1231/

  • Michael Bradley

    Thanks for the clearly written, simple instructions!

  • Michael Bradley

    Okay, one problem: When I try to preview a post before posting, I get a 404 error. Any ideas?

  • Angela

    Hi Michael,

    Be sure all your pages are working fine first – click on your posts to be sure the permalinks with the new location are working fine. if not, you probably need to update your .htaccess file. This can be done be going to Permalinks and clicking Save Changes. If that doesn’t work you might want to open .htaccess in your FTP application and then delete the WordPress info there, and then go to Settings > Permalinks and Save Changes. This will rewrite the WordPress portion of the .htacess file. Let me know if that does the trick.

  • Michael Bradley

    That worked! I had tried going to Permalinks and clicking Save Changes before, and it didn’t work. I didn’t think to clear .htaccess and start from scratch. Thank you very much!

  • Angela

    Hey, cool. I’ve found that I do sometimes need to clear the .htaccess to get it to rewrite. I’m not sure if it’s host dependent or what, but I should add that to my instructions above.

  • http://dynovac.ca Wanda Marke

    Thanks for the great tips – all worked well until I tried to login to my theme via the wordpress dashboard – I am using headway and now I have the Index of/superdynamo( my previous subdirectory name) showing up not opening up my visual editor – any ideas?

  • http://notyet andy

    I’ve moved the wordpress installation to a sub directory named /press/… Now the url shows the /press after the .com. How do I get rid of the /press in the URL while maintaining the the installation at the sub-directory?

    Thanks for the great instructions.

  • Angela

    Hi Andy,

    So, you actually moved your WordPress install from the root directory to a subdirectory? If you did that successfully, then you can follow the instructions in this post starting with step 1 in order to get the /press to not display. These instructions are for WordPress installs that are in a subdirectory but for which people want the URLs to display from the root.

    Angela

  • Angela

    Hi Wanda,

    After you have the website displaying from the root directory, you will still need to log in via the subdirectory, because the actual WordPress application files are still in the subdirectory. I’m not sure what’s going on with your visual editor — are you referring to the visual editor buttons? Do you have the Visual tab selected when you go to edit a post? You could try enabling the default theme and then re-enabling your current theme to see if that solves the problem.

    Angela

  • Andy

    I did the reverse. I installed the wordpress in the subdirectory and then moved the index.php as suggested. It seems to work find now. but I can not seem to get the permalink to get rid of the /press destination. Do you know if actually installing the program in root will eliminate the /press subdirectory?

    Thanks

  • Angela

    Hi Andy,

    Actually, you did it just fine. What you need to do now is make sure you set your General Settings correctly per the instructions in step 2 above. Then, you may need to delete the WordPress contents of your .htaccess file and go to Settings > Permalinks and click Save Changes. This will force a rewrite of your permalinks. Let me know if that works. The whole purpose of my writing this post is to help people avoid having to move the whole WP installation to the root directory, because that has it’s own issues and is a pain in the a**.

    Angela

  • Andy

    That did it for me. It took away the /press in my permalink. You are wonderful! Thanks a lot.

  • http://besthomebrewshop.com/ Best Homebrew Shop

    Sorry, I should say…

    to reinstall your theme after you take these steps…
    (not in this parti order)

    - move index.php and .htaccess to root (not WP subdirectory)
    - change header redirect in
    - change blog and site urls in WP settings
    - remove content from .htaccess
    - verify correct permissions of .htaccess [766 or 777] once new blank version is uploaded
    - resave permalinks to populate .htaccess
    - delete and reinstall your theme

    also before you do all this it might hurt a little but it makes sense to do this type of move with plugins disabled and WP default theme active.

    cheers to beers!

  • http://besthomebrewshop.com/ Best Homebrew Shop

    Also, some of your users may find this plugin super helpful when moving wordpress installation directories as the image URLs in MySQL have to be updated after you move.

    http://wordpress.org/extend/plugins/search-and-replace/

  • Angela

    Thanks for the blow by blow of how you got your site to work. I’ll update this post as well. I have only had to move the .htaccess once, but I have found the need to delete its contents in order to get the permalinks to rewrite correctly. I’ve never had to delete and reinstall the theme. I would suggest that instead of having to delete and reinstall the theme, you might simply be able to activate the TwentyTen theme and then reactivate your own theme. If your theme caused problems, that would be highly unusual as the theme as nothing to do with the permalinks, but I have seen themes have problems and activating TwentyTen theme usually fixes these.

  • Angela

    You don’t ever have to use the Search and Replace plugin if you are following the instructions in this post, because all of the URLs will be correct using this method. If, on the other hand, you actually MOVE the ENTIRE WordPress installation from the subdirectory to the root directory, then you definitely will need the Search and Replace plugin because all of your image links will break.

  • Pingback: Finding a Web Host for WordPress | Free WordPress Website Help | Ask WP Girl | Boulder, Colorado