1

When I open the newly created page in WordPress I get page not found but when I reset the permalinks to none http://localhost/?page_id=6 opens normally .

Even with this permalink it works : /index.php/%postname%/ But when I change it to only /%postname%/ I get page not found error .

Here is my htaccess file:

# 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
2

Do you have mod_rewrite enabled?

This sort of thing tends to happen when it's not. At which point, you only have access to ugly permalinks (?p=N) or "almost pretty" permalinks (/index.php/slug). The latter uses pathinfo to get you the page you're requesting instead.

So I'd suggest double checking whether mod_rewrite is installed and enabled. If it turns out it isn't, enable it and restart Apache.

Here's more on using permalinks from the WP codex.

  • Thanks this was the problem, I don't even have Allowoverride enabled on my apache thanks ! – Marox Tn Jan 8 '16 at 14:26
0

This problem is .htaccess file's. Before doing anything first take backup your files and database.

Then rename the .htaccess file in your root of WordPress installation. and then change the permalink setting you want in WordPress Dashboard.

I hope this will work for you.

  • What exactly is wrong with the .htaccess? Please add an explanation. – fuxia Jan 8 '16 at 5:19
  • Thanks for your answer but when I rename .htaccess what the new name should be ? And I tried both ways using the .htaccess directly and from wordpress . – Marox Tn Jan 8 '16 at 10:21
  • Sorry for late answer any name like .htaccess_rename or you can delete this file also because when you change the permalink structure from your dashboard WordPress automatic create a new .htaccess file in your WordPress root. anything wrong don't worry you have the backup. – Bharat Jan 9 '16 at 6:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.