I did a brand new wordpress setup for a client and when I went to the permalinks settings it was blank. No options to change the permalink structure from the awful default settings. I found out a fix for it and thought I’d share it with you.
The file that should display is /wp-admin/options-permalink.php, but the problem file turns out to be wp-admin/includes/misc.php
Look for the line that reads:
$got_rewrite = apache_mod_loaded(‘mod_rewrite’, true);
It should be close to the top of the code. Change it to read:
$got_rewrite = true;
Someone correct me if I’m wrong, but as I understand it, you are changing a conditional statement to an absolute one by doing this. I’m not sure why it’s causing a problem, but that fixed it for me.
Adrian Pavone says
Yeah, the conditional statement basically says that “if the mod_rewrite apache module is currently loaded then rewrite option is true”. So either php is unable to detect that your mod_rewrite module is loaded or the client site/server system is performing the rewrite through an alternate means (not the mod_rewrite module). Or, of course, there is potential that the client site/server system is not able to rewrite due to the module not being configured/being included in the first place.
Hope that helps,
Bingo! Finally got the “real” resolve. I’ve been searching this solution for hours. Though I did change the permalink_options in the database manually for the custom permalink, but this problem just bothers me ever since I installed the wordpress in our site.
Huge thanks to you Mike. Cheers.
Mike Haydon says
You’re very welcome Reyven. Glad I could help :)
nice website. thanks to mike and reyven.
This is it, ive been having the same issue with reyven’s. This is really a big help!
Thnx to you Mike, great article..
Mike Haydon says
Thanks Joseph & Karl. Good to know others don’t have to figure it out like I did :D
Steve Yeoman says
This is the only solution that worked after hours of trying all the others.
Farshad Ali says
Worked for me too :P
Rodrigo Noronha says
This is the only solution that worked after hours of trying all the others. (2)
Thanks, Mike Haydon!
YESSS!!! it works ur a god bro ! thought i was gunna have to do a complete reinstall haha nice thanks
Andrew Burton says
This has always worked for us when we have done WP installs. A belated thanks for posting. HOWEVER, all well and good but this doesn’t really answer the question as to why it happens. Other developers using the same server company ( or other companies, it doesn’t matter) don’t experience this. We are the only people in our city that have experienced this, though it clearly is a worldwide issue. Any thoughts would be welcome.