Forums

[resolved] Problem accessing admin cp when giving WordPress Its own directory (24 posts)

  1. kidcollect
    Member
    Posted 10 months ago #

    I've followed the instructions this tutorial:

    http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

    My site now display correctly on http://www.mydomain.com. However, when I try to access my admin panel via:

    http://www.mightyhumble.com/blog/wp-login.php

    I get redirected to:

    http://www.mydomain.com/blog/index.php/wp-login.php

    note: 'blog' is the sub directory where all the WP files are

    Can anyone shed some light on what I've done wrong? I'm sure it's something simple/stupid.

    Thanks in advance

    Chris

  2. esmi
    Theme Diva & Forum Moderator
    Posted 10 months ago #

    What did you use for your WordPress Url in Settings -> General?

  3. kidcollect
    Member
    Posted 10 months ago #

    Yes I change those WP url and site URL via Settings > General.

  4. esmi
    Theme Diva & Forum Moderator
    Posted 10 months ago #

    What did you change them to?

  5. kidcollect
    Member
    Posted 10 months ago #

  6. esmi
    Theme Diva & Forum Moderator
    Posted 10 months ago #

    Site url?

  7. kidcollect
    Member
    Posted 10 months ago #

    The site appears to have disappeared too now. So I'm not sure what good the site url will be in debugging this now. However, it's http://www.mightyhumble.com

  8. esmi
    Theme Diva & Forum Moderator
    Posted 10 months ago #

    I can see the site fine but something is definitely adding index.php onto the end of your WordPress urls. Check your custom permalinks & your .htaccess file.

  9. kidcollect
    Member
    Posted 10 months ago #

    I can't access the admin panel or see the site. So I presume I'd have to edit the htaccess file manually the permalinks files too?

    Can anyone tell where I would find the relevant permalinks code? Also what a standard install code for the WordPress htaccess file look like?

  10. esmi
    Theme Diva & Forum Moderator
    Posted 10 months ago #

    You could try renaming your WordPress ..htaccess file to .htaccess-old via FTP.

  11. Ipstenu
    Half-Elf Support Rogue & Mod
    Posted 10 months ago #

    I SUSPECT it's because the folder is named blog and you ALSO have a page with the same name:

    http://www.mightyhumble.com/blog/

    You can't have both, you know. As for how to fix it....

    I would rename the blog folder to wp-blog or something you're never gonna use as a page.

    Then go in and add this to your wp-config:
    update_option('home','http://example.com/wp-blog');

    AND edit your index.php and .htaccess to point to the correct locations.

  12. kidcollect
    Member
    Posted 10 months ago #

    @esmi thanks for the tips.

    @Ipstemu Thanks for the suggestion. I understand most of what you're saying although I'm not sure how to add to/updated the wp_config?

    What's the best way to do that? Do I need to edit it via PHPMyAdmin?

    I'm a bit of n00b as you may have noticed!

  13. Ipstenu
    Half-Elf Support Rogue & Mod
    Posted 10 months ago #

    wp-config.php is a file in the /blog folder. Edit it with a plain text editor. Add that line up above 'Stop editing here' :)

  14. kidcollect
    Member
    Posted 10 months ago #

    Right I've done all that! I still can't see my site. I think I might be having some weird caching issue. I've deleted my cookies etc. Still no jo. Can anyone else see the site?

  15. esmi
    Theme Diva & Forum Moderator
    Posted 10 months ago #

    No - I'm getting a blank page now.

  16. Ipstenu
    Half-Elf Support Rogue & Mod
    Posted 10 months ago #

    Weirdly ... http://www.mightyhumble.com/blog/ works

    http://www.mightyhumble.com/ is what looks like an index.html page.

    http://www.mightyhumble.com/blog/?p=1 is a 404

    Source code says you still have WordPress in a /blog/ folder.

    http://www.mightyhumble.com/blog/wp-content/themes/twentyeleven/style.css

  17. kidcollect
    Member
    Posted 10 months ago #

    @Ispstenu

    Hi, I tried the fix suggested by changing the folder etc but couldn't get it working. So I decided to roll back to earlier version of my site which would get back into the admin. However, I still to have a broken admin login with no CSS.

    http://www.mightyhumble.com/blog/wp-login.php

    If I try and login it sends be to this url

    http://www.mightyhumble.com/blog/index.php/wp-login.php

    Trying to figure out what's going on at the moment.

  18. kidcollect
    Member
    Posted 10 months ago #

    So this is where I am now. If anyone can suggest to get this site working it would be greatly appreciated.

    All the wordpress files are in a folder in the public dir called /blog

    In here is my index.php which currently looks like this

    http://pastebin.com/GG4pEiqX

    and my htaccess file which looks like this

    http://pastebin.com/RJicFzb4

    In the db:
    site url: http://www.mightyhumble.com/blog/index.php
    home: http://www.mightyhumble.com

  19. esmi
    Theme Diva & Forum Moderator
    Posted 10 months ago #

  20. kidcollect
    Member
    Posted 10 months ago #

    Thanks esmi, That's got the admin panel up again. Which is a step in the right direction. I think Ipstenu might be right about the blog page clashing with the directory page of the same name too. So I might have a go at trying his suggested fix again now.

  21. kidcollect
    Member
    Posted 10 months ago #

    Update

    I seem to have been able to get my site running again now, albeit a bit broken! Thanks for getting me this far.

    I've moved the main wordpress files to a new sub directory (not called blog) and have it running with the index and htaccess files in the root and seemingly resolving correctly.

    The problem I've got now and hopefully this is the final one! Is that none of the images I uploaded and included in the site before moving it are displaying.

    Can any give me a idea of if it's possible to fix this without uploaded all the images again individually?

  22. esmi
    Theme Diva & Forum Moderator
    Posted 10 months ago #

    The image urls in the database are probably still pointing to the old /blog sub-folder. You could try using the Search & Replace plugin to correct those urls but I strongly recommend that you backup your database before trying any replacements.
    http://wordpress.org/extend/plugins/search-and-replace/

  23. kidcollect
    Member
    Posted 10 months ago #

    Thanks esmi. I'll give it a go.

  24. kidcollect
    Member
    Posted 10 months ago #

    All working again. Thanks everyone!

Reply

You must log in to post.

About this Topic