Wordpress Permalinks Not Working...Please Help!
The requested URL /example-blog/ was not found on this server.
Apache/2.4.7 (Ubuntu) Server at
Any clue as to what I am doing wrong???
My .htaccess file contains:
BEGIN WordPress
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:
ServerName:
ServerAlias: example.com
DirectoryIndex index.html index.php
DocumentRoot /var/www/example.com/public_html
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
13 Replies
AllowOverride All
AllowOverride All
Order allow,deny
allow from all
P.S. Permalinks only work on default permalink settings…
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:
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…
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…
Also i have enabled apache rewrite module.
but it still not working..Home page only working..Please Help
1) Enabled mod rewrite
sudo a2enmod rewrite
sudo service apache2 restart
2) edited the whole apache conf
sudo vim /etc/apache2/apache2.conf
Find:
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:
AllowOverride All
AllowOverride All
Order allow,deny
allow from all
4) Created .htaccess in /var/www/example.com/public_html
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…
@ansorensen suggestion worked for me! Thanks!