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 would like to make it so the URLs of my pages (created in the Wordpress dashboard) show up right after the domain name instead of after the blog directory.

I have installed Wordpress in a directory called blog which is located in the public_html directory. When I make a page from the Wordpress dashboard it will by default appear under the blog directory like:

What I would like to do is take advantage of Wordpress's built in 'pretty URL' styling but use them outside of the blog directory where Wordpress is installed. So for example:

When I try to manually create a page, add it in public_html directory and view it on my site it looks like: 

I don't like the trailing .html because it is not clean looking and just extra unneeded info for the visitor.


Also keep in mind that I would also like to keep the URLs of each post looking like:

So to sum it up:

How can I make my Wordpress page URLs look like while having my Wordpress installed in as well as having my post URLs looking like ?

share|improve this question

3 Answers 3

You just set the WordPress directory in your WP General Settings to your top-level URL (, then copy index.php to the root directory of your site and modify it to load content from your actual wp directory.

Step by step instructions are here:

I did this for my personal web site: The WP files are actually located in a subdir of the web root (public_html), not the web root dir.

No URL rewriting is required!

share|improve this answer
dthrope, unfortunately this did not solve my problem and this is due to my unclear explanation of my problem. I have updated the question. Anyways, after following the instructions you sent me, I tested my site out and realized that my posts and pages showed up like and respectively. The first problem is that I'd like the posts to be showing up like The second problem is that the content of the WP created pages is not being displayed. The URL of each page is fine though. – user3297 Feb 19 '11 at 18:23

The easiest way is just to install WordPress in the root directory instead of in the subdirectory /blog/.

Then if you want posts still to appear in /blog/ you can edit the permalinks structure in your Settings to include that.

share|improve this answer
Gesher, I am trying to make this as streamlined for my client so I can't do work arounds like this. There has to be a solution to this. – user3297 Feb 19 '11 at 18:24
@classer: There is not. If you have the WP site installed in /blog, then /blog is required on all WP URLs. This isn't a WordPress limitation, it has to do with how webservers work. – Otto Feb 19 '11 at 22:32


All I had to do was install WP in my root and then go to Settings > Reading > Front page displays > and then select 'blog' as my 'posts page'.

For my front page I used a custom template that I created from this tutorial which is semi dated but the info is still accurate.

share|improve this answer
Isn't this what I said? – gesher Jun 6 '14 at 19:45

Your Answer


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