Forums

[resolved] setting url towards /blog/ directory (14 posts)

  1. shilohpostcards
    Member
    Posted 2 months ago #

    Where I'm at:

    Networksolutions is host:
    Root Directory by Default is htdocs

    Servers set to point http://www.shilohpostcards.com to htdocs
    shilohpostcards.com to htdocs

    WordPress installed in subdirectory in htdocs named blog

    wordpress wp-config.php set wp address to shilohpostcards.com/blog
    url address to shilohpostcards.com/blog

    In root (htdocs) there is an index.php file that reads:

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

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum's parser.]

    Also in root is htaccess file which reads:

    Options -Indexes

    # 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

    (I don't remember if these were already in htdocs or if I copied and put them there, I've confused myself)

    Using http://www.shilohpostcards/blog/ in a browser works
    I want however for http://www.shilohpostcards in a browser to go directly to /blog/

    I've read everything and screwed things up several times
    including locking myself out of wp admin panel
    (which is why addresses are now hard coded in wp-config.php)

    I know I should be able figure this out but I scared myself and
    now I just want help from those who know what they are doing instead
    of crossing my fingers and hoping for the best.

    I need to know what the wp-config.php addresses should read?
    Then can I go into network solutions and change settings from htdocs to htdocs/blog (they offer that as option)?
    If I do these, do I still need the index.php and htaccess files in htdocs and are the ones there correct?

    I tried to provide all information relevant.

    Thank you

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

  3. shilohpostcards
    Member
    Posted 2 months ago #

    I've read that a dozen times.

    (sorry I didn't post code correctly above using code button)

    This is the hierarchy as shown in FTP

    /
    htdocs
    CG-BIN
    Backup

    Next Level
    /htdocs/
    index.php
    htaccess
    BLOG (this is where WP files all reside)

    Doesn't this mean that WP already resides in it's own directory with htdocs as the root?

  4. shilohpostcards
    Member
    Posted 2 months ago #

    I'm thinking this shouldn't be hard.

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

    Is WordPress installed in the /blog sub-folder? Is the /blog sub-folder inside htdocs?

  6. shilohpostcards
    Member
    Posted 2 months ago #

    Yes

    htdocs is the root directory
    WP is installed in a folder called BLOG inside htdocs

  7. shilohpostcards
    Member
    Posted 2 months ago #

    Network Solutions gives me the following options for pointing my domain name to.

    /htdocs
    /htdocs/blog
    /htdocs/blog/wp-admin
    /htdocs/blog/wp-content
    /htcods/blog/wp-includes

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

    Then Giving WordPress Its Own Directory will work perfectly providing you follow each step slowly and carefully.

  9. shilohpostcards
    Member
    Posted 2 months ago #

    Following directions for Giving WP its own directory using pre-existing subdirectory install

    1) I'm to leave WP address at shilohpostcards/com/blog but change site address to shilohpostcards.com

    2) I already moved index.php and .htaccess to my root (current code in first post)

    3)I need to MOVE wp-config.php file to root

    4) I need to edit index.php to add /blog/ before the wp-blog-header.php line (save and upload)

    5) login at http://shilohpostcards.com/blog/wp-admin/

    6) I have no idea about the permalinks?? current setting is POST http://shilohpostcards.com/blog/sample-post/
    (do I just leave this as is ??)

    So if I do the above in order, then I don't need to change where my domain name points to on networksolutions?

    After messing up so bad the other day and locking myself out of WP entirely, I'm needing a little hand holding.
    I appreciate your time and help.

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

    2) I already moved index.php and .htaccess to my root (current code in first post)

    No! The instructions clearly state "Copy (NOT MOVE!".

    3)I need to MOVE wp-config.php file to root

    Again, the instructions clearly state "Copy (NOT MOVE!".

    I have no idea about the permalinks?

    Once the move has been completed and you can log back into your wp-admin again, go to Settings -> Permalinks and just re-save your current permalink structure.,

  11. shilohpostcards
    Member
    Posted 2 months ago #

    Sorry, I meant to say I COPIED for the index.php and htaccess files.

    However the instructions in line 5 says 5. Move (DON'T COPY) the wp-config.php file to your root directory.

    which is why I'm double checking everything before I do anything again.

  12. shilohpostcards
    Member
    Posted 2 months ago #

    So here's where I am in the planning stage.

    Following directions for Giving WP its own directory using pre-existing subdirectory install

    1) I'm to leave WP address at shilohpostcards/com/blog but change site address to shilohpostcards.com

    2) I already COPIED index.php and .htaccess to my root (current code in first post)

    3)I need to MOVE wp-config.php file to root (Is it MOVE like instructions say?)

    4) I need to edit index.php to add /blog/ before the wp-blog-header.php line (save and upload)

    5) login at http://shilohpostcards.com/blog/wp-admin/

    )6 simply re-save current permalink structure

    So if I do the above in order, then I don't need to change where my domain name points to on networksolutions?

  13. shilohpostcards
    Member
    Posted 2 months ago #

    Network solutions just sent me these instructions.

    http://www.networksolutions.com/support/how-to-change-wordpress-url/

    If I am reading all this correctly then I would need to...

    1) remove the index.php and htaccess files from my root (where I copied them the other day)

    2) in wp-config change home url to http//:shilohpostcards.com and the site url to http://shilohpostcards.com/blog (with no / at end)
    And I will leave this wp-conf file where it is.

    3) then I go into Network solutions and point domain url to /htdocs/blog/

    Will this work?

  14. shilohpostcards
    Member
    Posted 2 months ago #

    Took the plunge, MOVED wp-conf per instructions on codex page did all the rest per codex instructions giving wordpress it's own directory.

    All works fine....

    Now I just gotta get Yith to help me with display issues on different browsers for my MayaShop Theme.

Reply

You must log in to post.

About this Topic

Tags