Enable Apache mod_rewrite (AllowOverride All) for WordPress Permalinks

If WordPress “post name” permalinks return 404 errors on an Apache server, Apache probably isn’t allowing the .htaccess rewrite rules WordPress depends on. The fix is a one-line change.

Steps

  1. Open the Apache configuration file at /etc/httpd/conf/httpd.conf.
  2. Find the Directory block for your DocumentRoot, normally <Directory "/var/www/html">.
  3. Change AllowOverride None to AllowOverride All.
  4. Restart Apache.
<Directory "/var/www/html">
    AllowOverride All
</Directory>
service httpd restart

This step is essential for WordPress post name permalinks to work.