Wordpress Permalinks Not Working...Please Help!

I'm new to all this but here goes….I've configured LAMP on my linode and have successfully installed wordpress. However, when I change to a custom permalink structure I get a 404 Error:

The requested URL /example-blog/ was not found on this server.

Apache/2.4.7 (Ubuntu) Server at www.example.com Port 80

Any clue as to what I am doing wrong???

My .htaccess file contains:

BEGIN WordPress

RewriteEngine On

RewriteBase /

RewriteRule ^index.php$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]

END WordPress

My config file located at /etc/apache2/sites-enabled/example.com.conf contains:

ServerAdmin: webmaster@example.com

ServerName: www.example.com

ServerAlias: example.com

DirectoryIndex index.html index.php

DocumentRoot /var/www/example.com/public_html

Options FollowSymLinks

AllowOverride All

Order allow,deny

Allow from all

Loglevel warn

ErrorLog /var/www/example.com/log/error.log

CustomLog /var/www/example.com/log/access.log combined

12 Replies

I found a fix to the problem. My htaccess file remained the same as originally shown. I changed the config file located at /etc/apache2/sites-enabled/example.com.conf to the code below and it worked!!!

Options FollowSymLinks

AllowOverride All

Options Indexes FollowSymLinks MultiViews

AllowOverride All

Order allow,deny

allow from all

I'm having exactly the same problem, and your fix is not working for me…anyone knows how to fix this?

I've tried changing .htaccess , apache2.conf and conf file in sites-enabled…but it still won't work

P.S. Permalinks only work on default permalink settings…

Did you get a solution? I'm having the same issue.

Hi All!

I'm new to this forum so i just share an information about this topic;

1) I reinstalled 3.8.1 from the dashboard.

2) I changed themes including one time to Twenty Fourteen.

2) I disabled all plugins.

3) I renamed the plugins folder (to test if a deactivated plugin may be the culprit).

4) I checked the .htaccess file and made sure it includes this code:

RewriteEngine On

RewriteBase /

RewriteRule ^index.php$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]

5) I changed the permission of .htaccess to 444, 644, and just about all the combinations available.

6) I tried viewing the post when logged in vs. not logged in.

The above reasons reasons are explains the wordpress permalinks not working.

Thank you keep in touch with me… :)

You may not have the apache rewrite module installed.

To do this, run the following:

sudo a2enmod rewrite

sudo service apache2 restart

This will install the apache rewrite module and restart apache. If your settings are the same as above, this should take care of your issue.

@djohnston:

You may not have the apache rewrite module installed.

To do this, run the following:

sudo a2enmod rewrite

sudo service apache2 restart

This will install the apache rewrite module and restart apache. If your settings are the same as above, this should take care of your issue.

okay thanks for your informations. stay in touch with me… :)

Did that work for you?

I've tried with changing .htaccess , apache2.conf and conf file in sites-enabled…

Also i have enabled apache rewrite module.

but it still not working..Home page only working..Please Help :roll: !!

Had similar problems, moved my wordpress from another host to linode, Ubuntu. Homepage was working, but non of the permalinks. So I collected all of the following from hours of painful searching, and experimenting, I think this is the complete process that got things working again me.

1) Enabled mod rewrite

sudo a2enmod rewrite

sudo service apache2 restart

2) edited the whole apache conf

sudo vim /etc/apache2/apache2.conf

Find:

And make sure the AllowOverride directive is set to All.

3) Edited the conf for my local virtual host (/etc/apache2/sites-enabled/example.com.conf), inserting the following code INSIDE the virtual host tags:

Options FollowSymLinks

AllowOverride All

Options Indexes FollowSymLinks MultiViews

AllowOverride All

Order allow,deny

allow from all

4) Created .htaccess in /var/www/example.com/public_html

RewriteEngine On

RewriteBase /

RewriteRule ^index.php$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]

5) Chown'd the .htaccess

sudo chown www-data:www-data .htaccess

5) Restarted apache again

sudo service apache2 restart

6) Logged in to wordpress, saved the permalink schema as 'default'. Tested, it seemed to work. Saved the permalink to another schema (the one I had used for the site) and it worked.

Not if the double apache conf changes are redundant, but I had tried them individually with success. Although who knows, at this point, where there are 6 variables, its really, really easy to get one of them out of line… especially when the .htaccess creation just fails silently. Still don't know why wordpress was neither creating the .htaccess file itself nor throwing any kind of error.

At first these settings did not work for me either. And then I discovered two things…

1) These settings do NOT belong in the /etc/apache2/sites-enabled/example.com.conf file, they belong in the /etc/apache2/apache2.conf file, or on CentOS the /etc/httpd/conf/httpd.conf file.

2) There is more than one AllowOverride order. Find the one that corresponds to your root directory, or it will not work. Once I adjusted the correct one, my Permalinks worked…

Thanks a lot ansorensen, your suggestion worked for me

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct