WordPress.org

Forums

[resolved] WordPress in own directory problem (19 posts)

  1. Will Taft
    Member
    Posted 7 years ago #

    The way my WordPress installation is set up is WP is in a directory called wordpress under my root directory. Both the .htaccess and index.php files are in the WordPress subdirectory. There is an index.html file in the root that redirects to the index.php file in the WordPress subdirectory.

    This works ok, but is not the way the Codex instructs on installing WP in it's own directory. The Codex does not use the index.html file to redirect, it has both the index.php and .htaccess files in the root. When I changed things following the codex instructions, my home page would work, but not any of the internal site links to posts and pages. I thought this was because permalinks needed to be updated, but doing that in the options admin panel did not fix the page not found errors.

    I put everything back the way it was and all works again, but I really would like to have it set up the way recommended in the codex. Can anyone suggest what might be the problem?

    Thanks.

  2. rudolf45
    Member
    Posted 7 years ago #

    it has both the index.php and .htaccess files in the root.
    Half true...
    Read the instructions again :)
    http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory
    #1 and #6 dont' apply in your situation.

  3. Will Taft
    Member
    Posted 7 years ago #

    Ugh! I am being dense or just not understanding your help. Sorry. I see that 1 and 6 don't apply in my case and I left them alone. But 7 says:

    "Copy the index.php and .htaccess files from the WordPress directory into the root directory of your site (Blog address)."

    So when I do this step, after renaming the index.html file that was redirecting, both index.php and ,htaccess are then in the root directory. Is this wrong?

    And by the way, Rudolf, even though I have said it before, I really appreciate the patient help you offer here. I know it can be frustrating trying to get us newbies to understand some of this stuff. Especially those of us that are on the AARP mailing list! :-o

  4. Will Taft
    Member
    Posted 7 years ago #

    Or maybe... "Copy the index.php and .htaccess files from the WordPress directory into the root directory of your site (Blog address)." means literally make a copy, leaving the originals where they were? I moved them. Or am I groping for what I am missing and getting further befuddled?

  5. MichaelH
    Member
    Posted 7 years ago #

    Don't forget the index.php file in your web root, with WordPress files in a folder called wordpress, will look like this:

    <?php
    /* Short and sweet */
    define('WP_USE_THEMES', true);
    require('./wordpress/wp-blog-header.php');
    ?>
  6. Will Taft
    Member
    Posted 7 years ago #

    Yes, thanks for the reply Michael. I did get that from the codex and had that correct. Do you understand Rudolph's reply and my confusion? I obviously have something wrong, but I am very good at following instructions. I though I did exactly what the codex said to do, but am unsure about step 7 which says to "copy" the .htaccess and index.php to the root directory. Literally taken this would mean that I should have a copy of each, one set in root and the other set in root/wordpress. I did not do that, I moved the two files from /wordpress to root. Is this my error?

  7. MichaelH
    Member
    Posted 7 years ago #

    Delete wordpress/.htaccess

    Make wordpress/index.php read:

    <?php
    /* Short and sweet */
    define('WP_USE_THEMES', true);
    require('./wp-blog-header.php');
    ?>

    Make index.php in root as I said above.

  8. rudolf45
    Member
    Posted 7 years ago #

    means literally make a copy, leaving the originals where they were?

    Yes :)

  9. Will Taft
    Member
    Posted 7 years ago #

    means literally make a copy, leaving the originals where they were?

    Yes :)

    Although Michael says: Delete wordpress/.htaccess

    So, it probably works either way as long as there is .htaccess in root and the index.php files are in both places and read as directed by the codex and Michael?

    I'll try it again tomorrow and hopefully come back to mark this as resolved!

    Thanks!

  10. Root
    Member
    Posted 7 years ago #

    Just to clarify. There needs to be an index.php in whatever directory WP is being served from. Index.html needs to be deleted.

  11. Will Taft
    Member
    Posted 7 years ago #

    OK, no joy. Did what was instructed above and in the codex and only the home page displays correctly. All internal links are not found. I updated the permalink structure from the options panel, no difference. I tried setting permalinks to default, no difference. I have options>general> wordpress address (URL) set to http://willtaftdotcom/wordpress and Blog address set to http://willtaftdotcom.

    The index.html file that was in root is gone.

    The index.php file in root reads:
    <?php
    /* Short and sweet */
    define('WP_USE_THEMES', true);
    require('./wordpress/wp-blog-header.php');
    ?>

    The index.php file in /wordpress reads:
    <?php
    /* Short and sweet */
    define('WP_USE_THEMES', true);
    require('./wp-blog-header.php');
    ?>

    I moved the .htaccess file to root, but did not change anything in it. That reads:
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    What on earth am I doing wrong?

  12. Will Taft
    Member
    Posted 7 years ago #

    Wait a minute.... Just now, 30 minutes after doing the steps in the last post, things seem to be working. Let me click around and try all the pages etc. and I will post back.

    Maybe I was too impatient. I expected the changes to take right away. Is it logical that they would be delayed?

  13. Will Taft
    Member
    Posted 7 years ago #

    Well everything does seem to work except my feed is now broken. The wp-rss.php and wp-rss2.php files are still in the wordpress directory. But when I try to subscribe in Google Reader or even use feedburner to locate the feed, a 404 error is returned.

    I guess this is a result of setting up wp in it's own directory. What do I need to do to fix this?

  14. rudolf45
    Member
    Posted 7 years ago #

    Your feeds work!
    http://willtaft.com/feed/
    (Have no idea what did you mess up with feedburner...)

  15. Will Taft
    Member
    Posted 7 years ago #

    When I made to directory changes, the feedburner feed would no longer work. I need to get that resolved, but wanted to first make sure the feed was indeed available on my site.

    No matter how I try to access the feed, I get the feedburner error. I have tried directly through Google Reader, also by going directly to feedburner and telling it to get the feed from my site. It can not find a feed. Even clicking on the link in your message above, I get only a feedburner error. I have now deleted my feedburner setup and that makes no difference. I also went to the FeedShow site, but that tool also tells me that there is no valid feed available.

    How did you determine that my feed works? I would like to know how to reach the same conclusion myself, not for this time, but for any possible future issues.

    Thanks again!

  16. rudolf45
    Member
    Posted 7 years ago #

    How?
    I could see them nicely in FF and I could add them to my Google Reader.
    Not the link you have on your site but the one I posted above.
    (try to clear your cache)

  17. Will Taft
    Member
    Posted 7 years ago #

    Duh... sorry it was the cache of course. My brain these days gets so overloaded with learning all this, I guess I forgot the simple cache clearing step. Now I can see them using your link and will just have to fix the feedburner stuff.

    Thanks again.

  18. jrothra
    Member
    Posted 7 years ago #

    I'm curious about a question asked earlier. When putting WordPress in its own directory, does it take a while for everything to filter through (at least 30 minutes for WT) or should the changes be seen immediately?

  19. jrothra
    Member
    Posted 7 years ago #

    I've waited about an hour and no change on my site's look... it still doesn't look right, as discussed here.

Topic Closed

This topic has been closed to new replies.

About this Topic