Title: WordPress Development Environment
Last modified: August 19, 2016

---

# WordPress Development Environment

 *  Resolved [doug123x](https://wordpress.org/support/users/doug123x/)
 * (@doug123x)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/wordpress-development-environment/)
 * Hi There –
 * I’ve successfully installed wordpress on my site, but while I am populating the
   pages and so forth, I uploaded a “coming soon” default.htm, with the hopes of
   previewing the site through the index.php (and keeping the two seperate, until
   I remove the default.htm, which would then turn control over to wordpress). However,
   WordPress (index.php) is redirecting to the default.htm. If I remove the default.
   htm, the WordPress site works, but this defeats the purpose. I don’t want potential
   clients seeing the work in progress until it is completed.
 * [http://www.sampledomain.com/default.htm](http://www.sampledomain.com/default.htm)(
   interm “coming soon” message)
    [http://www.sampledomain/com/index.php](http://www.sampledomain/com/index.php)(
   wordpress redirector)
 * Is this approach correct? Any input would be appreciated.

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/wordpress-development-environment/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/wordpress-development-environment/page/2/?output_format=md)

 *  [govpatel](https://wordpress.org/support/users/govpatel/)
 * (@govpatel)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/wordpress-development-environment/#post-1784383)
 * Have tried to keep permalinks to default see if it still redirects.
 * Other option try and use your place holder as index.html as that first page will
   open on most servers for the domain name and if there is not index.html it will
   look for index.php
 *  Thread Starter [doug123x](https://wordpress.org/support/users/doug123x/)
 * (@doug123x)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/wordpress-development-environment/#post-1784385)
 * Just tried a permalink and it doesn’t bring up the WordPress blog.
    [http://www.sampledomain.com/?p=123](http://www.sampledomain.com/?p=123)
 * I don’t want the wordpress blog to load when someone hits the site – at least
   not now. I want to build the site & test the site using a “private” address and
   then when I am ready to go live, flip the switch. (which in this case is simply
   removing default.htm – afterwhich the wordpress site loads)
 * Thank you for your input.
 *  Thread Starter [doug123x](https://wordpress.org/support/users/doug123x/)
 * (@doug123x)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/wordpress-development-environment/#post-1784472)
 * Anyone? Surely this request can’t be that unique.
 *  [govpatel](https://wordpress.org/support/users/govpatel/)
 * (@govpatel)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/wordpress-development-environment/#post-1784473)
 * You can set it all up in folder make it a password protected folder and you can
   work on wordpress set it all up once you ready to make it live move wordpress
   to root.
 * [http://codex.wordpress.org/Moving_WordPress](http://codex.wordpress.org/Moving_WordPress)
 *  [Brig01](https://wordpress.org/support/users/brig01/)
 * (@brig01)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/wordpress-development-environment/#post-1784474)
 * This is what I do while I develop sites.
 * Just put this in your htaccess file (the one in your site root):
 *     ```
       ### MAINTENANCE REDIRECTION ###
       Options +FollowSymlinks
       RewriteEngine On
       RewriteCond %{REMOTE_ADDR} !^123\.123\.123\.123
       RewriteRule !^maintenance/ http://www.yourdomain.co.uk/maintenance/ [R=302,L]
       ```
   
 * Replace 123\.123\.123\.123 with your IP address. (If you don’t have a static 
   IP you might have to change this when your modem resyncs)
    You can add as many
   IP addresses as you want by adding more RewriteCond lines.
 * Then create an index file in /maintenance/ with your under construction message.
 * When you’re done with the site just comment this section out in the htaccess 
   file and keep it for when you need to do any future work.
 *  Thread Starter [doug123x](https://wordpress.org/support/users/doug123x/)
 * (@doug123x)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/wordpress-development-environment/#post-1784475)
 * Thank you for the replies guys.
 * I’ve already setup WordPress in the root of my web-site.
 * Why cannot I not do the following? (aside from the issue I am having with the
   index.php redirecting to the index.htm which I do not understand.)
 * [http://www.somedomain.com/index.php](http://www.somedomain.com/index.php)(and
   view the wordpress site during development)
    [http://www.somedomain.com/index.htm](http://www.somedomain.com/index.htm)(
   what the visitors see, until I remove it, afterwhich index.php takes over and
   wordpress becomes live)
 * I am not concerned about security (i.e., if someone purposely wanted to see the“
   development” site.)
 *  [Brig01](https://wordpress.org/support/users/brig01/)
 * (@brig01)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/wordpress-development-environment/#post-1784476)
 * If you’re on apache then it’s most likely down to your virtual host settings.
 * Usually there’s a line in the virtual host file that defines what file and which
   order the web server should serve up by default such as index.php then index.
   html then index.htm.
 * You would have to edit this to make index.htm the default.
 * The line usually looks like this:
 * `DirectoryIndex index.php index.html index.htm`
 * I think the htaccess solution I posted above would be easier for you and if you’re
   on a normal hosted service and not on your own server then it might be the only
   solution unfortunately.
 *  Thread Starter [doug123x](https://wordpress.org/support/users/doug123x/)
 * (@doug123x)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/wordpress-development-environment/#post-1784480)
 * Thank you for the response.
 * My apologies if I did not articulate this very well, but the issue I have is 
   that:
 * [http://www.somedomain.com/index.php](http://www.somedomain.com/index.php) for
   some reason redirects to [http://www.somedomain.com/index.htm](http://www.somedomain.com/index.htm)(
   default.htm)
 * I looked at the code in the wordpress index.php and don’t see why this is redirecting.?
   When I visit index.php I expected this to load the wordpress site. When I visit
   index.htm (which is the default), I expect the static html page to load.
 *  [Brig01](https://wordpress.org/support/users/brig01/)
 * (@brig01)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/wordpress-development-environment/#post-1784481)
 * Sounds like something in your htaccess file redirects. Shouldn’t happen though
   as WP wouldn’t add that by itself.
 * Have a look through your htaccess anyway to be sure.
 * Just tested on my dev site and as long as I set index.htm to be default index
   file I can access that and can access the WP site by specifying /index.php.
 * Sorry I can’t help more on that issue.
 *  Thread Starter [doug123x](https://wordpress.org/support/users/doug123x/)
 * (@doug123x)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/wordpress-development-environment/#post-1784482)
 * ok, will look into the ht access –
 * Thank you for your help everyone!
 *  Moderator [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [15 years, 5 months ago](https://wordpress.org/support/topic/wordpress-development-environment/#post-1784483)
 * It’s probably your server settings, actually.
 * Servers are set up to render pages in an order. Index.html, then home.html etc
   etc. Yours probably has default.htm before index.php, and either way, you can’t
   have TWO index files in the same folder without having issues.
 * Shortest answer: On some servers, you can’t have BOTH index.php and default.htm
   in the same folder.
 *  Thread Starter [doug123x](https://wordpress.org/support/users/doug123x/)
 * (@doug123x)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/wordpress-development-environment/#post-1784484)
 * Ah, I see now.
 * ok – great info, I’ll do some digging.
 * Thank you.
 *  [Brig01](https://wordpress.org/support/users/brig01/)
 * (@brig01)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/wordpress-development-environment/#post-1784485)
 * Still shouldn’t redirect if you specify for example default.htm in the URL. Those
   server settings are just in which order the server should serve pages. Unless
   there are some odd server settings your hosts have done.
 * This is how it works on my server:
 * In the virtual hosts setting:
    `DirectoryIndex index.php index.html index.htm`
 * The server will look for index.php first, if that doesn’t exist then look for
   index.html and so on. But it only does that if you don’t specify the file in 
   the URL.
 * For example [http://www.domain.com/](http://www.domain.com/) would pick index.
   php if it exists otherwise look for index.html then index.htm
 * [http://www.domain.com/index.html](http://www.domain.com/index.html) will always
   serve index.html even though index.html is second in order.
 *  Thread Starter [doug123x](https://wordpress.org/support/users/doug123x/)
 * (@doug123x)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/wordpress-development-environment/#post-1784486)
 * This is what I had originally thought, because for example the current index.
   php could be renamed bob.php and it shouldn’t redirect.
 * Here is the site – this may help:
 * [http://www.keystonemasonry.com/default.htm](http://www.keystonemasonry.com/default.htm)
   which is the same as [http://www.keystonemasonry.com](http://www.keystonemasonry.com)
 * and
 * [http://www.keystonemasonry.com/index.php](http://www.keystonemasonry.com/index.php)(
   wordpress)
 * Note the strange redirection.
 * If I delete default.htm – the wordpress site kicks in and life is good.
 *  Thread Starter [doug123x](https://wordpress.org/support/users/doug123x/)
 * (@doug123x)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/wordpress-development-environment/#post-1784487)
 * I’m going to follow the code through and see what happens. Seems like it’s the
   wordpress engine that loads the default.htm file
 * Index.php code (pretty basic)
 * <?php
    /** * Front to the WordPress application. This file doesn’t do anything,
   but loads * wp-blog-header.php which does and tells WordPress to load the theme.**
   [@package](https://wordpress.org/support/users/package/) WordPress */
 * /**
    * Tells WordPress to load the WordPress theme and output it. * * [@var](https://wordpress.org/support/users/var/)
   bool */ define(‘WP_USE_THEMES’, true);
 * /** Loads the WordPress Environment and Template */
    require(‘./wp-blog-header.
   php’); ?>

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/wordpress-development-environment/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/wordpress-development-environment/page/2/?output_format=md)

The topic ‘WordPress Development Environment’ is closed to new replies.

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 18 replies
 * 5 participants
 * Last reply from: [scvbruce](https://wordpress.org/support/users/scvbruce/)
 * Last activity: [14 years, 8 months ago](https://wordpress.org/support/topic/wordpress-development-environment/page/2/#post-1784598)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
