Moving WordPress from Subdirectory to Root – FAQ

If you followed the instructions in my post “How do I move WordPress from a subdirectory to the root directory?” and you encountered any issues, please read the following list of frequently encountered issues.

Please comment below if you continue to have problems or write to me via my Contact form if you need personal assistance. If I can help you in less than 15 minutes, then I’m happy to do so for free. If the problem is more involved than that and requires me to login to your site and do the fix for you, then I charge $75/hour. Usually, I can solve these problems in less than 1/2 hour.

Verify the following:

1 – Index.php location and settings

Please check: Which index.php file did you move and where did you move it? The index.php file you moved should start with the following code:


<?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('./mywp/wp-blog-header.php');
?>

Check the require line in your file. Be sure that the / are in the right place and that the subdirectory name is correct. Most people make a mistake and either don’t edit the require line and put their subdirectory name in it or make a mistake with the syntax and have an extra slash, no slash, an extra period, etc.

Next, where did you put this index.php file? Some people have put it in the root of the hosting account instead of in the domain root — which is the public_html folder on most hosts. If you moved this file outside the public_html folder, that won’t work. Some people’s hosting accounts are really wildly configured, and their host does not have a straight forward path for you to figure out where the heck your domain root is. So, to keep things simple, you would have wanted to move the index.php to the directory just above your subdirectory that contains the WordPress application.

Finally, some people have inadvertently moved the index.php file in their theme’s folder rather than the index.php file in the subdirectory. If you don’t see the require line above in your index.php file, then you moved the wrong file.

2 – WordPress General Settings

The next most common mistake is to not set the General Settings in the WordPress Dashboard correctly. Here is how they should have been set:

If a mistake was made here, then you might not be able to see your site or you won’t be able to login to your site. It is pretty common to have made a mistake with these settings or forgotten to make the change here. To fix this, you will need to login to your phpMyAdmin application via your web hosting control panel. Take note of your database username and password in the wp-config.php file and check the following:

Login to the database and go to the wp_options table and click the browse tab.

The first option is is for siteurl (which is totally inconsistent with the General Settings field label). This should be set to the URL with the subdirectory:

Go to the next page of the table and check the home value. This should be the URL to the main site URL without the subdirectory name:

3 – .htaccess

