Forum Moderators: rogerd & travelin cat

Message Too Old, No Replies

Hiding A Live Site During Development

         

Planet13

3:04 pm on Oct 11, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hi all:

What's the best way to keep a development site hidden from everyone except for the client and I to view?

And after I decide to make the wordpress site their live site instead of their current html site, what is the best way to change the URLs globally so that they match the html's URLs?

My thought is that DURING DEVELOPMENT I would build the site on the client's current live site in a subdirectory called /blog/

Can I just password protect that /blog/ directory to prevent people other than the client and I from seeing it? Or is password protecting the directory going to cause any problems with the wordpress functionality?

And when the site goes live, I will want to move the site from out of the /blog/ directory up to the root directory of the site. What's the best way to do this?

Since I need the client to be able to see the site while in development, using wamp or lamp and developing locally isn't going to be an option.

Thanks in advance.

Planet13

3:28 pm on Oct 11, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hmmm...

Thinking I might just keep the wordpress installation in a /blog/ or in a /wordpress directory and just use the Giving WordPress Its Own Directory function here:

[codex.wordpress.org...]

Planet13

3:38 pm on Oct 11, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Ok... maybe this is a better solution:

Also, instead of password protecting the site, maybe there is a better way (built into wordpress) that will let me make pages and posts private on a global basis.

not2easy

5:11 pm on Oct 11, 2014 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



A password on the /blog/ directory should not have any effect on the functions of WP because the password is external to WP, that is managed by your server.

Yes, WP can stay in its own directory after you complete everything and appear to be in the domain root directory. I have a WP install set up that way for years now and it works better for the way I use the domain. That site already had a lot of static and dynamic pages and directories, so rather than rewriting all those URLs, I did just as described in that codex link. Pages that are really in the root directory work the same as they would without WP, but everything in WP appears to be based in the root.

If you go with pages and posts "Private" they don't show in navigation either so that would be my last choice for developing the site.

Planet13

6:41 pm on Oct 11, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Thank you, not2easy.

Ok, so it looks like I will:

1) Install and set up in a /blog directory

2) Password protect the directory via Cpanel / plesk / whatever the host uses for site admin

3) When ready to go live, leave the site in the /blog directory and use the giving WP it's own directory method to make the URL structure match that of the original html-based static site.

Thanks again.

not2easy

7:30 pm on Oct 11, 2014 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



"make the URL structure match that of the original html-based static site. "
-SORT OF-
the /blog directory's contents will show URLs like www.example.com/page
rather than www.example.com/blog/page as they would during development. but the static html pages most likely have a file extension (like htm, html, php) and WP don't normally have an extension. So in that respect they won't match the existing URL structure.

lorax

8:17 pm on Oct 11, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Another option for blocking access - If you're on a fixed IP then you can block all but your own IP.

netmeg

12:37 pm on Nov 2, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Late to the party on this one, but I either allow a dev site only by IP number, or use a plugin I really like called Private Only that just puts the whole site under password protection till I'm ready to open it up.

When I'm ready to go live, if I'm moving it to a different place, I just upload the files, create an SQL database, do a simple search and replace for the URLs in the db (using Notepad++) and install the db. I can almost do it in my sleep by now. Probably have.

Planet13

1:00 pm on Nov 2, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I can almost do it in my sleep by now. Probably have.


Well, that method wouldn't work for me because I have been getting NO sleep lately...

;-)

In all seriousness, thanks for the plugin suggestion and thanks for the reminder that you can still do full manual mode for changing the folder / subdomain when moving from development to live site.

DudeWhatsUp

8:06 pm on Nov 2, 2014 (gmt 0)

10+ Year Member



Wow, I finally have a contribution to this great community. Been lurking for years.

Add this to your .HTACCESS file. Top is okay. Google "what's my ipv4" to get your current IP.

# ALLOW USER BY IP
<Limit GET POST>
order deny,allow
deny from all
allow from 1.2.3.4
allow from 5.6.7.8
</Limit>

Planet13

9:19 pm on Nov 2, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Thanks for the tip.

Unfortunately that wouldn't work too well for me because I am on DSL and my ip changes frequently, and the client is mostly checking on his phone (I assume IP would change a often on a phone, too).