View Full Version : How do I set up a local server to work on

Harold Mansfield
08-28-2010, 10:06 PM
I know that I can set up a local server on my computer to work on. My questions, will the client be able to view those files while I am working and if so, how do I set that up?

The other question is, is it better to do it on my computer or purchase a separate server ?

08-29-2010, 01:20 PM
Yes you can setup a local server on your computer. On a windows machine you will need to install the IIS manager. Depending on your version, it may have been included with orginal Windows disk. To install IIS, open the control panel. Open programs. Then select "Window features". Check the box next to IIS. (You may need the windows disk). The IIS will install. Place your website in the default directoy (C:\inetpub\wwwroot).

As for your client viewing those files. I am assuming you want him to view them over the internet. It is possible, but I would not suggest it. It would open a hole in the firewall between you and the internet. Instead, I would find a host were you can upload the files. There are many out there and they are fairly cheap.

Harold Mansfield
08-29-2010, 02:11 PM
As for your client viewing those files. I am assuming you want him to view them over the internet. It is possible, but I would not suggest it. It would open a hole in the firewall between you and the internet. .

This was the part I was worried about and that's what I thought too. Seems the current process of building live on a directory and then swapping the files to place the new site live is the only thing that makes any sense.

08-29-2010, 03:11 PM
If you want the clients to see the files I think it would make more sense to just set something up online. Is there a reason you don't want to do this? I'm not sure what advantage you'd gain by trying to set it up locally?

Harold Mansfield
08-29-2010, 03:16 PM
If you want the clients to see the files I think it would make more sense to just set something up online.
Pretty much what I am doing now. No sense in building on my own server just to move it to theirs anyway.

Is there a reason you don't want to do this? I'm not sure what advantage you'd gain by trying to set it up locally?

Recently I found it very difficult to work on a site that had existing files on the root...tons of them with all kinds of .htaccess redirects and it was throwing off the build because it was messing with the installation and the URLS.
So it was hard to keep the old site up, while building the new one on a folder. I found a fix for it, but I thought that maybe there was a way to set up a virtual server and create the same URL structure and just drop the completed files on the root when I was done.

08-29-2010, 04:31 PM
You work in PHP so you want an Apache, PHP , Mysql download not IIS. I use xampp apache friends - xampp for windows (http://www.apachefriends.org/en/xampp-windows.html) Another popular one is Easy PHP which I have used on windows.

The reason to use it is its much faster to work on a local server. No FTP to look at changes. You change a wordpress file, hit save and type http:// localhost/mysite to see the page you changed. Fast.

If you are working on a site all day long it makes a lot of sense. At the end of the day, upload the changed files so your customer can see the changes and go watch TV during the upload.

If you are only doing a quick change to one file for a customer it doesn't make sense.

I'd highly recommend it. It will save time and be much more convenient for large projects.

If you are doing it because of htaccess issues, thats best done on the server, not locally.

08-29-2010, 07:12 PM
With windows 7, you can also run php through the IIS.

08-29-2010, 08:18 PM
Yes, but some things are more difficult. Redirection for one. If I'm not mistaken you can't quite set up mod_rewrite on IIS so you'd be duplicating work having to set it up one way on the test server and then another on the live server.

Harold you don't have to build the site on the client's server. You can build something on one of your own servers. Set up a test directory for html and php sites. Set up another blog under WordPress for WordPress sites. You can build how you like and the client can see the progress. As far as moving to the client's site with all the files in the root, you just have to deal with it. Ideally the root would be clean, but that doesn't always happen and it's simply part of the job.

08-30-2010, 01:36 PM
Also, since the final site will be running on Apache, its best to design under apache. Xampp is a one click install so its really easy. Manually installing and configuring php and mysql is a pain.

Xampp will install under your root directory ie C/ which will eliminate any path issues and globals issues. I don't know where IIS would be installed, but if it is under Program Files for example, there will be a space in the path between program and files which will create path problems in php.

Harold Mansfield
09-13-2010, 01:04 PM
This problem has reared it's ugly head again.
New client wants a multi-bog set up, but wants his existing site to stay up until it's complete.
There is no way to build a multi site using subdomains on a folder of an existing site. You need a clean install.
The only way to do it would be to build the main site on a folder, transfer the new site to the root..delete all other files on the root (meaning everything of the old site) and then set up and build the additional sites on the subdomains.

They don't want to do it that way, they want to see it all complete before the transfer is made.

Any ideas?

09-13-2010, 04:42 PM
You should be able to build the whole site in a subdirectory or on a different domain so the client can see. When it's time to take the new site live, move everything currently in the root to a new subdirectory. I use old-site all the time. Then move everything new in.

If the current site is on WordPress you can move the whole site (except for index.php) to a sub directory now and make a few tweaks so it displays as usual. You'll need to do the same things you do to set that up in the first place. Change index.php so it points to the new folder and change the settings on the admin side (Think it's just the one in the general settings tab). Instead of moving things to the new folder you can copy them until you know everything is working from the new folder.

Then build the new site under its own folder. When it's time to switch you just need to set the new site to be located in the folder while the home page shows at the root. You'll just have to change the same index.php file that's in the root to point to the new site instead of the old one.

Harold Mansfield
09-13-2010, 04:49 PM
That'll work fine for setting up single user WP and one website,but I don't think it will work for an MU set up. I don't think you can move an MU set up to a new domain, especially after you have already created sites within the network.

09-13-2010, 06:43 PM
You really should try working locally. Having said that, I have never tried subdomains locally. Should be able to do it though, as you have apache on your pc.

Other alternative is put the thing in a subfolder on domain you have and develop it their. Might want to register a domain just for this. Use <html></html> on the index page. Its unlikely that any bots will find the subfolder where the site under development is.

If paths are an issue, developing locally is the only way I can think of.

Harold Mansfield
09-13-2010, 06:56 PM
I thought of developing on another domain, because the client undoubtedly always wants to follow along and many times I need their input anyway. The only thing is, I have never transferred an MU installation with multiple sites already built, to a new domain...and the only way that it can be done (if it can be done) is to totally erase everything from the destination domain before you do your MU installation...it has to be a clean installation.
Assuming that is the way to, it would mean either transferring the database or repopulating a new database with the information. Tricky, but I think it may work that way.

09-13-2010, 11:01 PM
One thing that may catch you is some hosts append a prefix or something to database names, user names etc so moving from one domain or a local install may not work. I don't know if you have dreamweaver, but if you can get a hold of a copy, it has a nice sitewide search and replace function. There may be some text editors that do that as well for a lot less money.

09-14-2010, 01:08 PM
Why wouldn't it work? Is it the main site or the sites under the main one?

If you can't move the site to a new domain then setting it up on your own server isn't going to help. And again you can build this site on the client's domain in a subfolder. You can definitely move the site to a new domain. WordPress is going to be relying on a few settings to tell it what the domain is. All you have to do is change those settings and it should work fine on any domain.

Assuming it can't be moved, build the main site and then set it up on the client's domain. At that point they'd have to accept that it's the only way to get the new site live on their domain. However, I really don't think there's any reason you can't move a multi-site WordPress setup.

Harold Mansfield
09-15-2010, 10:47 AM
You know...I guess it would work, it will just be a pain

09-15-2010, 11:34 AM
Yeah I can understand that. I don't think it will be that bad if you build everything on the client's site in a directory off the root. In the end you'll simply need to move the index.php file out into the root, change the path in the file and update the settings on the backend, and move the live site to a new directory. In fact you probably only need to move the live site's index files out of the root.