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 making a custom wordpress distribution I will use for my own sites including my language and a child theme. But, I want the permalinks to be /%postname%/ by default so that I don't need to change this in the setting after installation.

How can I do this?

share|improve this question
1  
See this answer. It provides exactly what you need. –  Tom Feb 17 '12 at 13:00
    
Where do I edit/add that code? Which file? –  Anders Feb 17 '12 at 13:07
    
This would reside in your theme's functions.php file. –  Tom Feb 17 '12 at 13:12
    
"Where do I edit/add that code? Which file?" - If you're making a custom WordPress distribution, you really should already know how to answer this question. That said, I would recommend putting it in a Plugin that you bundle with your custom distribution. –  Chip Bennett Feb 17 '12 at 14:25
    
also make sure you don't run that code each run since running flush_rules(); is a very big on resources and with that function hooked on init meaning it will run on every page load –  Bainternet Feb 17 '12 at 14:49

1 Answer 1

i wrote an article recently about how to customize your install (including setting permalinks) with install.php

http://www.kathyisawesome.com/421/customizing-wordpress-install/

share|improve this answer
    
I got an error trying to access your site. Forbidden You don't have permission to access /421/customizing-wordpress-install/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. –  Anders Jun 2 '12 at 0:33
    
you too? weird, b/c i have heard that from someone else, but i (and others) can see it just fine. cloudflare must have something against scandinavians. –  helgatheviking Jun 2 '12 at 19:15

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.