WordPress.org

Ready to get started?Download WordPress

Forums

Static root pages won't work (22 posts)

  1. HotShoeStudios
    Member
    Posted 1 year ago #

    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?

  2. Brandon Kraft
    Happiness Engineer
    Posted 1 year ago #

    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!

  3. cinghaman
    Member
    Posted 1 year ago #

    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? )

  4. HotShoeStudios
    Member
    Posted 1 year ago #

    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?

  5. s_ha_dum
    Member
    Posted 1 year ago #

    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.

  6. HotShoeStudios
    Member
    Posted 1 year ago #

    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.

  7. Brandon Kraft
    Happiness Engineer
    Posted 1 year ago #

    I'm getting a 404 for /blog.

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

  8. HotShoeStudios
    Member
    Posted 1 year ago #

    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.

  9. Brandon Kraft
    Happiness Engineer
    Posted 1 year ago #

    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.

  10. HotShoeStudios
    Member
    Posted 1 year ago #

    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.

  11. HotShoeStudios
    Member
    Posted 1 year ago #

    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?

  12. Brandon Kraft
    Happiness Engineer
    Posted 1 year ago #

    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.

  13. HotShoeStudios
    Member
    Posted 1 year ago #

    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.

  14. Brandon Kraft
    Happiness Engineer
    Posted 1 year ago #

    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…

  15. cinghaman
    Member
    Posted 1 year ago #

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

  16. HotShoeStudios
    Member
    Posted 1 year ago #

    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');

  17. HotShoeStudios
    Member
    Posted 1 year ago #

    Here's the .htaccess located in the domain's public_html:

    RewriteEngine On
    RewriteCond %{HTTPS} on
    RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [L]

  18. HotShoeStudios
    Member
    Posted 1 year ago #

    correction.

    The above .htaccess file is what I uploaded to the public_html directory. Ti then get s rewritten somehow.

    The current .htaccess file that is live on the server is:

    # 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

  19. Brandon Kraft
    Happiness Engineer
    Posted 1 year ago #

    The last htaccess is right for WordPress.

    [[edit: disregard the 404 statement.]]

    If you could check out and send over the error logs, we can find out exactly what's causing the 500 error on your root domain.

  20. Brandon Kraft
    Happiness Engineer
    Posted 1 year ago #

    It looks the home page is working now! Congrats. What was the issue?

    For the rest of the pages, let's tackle .htaccess. Flush the rewrite by going to Appearance->Permalinks and saving it (don't have to change anything).

  21. HotShoeStudios
    Member
    Posted 1 year ago #

    Thank you so much for all your effort Brandon.

    I was shocked to find out that everything was indeed correct and in the proper location. The problem was the owner of index.php was set to root.

    Hard to believe one simple little thing like this could take sooooo much time on my part to solve. I think I'll stick more towards graphics as the IT part makes me want to shoot myself! ;)

    Thanks again!

  22. Brandon Kraft
    Happiness Engineer
    Posted 1 year ago #

    Not a problem. I'm more on the techy side, but do most within WordPress after it is up and running. When a new glitch pops up I haven't experienced/heard of, my curiosity gets the best of me. :-)

    Also, good call. You were thinking something was up with users from the beginning!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.