Fix WordPress permanent links 404 Error / Enable WordPress permanent links in Apache

WordPress Logo

Many of us faces 404 not found error while enabling permanent links on WordPress, pretty permanent links provides better SEO functionality for bloggers. When it comes to shared hosting, webmaster do not have to worry about this issue as web hosting providers have a servers that already been optimized for WordPress; it does not mean that you won’t face an issue of 404 error.

This permanent link 404 error is mostly faced by VPS hoster, where webmaster needs to set up everything to run a WordPress website; staring from Apache, MySQL and PHP which are basic prerequisite for WordPress. You can look at configuring LAMP on Fedora and installing WordPress on Fedora.

This guide is mainly for VPS hoster or WordPress runs on Linux with apache, make sure you have a following settings on the server.

Configure Apache:

Edit the default apache configuration file or virtual host, you need to have “AllowOverride All” inside directory syntax.

For example,

<Directory usr/share/httpd/wordpress>
AllowOverride None
Require all granted

change from “AllowOverride None” to “AllowOverride All

<Directory usr/share/httpd/wordpress>
AllowOverride All
Require all granted


Make sure you have mod_rewrite module is enabled in apache, to do that, following entry should be un-commented.

LoadModule rewrite_module modules/


Place the following content in .htaccess file inorder to enable pretty permanent links on WordPress. Most of the times, WordPress creates .htaccess for you.

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

Now you are able to access wordpress post with pretty urls. That’s All!, we welcome your comments.


Share This Post