WordPress’ pretty permalinks is something every blogger loves. It creates nice and search engine friendly URLs on your WordPress blog or website. Have you ever faced that sometimes you have to have index.php in your permalinks to make it work? Something like www.example.com/index.php/post-title/ ? I know it is annoying and we all don’t like it.
After doing some research, I realized that happens due to very small configuration in your Linux server’s. Here is how you can fix the problem.
- Open apache’s conf file (httpd.conf) and search for this text:
Options Indexs FollowSymlinks put a + (plus sign) in front of FollowSymlinks it should look like this +FollowSymlinks
- Next, check if mod_rewrite is loaded. Search for it and uncomment it by removing the # if its there.
- Next, search for this block of code:
Deny from all
AllowOverride None to
AllowOverride All it should look like this:
Deny from all
- After making the changes, save the file, and restart the Apache service on your server
- Next, login in to your WordPress admin dashboard and go to:
Settings > Permalinks > under Custom Structure and put
/%postname%/ (if this is the format you need), press Save Settings, visit your website and test the URLs. You should now see “Pretty Permalinks” in action 🙂
I hope this quick tutorial will help you fix the problem if you are facing the same.
Do let me know in the comments below if you have any queries or questions.