Reputation: 69
Recently I have updated PHP from version 5.3 to 5.5 on my web server.
Wordpress Permalinks was working prior to that, but now Permalinks has stopped working, and I have to use the default option which gives the page id in url.
Wordpress version is 4.0.1
Upvotes: 2
Views: 2995
Reputation: 91
For some situations just resaving the permalink settings in Dashboard>Settings>Permalink>[postname]>Save Changes
will refresh the .htaccess
file.
If that is ignored, chances are that the .htaccess
file is not writeable. In that case, check your apache.conf
:
sudo vi /etc/apache2/apache2.conf
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride ALL <----(edit from none)
Require all granted
</Directory>
Then restart apache2 using:
sudo service apache2 restart
While there, be sure to double-check permissions and owner of the file:
-rw-r--r-- 1 www-data www-data 1668 Jan 8 04:34 .htaccess
Upvotes: 1
Reputation: 1192
This rewrites .htaccess and wordpress permalinks may work in most cases
if .htaccess is not created, make .htaccess with following
# 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
can you also confirm mod_rewrite is enabled in your server?
Upvotes: 2