Some web hosts will have issues with the .htaccess commands once your index.php file is in the public_html file. If this is the case, you should still be able to login to WordPress via the subdirectory, and your home page will display correct BUT your links to the other pages will show a “Page Not Found” error. (Please note: even though you are showing the pages of your site from the main domain url, you will still need to login via the subdirectory url – e.g. http://yoursite.com/mywp/wp-admin – and all of your images on the site will still be located in the http://yoursite.com/mywp/wp-content/uploads.)

So, if you are having troubles with your “pretty permalinks” in other words, the home page of the site displays okay, but your subpages display a File Not Found message, then login to your WordPress dashboard and go to Settings > Permalinks and click Save Changes. This should cause your .htaccess file to be updated correctly. If this does not work, you may need to move the .htaccess to the root directory and manually replace the current WordPress mod rewrite directive with the code below. (Note: you will need to show invisible files via your FTP application or use the web host’s file manager to see this file.)


# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

IMPORTANT NOTE: If you are on a Windows hosting account (please check this before commenting below), you will NOT have an .htacccess file. You will need to install a web.config file to use the Microsoft’s Rewrite Module. For more information, please read: http://codex.wordpress.org/Using_Permalinks#Permalinks_without_mod_rewrite. If you are on GoDaddy and have Windows hosting, please read: http://wordpress.org/support/topic/godaddy-iis-and-removing-indexphp-in-url?replies=20#post-1507468

To determine if the permalinks is the issue with why your internal page links are displaying as Page Not Found, try to use the Default permalinks (Permalinks > Settings) and see if you can view all your interior pages fine. If you CAN view all your pages using the Default permalink settings (in other words, the pretty urls are turned off), then the issue is related to the .htaccess file on Linux/Apache hosting or not having a web.config file and rewrite rules enabled on a Windows server.

You may need to check with your web host about how to make this work properly. Some, such as Yahoo web hosting really are not good WordPress hosts, others require that /index.php be part of the permalink structure. So, if the default permalinks work, and you’ve tried creating and editing your .htaccess (Linux) or web.config file (Windows), then call your web host.

4 – PHP Version Called in the .htaccess file

One person who wrote to me had their php version command in their .htaccess file. They had deleted the .htaccess file after moving WordPress, so the PHP directive calling for the correct version of PHP was removed, and their site therefore was running PHP 4, and the latest WordPress will not run in PHP 4. This is something you can check with your web host, and they can give you the line that goes in your .htaccess file to call for the correct version of PHP. It will look something like this:


AddHandler application/x-httpd-php5s .php

5 – Old Site Files Interfering with New Site

Several people installed WordPress in a subdirectory because they had an existing site in the main url. When they followed these instructions to move the index.php file the WordPress subdirectory to the main site directory, they left the old site files in the main directory and therefore, the browser kept trying to open the old index.html file rather than the index.php file. To fix this, simply create a new folder called _OLD in your main directory and drag all of your old site files into this folder. Download this folder and then delete it from the server after you’ve verified that the site is functioning correctly. Do not leave these old files on the server unless you have excluded them from search engines via a robots.txt file.

6 – Redirecting Old URLs

Whether you had an old .html site up or had your current WordPress site in the subdirectory indexed by Google, you’ll want to do redirects on these pages that Google may have indexed.

If you had an old .html site and the WordPress site was “private,” after you’ve completed this process, be sure to change the Privacy settings in the WordPress dashboard, so Google can now index these new WordPress urls. Install the Redirection plugin and create redirects on the old .html URLs to their new WordPress URLs. Install the Google XML Sitemap plugin and generate a new sitemap and submit it to Google Webmaster Tools. This will help prevent any 404 Page Not Found errors. Google will eventually re-index your site with the new URLs, so you shouldn’t have those old URLs come up in search engine searches after a few weeks.

If your current WordPress installation was indexed by Google with the old URLs, eg http://yoursite.com/mywp/about and now it is http://yoursite.com/about, then you will need to do the same as above for those old URLs. If you have a LOT of these old URLs, ie, you had a large, active blog before you followed these instructions, I’m testing out an .htaccess command you can use to rewrite all the URLs. I’ll post it here when I’ve tortured tested it.

7 – Protecting the WordPress Directory from Browsing

Since we removed the index.php file from the WordPress directory, now that directory can be “browsed,” which is not good. To prevent this, add the following line to your .htaccess file:

Options All -Indexes

OR install the Silence is Golden Guard plugin

OR create a new blank index.php file in the WordPress directory which contains the following code:


<?php
// Silence is golden.
?>

8 – Internal Hyperlinks

Please note that this process does preserve all the image links in your site. However, you will need to reset any INTERNAL hyperlinks, including any manually entered hyperlinks in the Appearance > Menus.

Some themes have hardcoded the link to the Home page incorrect and you may need to set that correctly in the header.php file of your theme.

A good plugin for finding these broken links is the Broken Link Checker.

I have also used the Search and Replace plugin, but use it with caution, because you don’t want to replace your good image links.

Typically, I will search for <a href=”http://yoursite.com/mywp

and replace with <a href=”http://yoursite.com/mywp

then I’ll do another search to make sure I didn’t break any image links with <a href=”http://yoursite.com/wp-content

and replace with <a href=”http://yoursite.com/mywp/wp-content since the wp-content is and always will be in the mywp (aka the subdirectory).

  • http://dla-faceta.pl dla faceta

    usefull, thanks

  • http://www.facebook.com/profile.php?id=720270018 James Cornish ‘Pasty’

    Thank you so much for this! Huge help for a total novice :D

  • Anonymous

    Glad that was helpful! I hope to write more blog posts that are just as useful. Let me know if you have some ideas!

  • Chinese

    What would be a reason if I can see my site very well (themes etc) when I am logged into my account but if I am not logged on (e.g. using another web browser), i see a badly formatted web site. 

    I had the same settings as above except that in my host file in Mac, I have set my web host’s IP to my domain as I have not yet transferred my nameservers. I wanted to be able to clean up my current web site first. 

  • Anonymous

    You’re welcome. Good luck!

  • http://aminearlythereyet.com Stuart Edwards

    Thank you very much for this! Literally spent hours trying to crack this. What a head-ache!

  • Anonymous

    I hope it all worked out. What did you discover the problem was?

  • Anonymous

    Thanks a lot for all this help! I could move my wp successfully and the easy way with all this points.
    However I have problems with one page. I use one page for displaying all contents generated (all posts in one page) within the blog but this is the only one page that isn’t accessed any more after moving the wp to root. I make this by configuring that page on settings->reading->posts pages. after reading the post i still cannot figure out how to make it available again. all the posts are accesible.

    Thanks in advice for any help on this.

  • Anonymous

    Check how you are linking to this page. The link to this page may still be the old link if you linked to it manually via an internal link or from the Appearance > Menus custom menu.

  • Anonymous

    I would have to see your domain URL to tell you what the problem may be. You can email directly via my contact page.

  • jeni

    Successfully moved my site yesterday and followed all your other instructions re sitemap plugin, silence is golden etc. etc. ! I also installed All in One SEO and configured as per site instructions.

    But… when I do a search this morning, this is what happens:

    Index of /

    mydomain.com/Index of / .ftpquota · cgi-bin/ · pathways/Ugh! – how do fix this?thanks….jeni

  • Anonymous

    Hi Jeni,

    Sorry your comment got caught in my spam filter. It looks like your site is working fine now. Let me know if you have any other questions.

    Angela

  • Anonymous

    Jeni – thanks for writing to me about your issue with the Google search. This indexing of your root directory happened before you “moved” WordPress to the root. When you did not have anything in the root directory, the Google bots indexed the root of the site, and found these files and indexed what was in the root at that time. Usually, when you don’t have a site up in the root or are in development, you’ll want to install a blank “Silence is Golden” index.php file as described in my post to prevent Google from reading the directory or block the search engine bots with a robots.txt file that disallows all bots. Since there were no other files to prevent Google from indexing your root directory, then you have this problem.

    If you’ve created an XML sitemap using the Google XML Sitemap plugin, go ahead and create a Google Webmaster Tools account and submit your site and sitemap to Google via the Webmaster Tools.

    In a couple weeks, the Google search results should be different.

    You might want to create and/or edit your robots.txt file in the root directory.

    A good default robots.txt file content for WordPress is:

    User-agent: *
    Disallow: /cgi-bin
    Disallow: /wp-admin
    Disallow: /wp-includes
    Disallow: /wp-content/plugins
    Disallow: /wp-content/cache
    Disallow: /wp-content/themes
    Disallow: /trackback
    Disallow: /feed
    Disallow: /comments
    Disallow: /category/*/*
    Disallow: */trackback
    Disallow: */feed
    Disallow: */comments
    Disallow: /*?*
    Disallow: /*?
    Allow: /wp-content/uploads
    # Google Image
    User-agent: Googlebot-Image
    Disallow:
    Allow: /*
    # Google AdSense
    User-agent: Mediapartners-Google*
    Disallow:
    Allow: /*
    # Internet Archiver Wayback Machine
    User-agent: ia_archiver
    Disallow: /
    # digg mirror
    User-agent: duggmirror
    Disallow: /
    Sitemap: http://askwpgirl.com/sitemap.xml

    (substitute your site name in place of mine above)

  • Funkisockmunki

    You are my savior. Thank you, thank you, thank. After many hours of tinkering with this and a severe break that left a client site down and me freaking out, this helped me put it all back together and get the new site live. Honestly…I am so relieved to have this working and fixed that it’s bringing tears to my eyes. Thank you!!

  • Anonymous

    I’m so glad that the FAQ was useful! Yay! After helping people troubleshoot this process many times, I thought it was deserving of an FAQ to deal with frequently-faced-issues. I’m curious about what specifically was the piece that you needed to fix?

  • Funkisockmunki

    I followed the WP instructions, which immediately broke everything. (Edit the URL settings, then physically move all files the root (which was not possible because the files were all mysteriously locked and immovable). Thinking I had to archive the old site for it to work, I moved it all into an “old” folder and then it was all completely 404, old and new sites. Then of course, the dashboard is inaccessible too. I had to edit the wp-login and wp-config files to reset the URL. Put it all back and then it took me awhile to realize that DUH, the main page of the old site was default.htm, not index.htm, so once I took that away, the new WP site finally showed up.

    I used your instructions to reset the URLs with the MyPHPadmin thing (via GoDaddy) but my URLs in Dashboard settings still show up as uneditable / grayed out. I think I didn’t quite do something right, but for the moment the site is kind of working, giving me a bit more ease to work out the rest.

    Still trying to figure out a few quirks. When I go to cityfruit.org,
    the new site shows up now, but clicking anything internally puts me back into the
    /newsitetest URLs.  Actually, I’m noticing now in settings that both URLs are both reset to /newtestsite. Hmmm…

  • Anonymous

    Yes, unfortunately the instructions on WordPress.org for “moving” WordPress make it so much more complicated and difficult than it needs to be and a total nightmare, because to “move” WordPress from the subdirectory to the root does not require actually “moving” WordPress. Tell me now, where are your WordPress files located? Are they in the root directory or are they in the subdirectory? You want the phpMyAdmin settings (per my FAQ) to show the directory where the WordPress application is currently located. If it’s the root, then both those settings in phpMyAdmin should be set to http://cityfruit.org not the subdirectory. Then, you do need to login to WordPress and go to Settings > Permalinks and click SAVE CHANGES to get the .htaccess file to rewrite itself or you can edit this file via the GoDaddy File Manager (FTP Access) and copy in the text in my FAQ. If you write to me via my Contact form, I can give you more specific instructions depending on what the current situation is. Send me screenshot of your directory, index.php file contents and .htaccess file contents.

  • Funkisockmunki

    I guess I didn’t have an .htaccess file!

    I had to make one, which contains this…

    # BEGIN WordPress

    RewriteEngine On
    RewriteBase /newsitetest/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /foo/index.php [L]

    # END WordPress

    And things were still very screwed up if I didn’t have default permalinks on, or if I uploaded the webconfig file. Something was amiss. Apparently GoDaddy has some goofy Windows Grid server something or other and I needed this magic code in my web.config file:

    http://wordpress.org/support/topic/godaddy-iis-and-removing-indexphp-in-url?replies=20#post-1507468

    Viola. It instantly all snapped back to normal awesomeness.

    **Thank you WPGirl for your support, for having this very helpful article, and for keeping up with the replies and answering.**  You rock.

    cityfruit.org is now happy and fully live.

  • Anonymous

    Oh! When you said you were on GoDaddy, I assumed you were on Linux hosting, which is much preferable for WordPress. Windows hosting, as I wrote in my FAQ can result in issues with “pretty permalinks” and is why you got “page not found.” I will had the link you provided to the FAQ page for people who, God forbid, are hosting GoDaddy Windows server. Ugh. Though, in the .htaccess above not sure why /foo is in the rewrite rule. That technically shouldn’t be there. Anyway, glad it’s all working now!!!

  • Phillip Berkun

    This is an excellent FAQ to go with your tutorial: http://askwpgirl.com/how-do-i-move-wordpress-from-a-subdirectory-to-the-root-directory/?doing_wp_cron

    However, toward the bottom you give the following information:

    “Typically, I will search for <a href=”http://yoursite.com/mywp

    and replace with <a href=”http://yoursite.com/mywp

    then I’ll do another search to make sure I didn’t break any image links with <a href=”http://yoursite.com/wp-content

    and replace with <a href=”http://yoursite.com/mywp/wp-content since the wp-content is and always will be in the mywp (aka the subdirectory)."

    Aren't your "search" and "replace" contents in the first two lines exactly the same, i.e., "<a href=”http://yoursite.com/mywp" effectively not changing anything. Did something get cut accidentally during cut and paste, or is the whole idea to search and replace the same content? Or am I missing the point entirely?

    Thank you again.

  • Anonymous

    Ah! You are so right. I’ll fix that. Thanks!!!

  • Anonymous

    Hi Sylvain, it looks like you have multiple RSS feeds on your site for different categories. Burning different categories with Feedburner can be a bit tricky and the plugin I recommend on this blog post is not the best for multiple category feeds.

    Please see this blog post and see if it solves your problem: http://suejames.com/category-feeds-with-wordpress-and-feedburner/

  • Iamanesha

    First thank you for doing this!!  I ran into a problem though on moving my site from wordpress to startlogic. Just got to step 2 above. Now i cannot login to my wordpress dashboard, i just get page not found.  I cannot find any help.  Hoping you have some.

  • Anonymous

    These instructions are for displaying pages for a site via the root URL when WordPress is installed in a subdirectory. It sounds like you are wanting to MOVE WordPress from one subdirectory to another subdirectory, so when you made the changes to the General Settings, you now told WP that it lives somewhere it doesn’t, that’s why you can’t login. If this is not the case, I just want to make sure that you read the ORIGINAL post for this FAQ first and NOT used this FAQ post as a starting point. Please read http://askwpgirl.com/how-do-i-move-wordpress-from-a-subdirectory-to-the-root-directory/ FIRST. The post you are commenting on right now does not contain step-by-step instructions — only answers to frequently asked questions and issues.

  • Iamanesha

    I believe you are correct.  I went to the moving.  So i changed the wordpress address URL.  Oh no, any idea how i fix this?  or roll it back.  Because i sure can’t find the dashboard anymore.

  • Anonymous

    You will need to long into your web host’s control panel and access the database via phpMyAdmin. See the instructions in this post, however, you will want to change the two fields that contain the URL to your site to correct URL including the old subdirectory name. If you need the database username and password, it can be found in your wp-config.php file which you can download via FTP or through the web host’s file manager.

  • http://arwym.com Jessica M. Vázquez

    Hello, Angela.

    I have a problem that is not described in this FAQ. basically, in my case, instead of not being able to view pretty permalink pages, I cannot view the home page. The home page keeps appearing in the subdirectory where the WordPress files are placed, rather than in the root directory. The site I am talking about is is http://freebirdgames.com. You will see that trying to load that page gives you either a blank page or a 500 error. Now, if you go to the WordPress subdirectory, the home page will load there just fine.

    I have verified that the .htaccess file and index.php files have the right code/settings in them. My confusion comes from slightly different instructions in the WordPress Codex page regarding this process. That page, if I read correctly, instructs me to copy, not move, both index.php and .htacces files into the root directory, and leave the originals where they are, THEN modify the index.php file in root. I did everything as instructed, and here I keep having this problem. I don’t know where I failed.

    Do you know what could be causing this? I am using the redirection and Super WP-Cache plugins, but even after being deactivated, the problem persists.

    Thank you in advance.

  • J.P. Kallio

    Great site:-) Some of the most straight forward wordpress advice I’ve seen. 
     Just a quick question, I just moved the index.php file from the wordpress directory to the main directory. I did all the steps you adviced. Now the page opens all messed up and I can’t log in to my admin area… The only thing I could imagine something went wrong would be the general settings, as instead of the error message I got just a blank page… Now here is the problem: my web provider is Gate.com and they only say that the phpMyAdmin is going to be available in the future… Any ideas? Thanks

  • Anonymous

    When you go to the home page, if you did everything correct, the site should come up. Keep in mind you still need to login to your site via the subdirectory. Please email me your index.php file via my contact form and give me your site URL.

  • Anonymous

    Hi,

    So, right now, you do NOT have the index.php file per the instructions in the root (aka www or public_html) directory of the site, so you did not follow the instructions. Please follow the instructions for moving and modifying the index.php first. Don’t COPY the index.php file but MOVE it to the root directory and modify it correctly, and modify your general settings. Turn OFF redirection plugin and Super Cache. Those can both definitely screw things up during this process. I’ll add that to the FAQ.

  • http://arwym.com Jessica M. Vázquez

    Hello,

    After I left that message to you here, I had to revert the site to its old version, because I couldn’t leave it like like that. However, I DID have the index.php edited as instructed both here and at the WordPress codex article. I changed the include’s path to point to the subdirectory where my WP installation was.

    Now, today I tried this again, this time only moving index.php to the root and editing, and making the necessary change in the database to make sure that the Site’s address was freebirdgames.com, and the WordPress address was left intact.

    I didn’t move anything else.

    I also made sure that the WordPress Super Cache and Redirection plugins were deactivated before starting the process. And after moving the file and doing all of that, I went into the permalinks page and updated it.

    Everything, to no avail. This time it was worse, however, since I could not load ANY pages at all: not the home page, not the interior pages. I could only access the admin panel.

    I kept seeing the 500 Internal Error in the home page, but 404 Not Found errors in the other pages.

    I am beginning to wonder if this has something to do with the Web host. The site is hosted on Bluehost. Do you know of any similar cases with sites hosted by Bluehost?

  • Anonymous

    Hi Jessica,

    Blue Host never has issues with this. I’m sure it’s just a little typo or mistake. Please email me my contact form, and let’s talk. I can probably help you, and it will likely take about 5 minutes.

  • Anonymous

    Thanks so much for this! Worked great – quick question though: I successfully moved my blog from the subdirectory of http://www.myblog.com/wordpress to the root directory of http://www.myblog.com. I would now like to create a sitemap for my site – do you know if I should create the sitemap.xml file in the subdirectory, or in the root directory. Any thoughts? Thanks!!

  • Anonymous

    When you install your sitemap plugin, just as with ALL of your other pages, the sitemap.xml file will display from the root. There is nothing you need to do special about this because ALL pages and ALL posts will display from the root per the General Settings of the SiteURL. I recommend the Google XML Sitemaps plugin.

  • http://arwym.com Jessica M. Vázquez

    Hello, Angela.

    Thank you very much for responding. I just resolved the problem. There was a conflicting PHP configuration file in the root, which I hadn’t dared to move before. Once I moved this file away, everything started working. I should have removed that file from the beginning.

    I have been working with WordPress for some time now, and this had never happened to me before. I should have guessed.

    Again, thank you. Your advice and support are very valuable.

  • Anonymous

    I had a similar problem where someone deleted their .htaccess file but the .htaccess file called for the php version, and nothing worked. They thought it was this process but it was because they disabled php 5. LOL. I’m glad you figured it out. It’s always something.

  • Stockton

    Thank you for giving us these explainations, however, I can not find my issue (r perhaps I just don’t know where to look). I moved my WP site from a subdir to root, and everything I new to change, was changed.  Now, the post thumbail is a broken link, and when I look at the code, it’s adding an additional / to the string ( for example: /home/servername/siteurl//wp-content/uploads/2012…)  How and where can I fix this.

  • Anonymous

    According to my instructions, you should NOT MOVE WordPress from subdirectory to root. You should ONLY move the index.php file NOT all of the WordPress files.

    You also may have made an ERROR in your General Settings and put a FORWARD SLASH / AFTER THE URL in the General Settings, and that will cause two slashes/ to appear and break everything. So, you can contact me via my Contact form and send me screenshots after I reply to see what you have in your General Settings and where you put all your files.

  • Allie Wist

    Hi,

    Same problem! I am pretty sure that I just changed the WordPress URL instead of the Site URL, but I use GoDaddy for hosting and I have no idea how to find the options panel you describe!

  • Anonymous

    The key was to change the Site URL, not the WordPress URL. So, maybe that’s the problem. On GoDaddy, go to My Account, then click Web Hosting and click the LAUNCH button. This will take you to your Hosting Control Center aka Hosting Dashboard. From here, you can click the FTP File Manager button and open the wp-config.php file for your WordPress installation (in the subdirectory where you installed WordPress) to get the database username and password.

    Then, from the green tab at the top called Databases choose MySQL. You will see the name of your database, and you will want click the Manage via phpMyAdmin link. Then per this FAQ I wrote you can make sure the site_url and home url are correctly. Unfortunately the database field names don’t correspond to the field labels in the WordPress General Settings, so it’s a bit confusing, but look at my screenshots carefully and verify that everything is okay. Let me know then if you can login to WordPress. You will login at your subdirectory URL always since that’s where the application still resides. Also, are you on Windows or Linux hosting at GoDaddy? Someone who wrote to me on this blog had a heck of time doing this process with Windows hosting, so we got her switched to Linux.

  • tigere rangwani

    Thank you very much for your initial post and all the follow up you have done. In my case everything worked smoothly except that my website now prompts a login to the visitor. :(

    Its something like http://www.mywebsite:80 requires login. 

    I can log on using admin credentials, but this is a public page, no login needed. I have not seen anywhere you have addresses such issue, please help if possible.

  • Anonymous

    Hi,

    I sent you an email to follow up. Are you on a Windows or Apache server? Can you check the contents of your root of the website (ie the www or public_html or httpdocs folder) and be sure that there are no other files in there that might be interfering with the WordPress index.php file? Sometimes people have their old sites files in there or some other odd files that might be redirecting the visitor to the site. Also, check the contents of your .htaccess file in both the root and subdirectory. Perhaps email me the contents of the .htaccess file. It’s possible that the root directory .htaccess file has a redirect in it. I notice some problems when people previously had other software installed in the root directory that had written to the .htaccess file in the root, so that it messes things up for you. You should only have the following in the .htaccess files in the root and subdirectory (though the subdirectory .htaccess is usually optional):

    # BEGIN WordPress

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    # END WordPress

    See http://codex.wordpress.org/Using_Permalinks#Creating_and_editing_.28.htaccess.29 for more info.

  • pandc

    Hi I had the same issue as Murray (posted 5 months ago) and wanted to know how it was resolved. I followed your directions semi-successfully (:)) moved mydomain.com/main to mydomain.com but all the formatting is gone.  I tried to log into  WP and it gives me the broken formatting as well but then
    it doesn’t go past the main screen –I took a look at the URL and

    http://mydomain.com/main/wp-login.php redirects to http://mydomain.com/wp-login.php and there’s nothing there. So I’m unable to get to the WP Dashboard.I’ve double checked in php Admin wp-options and everything is correct and my .htaccess file seems to be ok too:
    RewriteEngine OnRewriteBase /RewriteRule ^index.php$ – [L]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule ./index.php [L]

    I go the the site and the pretty permalinks are correct (i.e. use mydomain.com/prettypermalink) but 404 errors are loading. I know I’m missing something obvious don’t see what.  Thanks so much in advance! 

  • Anonymous

    Hi,

    I don’t see any comment from Murray 5 months ago, so I’m not sure how that was resolved. Please check this FAQ for the information on how to check your settings in the wp_options table in the database via phpMyAdmin. Be sure to check the index.php file you moved to the root per this FAQ and make sure the text you edited is EXACTLY correct. You can email me via my contact form with the website URL. You should be logging in via mydomain.com/subdirectoryname/wp-admin.

  • Anonymous

    Ah! Found Murray’s comment — his .htaccess was messed up, but that just made is permalinks not work, it didn’t effect his ability to login to the site. You should login if you can and click Save Changes in the Settings >Permalinks page. Not clear to me if you’re able to login to the WP dashboard or not, so let me know!

  • pandc

    Hi! Thanks so much for getting back to me. Yes, I’m unable to log into the WP Dashboard. I tried putting everything back, and its still an unformatted mess.  I’ll email you directly. Your site is such a find in the quagmire of WP. Kudos on a great job! Talk soon :)

  • Anonymous

    Yes, email me. I can figure these things out pretty quickly.