Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 135087

mac3rbi on "How To Fix Permalink /%postname%/ 404 not found"

$
0
0

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]
</IfModule>

# 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 all articles
Browse latest Browse all 135087

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>