Skip to content

WordPress Permalinks Not Working On Ubuntu 14.04

Today I have installed Ubuntu 14.04 for web development and installed fresh WordPress but after clicking on any pages, it takes me to the apache 404 page so how to fix this issue?

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

First, open your terminal and follow these steps:

Step 1:

Activate the mod_rewrite module

sudo a2enmod rewrite

Step 2:

Restart the apache server

sudo service apache2 restart

Step 3:

To use mod_rewrite from within .htaccess files (which is a very common use case), edit the default VirtualHost with

sudo nano /etc/apache2/sites-available/000-default.conf

Step 4:

Search for DocumentRoot /var/www/html” and add the following lines directly below:

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

Save and exit the nano editor via CTRL-X, “y” and ENTER.

Step 5:

Restart the server again:

sudo service apache2 restart

Step 6:

Check if mod_rewrite is installed correctly, check your phpinfo() output. It should have this in it:

mod-rewrite-apache

Keep visiting for new stuff and give your feedback.

Happy Coding 😉

(Visited 1 times, 1 visits today)
%d bloggers like this: