Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm putting together a site that will be comprised, mostly, of static pages with some dynamic content as well as a blog page.

In terms of naming files, what would be the best way to achieve this? My first thought was to simply use about.php, services.php, etc., but I'm sure that doesn't work well with WP's system.

share|improve this question

2 Answers 2

More information about your specific plans might help improve answers you'll get on this thread.

But in general RE: conflicting file names: if you install WordPress in a subdirectory (for example, "/blog/"), it doesn't matter what you name the rest of your files so long as they're not in the WP dir. This is what 'd recommend, based on the limited info in your question.

If you're expecting your "dynamic content" to be powered by WordPress, you might want to consider just powering the whole site with WP, instead of trying to mix static files with WP core files in the same directory. It's a lot cleaner, and puts the management of all your pages under one roof.

share|improve this answer
thank you for your help. I had planned to upload everything to WP by way of a theme. My question lies in naming the files. I know WP won't like having something like services.php(or would it?), so what would be my options for naming that file? –  user1255049 Jun 18 '12 at 23:28
If you're talking about putting "static" files in the theme directory, check out the "template hierarchy" for an idea of filenames that are reserved by WordPress in this context: Any file name that doesn't fit into this hierarchy should be fine as a "custom" filename. I'm just confused as to why you'd want "static" files in there. They'd have to be accessed like:, which seems like an ugly URI for a static page. Or are you INCLUDING these "static" files from somewhere else? –  MathSmath Jun 19 '12 at 16:37

For custom page templates, I would use page_about.php or page_services.php.

Make sure you add the following after the opening PHP tag:

Template Name: About Page 

Custom page templates can be uploaded to your themes root directory or a sub folder named page-templates.

If creating a page template for a specific page, use the following:


Upload page templates to your themes root directory

As indicated, use hyphens for specific pages like page-007.php which is only used once and underscores for custom page templates like page_landing.php which can be re-used on multiple pages.

share|improve this answer
You should use hyphens, not underscores. :-) –  Pieter Goosen Feb 14 at 11:06
@goose Depends on what the page is for. –  Brad Dalton Feb 14 at 11:12
I'd emphasise the fact that custom page templates can be applied to any/multiple pages via the Page Attributes meta box, while the specialized/specific page templates will only be applied to the page with the matching slug and don't show up in the Page Attributes box. Given the names of the OP's pages it suggests that they should go with the second option (i.e they needn't worry about the 'Template Name' bit) –  Dre Feb 14 at 12:17

Your Answer


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.