Ad

After Changing Wordpress Permalink To "Post Name" Then Page Not Found

- 1 answer

I have wordpress site, after i changed the permalink to "Post name", then the sub pages (but home page is working fine) are not found "Error occurred: 404 - not found" . But if i changed to page ID - Plain url, then it is working but it show page ID in the url.

Pls check my screen shot of wordpress permalink http://prnt.sc/dfgba3

thanks

Ad

Answer

Please ensure your .htaccess file looks like this if you are using Apache.

# 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

Then try to clear your browser cache and visit the website. Or visit your website in incognito mode.

By the way if you are using Apache you need to enable mod rewrite in order to get perms links to work.

A command like the following if you are managing your own server

sudo a2enmod rewrite
Ad
source: stackoverflow.com
Ad