Add .html & .php to the URL of WordPress PAGES (not Posts)

Yesterday’s daily tip was about adding .html to the URL of posts by tacking .html onto the end of permalinks.

But that little trick of adding .html to permalinks doesn’t affect the PAGES on your site. It affects the posts, but not pages.

The solution for attaching .html to a Page can be accomplished with a plugin — .html on PAGES is one such plugin.

If you have the need for .php on your Pages, there is also a plugin for that — .php on PAGES.


NOTE: As someone pointed out in the comments on the .html post yesterday, be watchful for any issues that may occur if you are using a caching plugin. Just check things out every now and then to make sure all is working as it should.

Featured Plugin - WordPress Wiki Plugin

To get a wiki up and running you used to need to install Mediawiki and toil away for days configuring it... not any more! This plugin gives you *all* the functionality you want from a wiki, in WordPress!!!
Find out more

Photo: www internet web address concept from BigStock

Tags ,

Comments (10)

    • Malik – As Hunter mentions below, it’s good for when you’re moving an existing site over to WP and your pages already end in .html or .php.

      This isn’t a recommendation to use it on a fresh site. I don’t think it would make any difference. Some people have theories that it might make it seem like a more permanent page, and therefore will be seen by Google as having more evergreen value, but I’m not sure anyone has proven this.

      We discussed this a little in the comments from yesterday’s post:

  1. Totally makes sense if you have existing pages that you want content managed that are not currently. If your site is legacy, with good SEO on certain page names that end in “.html”. Even with permanent redirects, you’ll probably lose juice. Why not simply recreate the page name under WordPress and change the extension to “.html”, preserving all other aspects of the permalink.

      • Hey there- Like you, I am redoing an old static sight into wordpress and want to keep the old .html url structures for search rank purposes.

        The .html on pages plugin does work like a charm. Unfortunately, I can’t figure out how to exclude the “blog” page. I have set the blog functionality to my “blog” page and want the url to read “” (presently “”.)

        I tried using the code that Jeff pointed to in the previous post ( but I get an error when I click the blog page link that says the redirect wasn’t working properly.

        Wondering if you had a chance to look at it and if you know of any way to simply exclude the .html extension for a single page? If you could help me out, I’d be much obliged.


  2. Hi, I have exactly the same problem as J.Brown. The plugin created .html on each page but my blog looks like this “” which is weird. I need to exclude it from being assigned a .html at the end.
    Any ideas?

    Thanks in advance

  3. Hi,

    I just tried this on a wp 3.8 site and it worked fine.

    However on a multisite it gives me an error;

    [an error occurred while processing this directive]

    when I try to view the page on one of the sites with .php extension activated.

    This happens on the root site and other test site, and with plugin activated singly or network activated.

    The install has the standard .htaccess for a multisite so I am wondering if the plugin is compatible with multisite, and if anyone had managed to get it working on one..?