Fix WordPress Posts 404 Error after changing Permalink!

Question: I changed the default permalink structure to postname, but now all the WordPress posts throw 404 not found error. However, the WordPress has updated .htaccess with necessary rules and below is the snapshot of it.

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

How to solve this error?

Solution : Fix WordPress Posts 404 error after changing Permalink settings.

wordpress posts 404 erro

Most of the WordPress users face this error and the common scenario goes like this – the user will be allowed to access WordPress admin panel and the main page of the website. But whenever the posts or pages accessed, the web server throws 404 Not found error. If you are getting a similar error, then here’s how you can fix it.

Step 1: If you are running WordPress in Apache web server, then make sure  ‘AllowOverride‘ directive set to ‘all’ under <Directory> tag as shown below:

<Directory "/var/www/html/">
 AllowOverride all

Step 2: Restart the web server.

# /etc/init.d/httpd restart

Step 3: Try accessing the WordPress post page and it should work.

What is AllowOverride?

AllowOverride all” directive tells web server to use .htaccess to allow override the Apache configurations on a per directory basis. When ‘AllowOverride None‘ is set, the web server will ignore .htaccess and that’s where WordPress is going to write permalink settings.

Hope it helps!

Related Content
vps germany
Disclaimer: The content published in this article is the views of the author only. Techglimpse does not gurantee accuracy, completness or validity. If you believe the content on this post violates your copyright, please send us a mail for removal. Read more.