wordpress 404 error on all pages code example

Example 1: wordpress inner page not found error

NOTE : If you got this error after installing wordpress on a newly configured 
ubuntu server
----------------------------------
1. sudo a2enmod rewrite

2. Add AllowOverride All in virtual host
<Directory /var/www/html>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>

3. restart apache

Example 2: wordpress 404 page after migration

# 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

Tags:

Misc Example