WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] WordPress can’t find my new pages

[Resolved] WordPress can’t find my new pages

  • On a different WordPress installation, I previously created a custom theme. It’s pretty basic really.

    I just installed WordPress on a clients server and when I create a new page or try to view a post, WordPress can’t find the page/post. I get a 404 not found error. But the weird thing is, WordPress isn’t even finding my 404.php template page. It’s displaying the default browser 404 page.

    Where should I look first to figure this out?

Viewing 15 replies - 1 through 15 (of 22 total)
  • Try regenerating your permalinks.

    Settings > Permalinks

    Log into your Dashboard and save your permalinks again. See if that helps. If it doesn’t, provide a link to your site so someone here can see the error.

    Sounds like a permalinks issue if it’s not displaying your 404.php

    Okay so it looks like the default permalinks are okay. It’s just any other type of permalink gives me 404s. What do I need to add to my htaccess to get this working?

    What do I need to add to my htaccess to get this working?

    Exactly what the message tells you to add when you save your permalinks. Scroll down a little.

    Where am I supposed to see this .htaccess message? On the Settings > Permalinks page? Cause I don’t see anything about .htaccess on there.

    The message should be directly below the submit button in Settings->Permalinks, but it doesn’t show up at all if the .htaccess file is writable by the server. If its writable, WP will write the file for you. If you don’t see the message then presumably WP is able to write the file. Have you checked to see what is in your .htaccess? It should look a lot like this, but likely won’t match exactly

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /sandbox/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /sandbox/index.php [L]
    </IfModule>
    
    # END WordPress

    I guess I’m assuming you are on an Apache server. Any idea what server your site is running on?

    Ah ya its CentOS and Apache. So if .htaccess is writable my WordPress it would take care of it?

    Okay WordPress did write to my .htaccess after I gave it proper write permissions. It wrote this:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    However, it did not fix the problem. I’m still get 404 errors on my permalinks.

    And according to phpinfo(); Apache does indeed have mod_rewrite loaded.

    Check the two ‘(URL)’ listings in Settings->General– third and fourth input boxes from the top.

    Is there an url where I can see the problem?

    The WordPress address and Blog address are both set to the url of the site: http://wordpress.huebnerpetersen.com

    Permalinks are set to Month & Name

    My .htaccess is writable my WordPress. The contents are:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    Disable all of your plugins and switch to the default theme.

    Done.

    Is it worth giving WordPress a helping hand with the ErrorDocument?

    # BEGIN WordPress
    
    <IfModule mod_rewrite.c>
    ErrorDocument 404 /index.php?error=404
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘[Resolved] WordPress can’t find my new pages’ is closed to new replies.
Skip to toolbar