# Best practices for file names in Wordpress

**URL:** <https://forum.pinegrow.com/t/best-practices-for-file-names-in-wordpress/7335>\
**Category:** Pinegrow WP\
**Tags:** wordpress\
**Created:** [December 7, 2022, 2:52pm UTC](https://forum.pinegrow.com/t/best-practices-for-file-names-in-wordpress/7335 "2022-12-07T14:52:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dimitri85](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/dimitri85/32/4294_2.png) [@Dimitri85](https://forum.pinegrow.com/u/Dimitri85)\
**Post date:** [December 7, 2022, 2:52pm UTC](https://forum.pinegrow.com/t/best-practices-for-file-names-in-wordpress/7335/1 "2022-12-07T14:52:32Z")

</div>

Hello everyone, I’ve read the [Short guide to naming WordPress templates](https://pinegrow.com/docs/wordpress/a-short-guide-to-wordpress-template-names/) but I guess I didn’t quite understand the best practices for my specific situation.

I’d like to build a website with a home (static) page and a separate page for the blog posts, like this:

- my\_domain\_name.com/ goes to a static home page
- my\_domain\_name.com/blog goes to the blog page, with the main loop.

I have exported the static page as index.php and the blog page as front-page.php. Wordpress shows the blog page but ignores the static home page I’ve created.

How should I export these files so that WP understands the behavior I’m looking for?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Dom](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/dom/32/4887_2.png) [@Dom](https://forum.pinegrow.com/u/Dom)\
**Post date:** [December 7, 2022, 3:42pm UTC](https://forum.pinegrow.com/t/best-practices-for-file-names-in-wordpress/7335/2 "2022-12-07T15:42:02Z")

</div>

@Dimitri85 You need to make sure that you’ve named your templates correctly.

see [this entry in the documentation](https://pinegrow.com/docs/wordpress/a-short-guide-to-wordpress-template-names/).

---

<div class="post-metadata">

**Author:** ![Proprius](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/proprius/32/4910_2.png) [@Proprius](https://forum.pinegrow.com/u/Proprius)\
**Post date:** [December 9, 2022, 4:38am UTC](https://forum.pinegrow.com/t/best-practices-for-file-names-in-wordpress/7335/3 "2022-12-09T04:38:42Z")

</div>

Did you set the homepage as a static page in WP Settings \> Reading? See [https://pinegrow.com/docs/wordpress/a-guide-to-wordpress-templates-for-posts-pages-and-custom-post-types/](https://pinegrow.com/docs/wordpress/a-guide-to-wordpress-templates-for-posts-pages-and-custom-post-types/)

---

<div class="post-metadata">

**Author:** ![Dimitri85](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/dimitri85/32/4294_2.png) [@Dimitri85](https://forum.pinegrow.com/u/Dimitri85)\
**Post date:** [December 9, 2022, 3:45pm UTC](https://forum.pinegrow.com/t/best-practices-for-file-names-in-wordpress/7335/4 "2022-12-09T15:45:16Z")

</div>

Now I did. That’s what I’ve done:

1. Created 2 pages on WP admin: Home and Blog.
2. In WP Setting \> Reading, I pointed the home do Home and the posts page to Blog.
3. The posts page I exported on Pinegrow as home.php.
4. The static home page I exported both as front-page.php and index.php.

It’s working. When I point to / it shows the static page I wanted and when I point to /blog it shows the posts page. However, I don’t really know which .php file the WP is using to render the static home page.

It doesn’t sound right to have both front-page.php and index.php with the same content.

---

<div class="post-metadata">

**Author:** ![sitestreet](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/sitestreet/32/41_2.png) [@sitestreet](https://forum.pinegrow.com/u/sitestreet)\
**Post date:** [December 9, 2022, 4:24pm UTC](https://forum.pinegrow.com/t/best-practices-for-file-names-in-wordpress/7335/5 "2022-12-09T16:24:09Z")

</div>

> **[Template Hierarchy | Theme Developer Handbook | WordPress Developer Resources](https://developer.wordpress.org/themes/basics/template-hierarchy/#home-page-display)**
>
> As discussed, template files are modular, reusable files, used to generate the web pages on your WordPress site. Some template files (such…

[![](https://developer.wordpress.org/files/2014/10/Screenshot-2019-01-23-00.20.04.png) ](https://developer.wordpress.org/files/2014/10/Screenshot-2019-01-23-00.20.04.png)

---

<div class="post-metadata">

**Author:** ![Proprius](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/proprius/32/4910_2.png) [@Proprius](https://forum.pinegrow.com/u/Proprius)\
**Post date:** [December 9, 2022, 9:37pm UTC](https://forum.pinegrow.com/t/best-practices-for-file-names-in-wordpress/7335/6 "2022-12-09T21:37:39Z")

</div>

@Dimitri85 You don’t need to export the static homepage as front-page.php and index.php. WordPress will look for front-page.php first, but if you don’t export as front-page.php, it will use index.php, so either will work. Which one you use depends on whether the static page is unique among all the site pages (for example, having an unusual header), in which case I’d assign it to front-page.php. Because index.php is the fallback template for all pages, you wouldn’t want to assign an odd-looking page to it.
