Support » Fixing WordPress » How To Fix Permalink /%postname%/ 404 not found

  • I’ve been searching for this issue i had and i managed to fix it gladly with some search but i didn’t find anyone fixed it here so

    first of all create .htaccess on your website directory it could be /var/www/yourwebsite or any where you installed wordpress on (just move it beside wp-config.php)
    this tutorial require ssh connection i edited this from Terminal after i connected to my Debian/Linux server

    in command line you can make touch .htaccess and then set permission chmod 666 .htaccess and chown www-data:www-data .htaccess

    then change your permalink to default > save it, and then once again, change permalink back to Post Name
    you should see in .htaccess something like

    # 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]
    # END WordPress

    Now from command line you should enable rewrite_mod by typing (you need to be root)
    a2enmod rewrite

    and then restart apache by
    /etc/init.d/apache2 restart

    and this fixed the issue for me 🙂
    hope it fixes yours and this is my first english ‘how to’ tutorial

Viewing 8 replies - 1 through 8 (of 8 total)
  • Dude! I have been searching for this for the last 3 hours. None of the posts or threads I read mentioned anything about running a2enmod rewrite. But that was the key. I finally have my blog up and running again. Thank you so much!

    glad that it helped 🙂

    Hi, where can I type in a2enmod rewrite and how can I restart apache?

    Thanks in advance.

    jaeeun if you’re mac/linux use terminal and then do ssh login or if you have webmin or WHM on ur server search for execute commands, if you’re windows try petty or any ssh client.

    This solved the issue for me in Windows using WAMP as well. The rewrite_module wasn’t enabled in Apache and once that was on the permalinks worked.

    Could you please post how this should look when added to the htaccess file?

    Thank you 🙂

    Not to say above doesn’t work but for such generic question of fixing Permalink with WordPress, a lot of things could have gone wrong.

    FYI if one is using hosting services from some of the popular service providers, there might be a setting in the hosting company’s control panel to ‘sync htaccess’.

    I have installed WordPress, changed the Permalink settings, and click ‘sync htaccess’ in my hosting’s control panel, wait for 30 seconds, then it works.

    Sadly there seem to be no standardised naming for such thing… I am referring to the web control panel provided by your hosting service provider which needs username / password to login to, in order to manage your hosting environment.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How To Fix Permalink /%postname%/ 404 not found’ is closed to new replies.