Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am pretty much learning by doing a custom theme from scratch (not a child theme), and have had much trouble with permalinks.

In the permalinks settings page on the wp-admin, if I put any option either than the default linking system, all my links result in 404 page not found errors.

I'm not sure if this even exists, but I haven't built a permalink handler function per se. My knowledge of web development (pre-wordpress) makes me want to think that it should though.

share|improve this question
3  
Please post your code. –  s_ha_dum May 13 '13 at 17:52
    
Sorry for the question, but what code? You want my index.php? –  jhc May 13 '13 at 17:55
    
You say that when you "put anything other then the default linking system..." you get 404s. Well, what do you "put"? What is that code? –  s_ha_dum May 13 '13 at 17:57
    
Editing the post for clarification. –  jhc May 13 '13 at 18:01
    
if you switch to a default theme, do permalinks work as expected? –  Milo May 13 '13 at 18:08
show 2 more comments

2 Answers 2

Sounds like you ...

  1. Don't have mod_rewrite installed or enabled
  2. Or your .htaccess file in not being edited

To check the first make a file with <?php phpinfo(); in it, save it to your server-- same place you have Wordpress-- named something like phpinfo.php, and load the file in a browser. Look for mod_rewrite. It should be near the top in the "Loaded Modules" rows. If it isn't there, the only setting that will work is the default. Unless you can install that module or talk your host into installing it.

As for the second, WordPress should give you message if it can't create/write the .htaccess file. When you save the permalinks look for that message. If you see it you will need to copy and paste the .htaccess rules into the file by hand or alter the permissions on the server to so that WordPress can write the file.

Reference

http://codex.wordpress.org/Using_Permalinks

share|improve this answer
    
I know that my .htaccess is being updated automatically by WP, as I have already fixed that problem. Will check phpinfo soon. –  jhc May 13 '13 at 18:23
    
Per a recent comment to you question, your permalinks work with the default theme. mod_rewrite is not the problem. –  s_ha_dum May 13 '13 at 18:25
    
Yep, no mod_rewrite module in phpinfo. –  jhc May 13 '13 at 18:28
    
That is confusing. If there is no mod_rewrite none of your permalinks should work. Is this an Apache server? Or IIS? Or something else? –  s_ha_dum May 13 '13 at 18:30
    
I'm hosting the site on localhost. I just added mod_rewrite, and phpinfo shows it as expected. Unfortunately the links still don't work. –  jhc May 13 '13 at 18:34
add comment

Did you try going back to permalinks settings page and hitting save again? Sometimes after making edits the permalinks need to be reset by visiting that page and doing nothing but saving.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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