• Resolved dcowens76

    (@dcowens76)


    I am running WordPress 4.4.1 on an Apache 2.4.7 server on a Digital Ocean droplet running Ubuntu 14.04. I set the server up myself, and I am guessing my problem is there.

    1. I set up permalinks using WordPress, using the postname option.

    2. I manually added the following to www/html/.htaccess (WordPress did not add this automatically):

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

    3. I checked that mod_rewrite was enabled on the server.

    4. I added the following to my site conf file:

    <Directory />
            Options FollowSymLinks
            AllowOverride All
        </Directory>
        <Directory /home/[user]/www/html>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Order allow,deny
            allow from all
        </Directory>

    5. I cleared my browser cache and disabled all plugins.

    I realize this question has been asked many times and the WordPress Codex has a page of instructions that I have followed, but nothing I have found works.

    Any ideas on what I am missing?

Viewing 15 replies - 1 through 15 (of 17 total)
  • Moderator t-p

    (@t-p)

    – I am not sure about snippets in items 4

    -Try resetting your custom permalinks back to the default setting and renaming your WordPress .htaccess file. If that works, then try reading Using_Permalinks before setting a custom permalink structure again.

    Thread Starter dcowens76

    (@dcowens76)

    Thanks for responding. I did what you suggested (permalinks were temporarily disabled already). I renamed my .htaccess file, but WordPress did not create a new one when trying to enable permalinks. Anyway, I still get a 404 error.

    I have thoroughly read and tried everything relevant from the Using_Permalinks page.

    Moderator t-p

    (@t-p)

    Does resetting permalinks back to the default and renaming the .htaccess work?

    Thread Starter dcowens76

    (@dcowens76)

    If you mean, do the default links work when permalinks are disabled, then yes, it works. But I do not need to rename .htaccess for that to work.

    Moderator t-p

    (@t-p)

    If default setting works, then try reading Using_Permalinks before setting a custom permalink structure again.

    Thread Starter dcowens76

    (@dcowens76)

    I have read it and done everything there very carefully already.

    @dcowen76, any progress on this? I’m having the same problem.

    I migrated my WP site to a new computer. The homepage loads fine, but all other pages give an error 404. Using default permalinks fixes the problem, but I need the postname in my permalinks.

    I have a .htaccess file in my WP directory that seems to be configured correctly, but I should note that when I rename the file, WP does NOT create a new version.

    Any help/suggestions from anyone is appreciated! Been banging my head against the wall on this all weekend.
    TIA

    Thread Starter dcowens76

    (@dcowens76)

    No progress, sorry!

    I was able to fix it FINALLY! I used this tutorial: https://www.smashingmagazine.com/2013/04/moving-wordpress-website/
    I think what did it for me was turning custom permalinks OFF before exporting the database, then turn them back ON in the new site after importing the database.

    At first I got a blank white screen of death when loading the new site, but after I removed all plug-ins, it worked fine – switched custom permalinks back on, and all was good!

    Moderator t-p

    (@t-p)

    Glad to know it ??

    I need help pls. Frequently when yo click a link on my blog it goes to 404 error. I have to go to admin and click permalink “custom structure” for page to display. I am tired of doing this 100 time a day. What is the fix? i already added this to.htaccess:

    # 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

    I’m having the same issue and can’t find a simple fix. I turn on the permalinks for post name and I get a 404 error. Go back to plain and it works fine. But I really want to have the post name turned on. I’ve checked everything above and that doesn’t work. I talked to my host provider (hostgator) they say it’s a scripting issue.

    Anybody find a solution for this? Let me know please. Can’t believe WP hasn’t fixed this issue since it’s been going on for some time but just hit me.

    ok guys. I had same issue about one hour ago and I’ve made my own investigation. I’ve checked everything and became mad a bit, but I decide to use Occam’s razor. so, I saw that my VPS Apache vhost config didn’t overrode this:
    <Directory /var/www/example.com/>
    AllowOverride All
    </Directory>
    and so my .htacces just hadn’t worked. when I fixed it – all permalinks begin working nice.

    you have to have good understanding for Apache config context (or any else web-server) if you administrate your server by your own.

    @comradepashka
    It’s what happened to me.
    The Directory -where WP is hosted- at httpd.conf had AllowOverride “None” instead of All.
    As soon as I changed it, it started to work (courses and lessons at least).
    Also, “Options FollowSymLinks” is needed.
    My permalink configuration is:
    WP –> postname (mandatory due to LearnPress)
    LearnPress –> Course

    Good luck!

    Thanks for this update. I’m not that technically advanced – How do I go about accessing the directory where wp is hosted? Any additional information or guidance would be really appreciated.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘404 error on Permalinks’ is closed to new replies.