• Resolved robertp852

    (@robertp852)


    I’ve got WordPress installed in my public_html folder in a subfolder called wp. I’ve designed my new site and now want my main domain to point to it. In Dashboard>Settings>General I’ve changed the Site URL from http://www.robertpetkoff.com/wp to simply http://www.robertpetkoff.com. I copied the index.php file from the wp folder into the public_html folder and changed the line from:

    require( dirname( __FILE__ ) . ‘/wp-blog-header.php’ );
    to
    require( dirname( __FILE__ ) . ‘/wp/wp-blog-header.php’ );

    I turned on view hidden files and saw no .htaccess in the wp folder, but there is one in the public_html folder with the following contents:

    #AddHandler application/x-httpd-php4 .php
    # BEGIN WordPress

    # END WordPress

    Now when I go to robertpetkoff.com I still see the old, rather embarrassing site and not my shiny new one. What the heck am I doing wrong? (If i change the name of my index.html file I just get a blank page)

    Thanks! Robert

Viewing 4 replies - 1 through 4 (of 4 total)
  • Without seeing all the files/setup, this is a tough issues to help with. The best we can do is point you to the codex on how to do so properly:

    http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

    I’ve got WordPress installed in my public_html folder in a subfolder called wp. I’ve designed my new site and now want my main domain to point to it.

    I would guess you have a situation similar to my own at BlueHost where a Primary Domain can only be assigned to public_html. If so, and while it might be possible to do all that tricky stuff with WordPress, I suspect you will find this much simpler while leaving WordPress exactly as it first was in its natural state:

    ## from https://my.bluehost.com/cgi/help/347#redirect
    # .htaccess main domain to subdirectory redirect
    # Do not change this line.
    RewriteEngine on
    # Change example.com to be your main domain.
    RewriteCond %{HTTP_HOST} ^(www.)?example.com$
    # Change 'subdirectory' to be the directory you will use for your main domain.
    RewriteCond %{REQUEST_URI} !^/subdirectory/
    # Don't change the following two lines.
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    # Change 'subdirectory' to be the directory you will use for your main domain.
    RewriteRule ^(.*)$ /subdirectory/$1
    # Change example.com to be your main domain again.
    # Change 'subdirectory' to be the directory you will use for your main domain
    # followed by / then the main file for your site, index.php, index.html, etc.
    RewriteCond %{HTTP_HOST} ^(www.)?example.com$
    #RewriteRule ^(/)?$ subdirectory/index.html [L]
    ## index.php for WordPress
    RewriteRule ^(/)?$ subdirectory/index.php [L]

    Add your ‘#AddHandler application/x-httpd-php4 .php’ line at the top of that and try it in public_html, and then you will ultimately also have a separate .htaccess for WordPress in your installation’s sub-folder.

    Thread Starter robertp852

    (@robertp852)

    Hi Leejosepho,

    I think you might be right. I’m using Hostmonster. I’ll give this a try tomorrow and see if it works. I appreciate the help!

    Cheers,

    Robert

    Thread Starter robertp852

    (@robertp852)

    Well, I got it working. First I tried editing the .htaccess file with your suggested code Lee with changes for my particular site and directory, but it didn’t work. So I went back to the drawing board and re-copied my index.php file to my root directory and amended the .htaccess file with the code for “Pointing your home site’s URL to a subdirectory”

    (RewriteEngine On
    RewriteCond %{HTTP_HOST} ^(www.)?YourDomain.com$
    RewriteRule ^(/)?$ blog [L]
    In the above code, change the “YourDomain.com” value to your root domain.
    In the above code, change the “blog” value to the subdirectory. )

    That seemed to do it finally. Whew! I appreciate the help from both Leejosepho and Pioneer Web Design.

    Thanks!

    Robert

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Can't get WordPress to power my root directory. What gives?’ is closed to new replies.