WordPress.org

Support

Support » How-To and Troubleshooting » Static root pages won't work

Static root pages won't work

  • I created a temp wordpress site that I moved to a different server.

    Everything looks fine except I cannot get the pages to show up in the root with WordPress in a subdirectory. Everything show fines if I leave both general reading settings to my site.com/blog/ but anytime I try to have the permalinks viewed outside that directory, i.e. blog: mysite.com/blog site: mysite.com/, I get nothing.

    I’ve never encountered this problem with Verio. The new server is running Redhat. I’ve run thru the codex and followed everything to the letter by copying the index.php file and .htaccess file. On all my other wordpress sites I did the same and it worked. Is this an Apache issue? How can I fix it? I noticed the Linux comment about mkdir, what is that?

Viewing 15 replies - 1 through 15 (of 21 total)
  • I didn’t quite follow everything, but are you saying that both Site URL and WordPress install were set to http://example.com/blog/?

    To confirm, you’re trying to have your WordPress install visible at http://example.com while residing in http://example.com/blog?

    Assuming yes, the Site URL should be http://example.com and the install location be http://example.com/blog

    Let us know if that takes care of you!

    when u do http://example.com
    what does it show ? blank page? error ?

    and i couldnt understand but
    http://example.com/blog (the wordpress works fine right? )

    Sorry for not being clear. Let me try to word it better.

    When I set the site url and the wordpress install to http://www.mysite.com/blog with the general settings everything appears fine.

    When I change the settings so that the wordpress install is http://www.mysite.com/blog and make the site url http://www.mysite.com/ I get a bad request error and can’t view my pages.

    I’ve gone thru the dashboard and chosen the correct settings for staid homepage. I have permalinks enabled and they work fine as long as both settings remain www/mysite.com/blog as explained above.

    I’;ve followed the codex about having wordpress in it’s own subdirectory and have done the index.php and .htaccess copy.

    I’m wondering if it’s an apache thing?

    Please use real URLs !!! When you need your car repaired do you take your mechanic a cartoon sketch of a generic automobile? Or do you take your actual car in to the auto shop?

    Where are your actual WordPress files? Are they at the root of your domain or at “/blog”? If the later, you can’t just change the settings, you need to treat it like a subdirectory install.

    Sorry, didn’t know the protocol.

    The wordpress subdirectory is installed in http://www.universalautoports.com/blog/. All the wordpress files are in that subdirectory “blog”. I moved the index.html and .htaccess file to the root (www.universalautosports.com) which is under public_html.

    I did everything to the letter regarding the index.php alteration and the settings. Just checked again.

    I’m getting a 404 for /blog.

    http://www.universalautosports.com shows me an index of files, which doesn’t include index.php

    Sorry Brandon. I’ve been moving things around and tried a clean install.

    I even tried running everything under a different directory now called “content”. If you go to http://www.universalautosports.com/content/ you’ll see the site. I just can’t get anything visible outside of the WordPress directory.

    The minute I change the settings to http://www.universalautosports.com I get errors.

    Should I be using s different path for the site url other than http://universalautosports.com? I’m tempted to just install all the wordpress files as a root install and see what happens.

    I’m still seeing 404 🙁

    Is there a particular reason you weren’t installing it under the root directory?

    I’ve commonly moved everything in root into an /old/ folder to keep all that stuff and get WordPress a clean folder.

    I have it under the root in it’s own directory to keep everything neat.

    Try again. I think you tried looking at it while I was trying something.

    http://www.universalautosports.com/content/

    I think it’s related top the .htaccess file located in root.

    I just tried using Fantastico to do a clean install to make sure it’s none of my files. Same issue.

    Fantastico installs wordpress in it’s own subdirectory within root/public_html and it works only when viewed within it’s own directory.

    The minute I go the settings/general and changed the site url to http://www.universalautosports.com I get the same 404 error. Could this be a permissions error? I have the public_html file where everything resides set to 755. Or could it be a user ownership problem?

    I haven’t seen evidence of that.

    I see your site now in the subdir.

    Have you copied index.php and .htaccess to root per the codex instructions, including the tweak to index.php (going from memory, on mobile device), to point to your subdir?

    I ask because I don’t get an error at root, just 404, which suggests to me that index.php does not exist in root.

    I did indeed move the .htaccess file and the index.php to the root exactly like the codex states. I checked to see that they are correct.

    If I go to http://www.universalautosports.com I get a 404.

    Wait a second. I ran your site through http://web-sniffer.net/

    Apparently, it is returning a 500 error, not a 404. The error pages on the site aren’t correct.

    Can you access your domain’s error logs? Just to be sure, when you edited the index.php, you changed the require line to match where your WP install is at (e.g. content, not wordpress as is in the example).

    Trying to leave no stone unturned…

    could you pastbin.com your htacess and index file so we can try see if you missed out something

    Here’s th eindex.php located in the domain’s public_html:

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

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘Static root pages won't work’ is closed to new replies.