WordPress.org

Ready to get started?Download WordPress

Forums

Moving URL problems (10 posts)

  1. oneofseven
    Member
    Posted 2 years ago #

    I am trying to get the /WP out of my URL. I was following the directions on the "http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory" page.
    The directions say:
    8. Open your root directory's index.php file in a text editor
    9. Change the following and save the file. Change the line that says:
    require('./wp-blog-header.php');
    to the following, using your directory name for the WordPress core files:
    require('./wordpress/wp-blog-header.php');

    However, my index.php does not have this code.
    This is the file:

    [ 103 lines of code moderated. For more than 10 lines of code please use pastebin.com instead. ]

    What am I suposed to change?

  2. KristinCodesWP
    Member
    Posted 2 years ago #

    This looks like the index.php file for the wp-admin folder. They're referring to the WordPress main index.php file.

  3. oneofseven
    Member
    Posted 2 years ago #

    Ah, ok. I will try to find this. Thank You. I am new and learning.

  4. KristinCodesWP
    Member
    Posted 2 years ago #

    No problem. When you download WordPress, it is the index.php file in the main folder. So if you installed WordPress in the WP folder, it'd be located at WP/index.php

    I believe in their directions, though, for giving WordPress it's own directory, you are supposed to copy that file over to your root directory (not the WP/ folder, your main web folder) and make the change to the file located there.

  5. oneofseven
    Member
    Posted 2 years ago #

    I found it. However, I want there is no /***/ file to change it to. The site was http://www.hobbyfarmers.org/wp I am trying to change it to http://www.hobbyfarmers.org
    What do I change?

  6. KristinCodesWP
    Member
    Posted 2 years ago #

    In the index.php file located at hobbyfarmers.org/index.php, find this:

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

    change it to:

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

  7. oneofseven
    Member
    Posted 2 years ago #

    Thank you. I changed it and can find the site now. However, I cannot login or get to the dashboard. Is ther a backdoor to it?

  8. oneofseven
    Member
    Posted 2 years ago #

    I was an idiot. I changed both WordPress address and the site address in the Dashboard settings page. I should have just changed the Site URL option. Is there an easy way to just change the WordPress address back without undoing everything?

  9. KristinCodesWP
    Member
    Posted 2 years ago #

    Put this in the wp-config.php file:

    define('WP_HOME','http://example.com');
    define('WP_SITEURL','http://example.com');

    Change the appropriate URLs.

    Also, your login will still be in the wp/ folder so you'd go to http://www.hobbyfarmers.org/wp/wp-login.php to log-in

  10. oneofseven
    Member
    Posted 2 years ago #

    Thank You. I had a brain cloud of the methane variety. I went to the PHPmyadmin and changed the directory in the options database. Then I deleted the index.php and htaccess in my new directory. This allowed me to access the Dashboard so I could start over. Thanks for your help. The site is working now.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags