Hosting a PHP test website locally


Previously, when we first started web development years ago, we always edited html locally (on our computers hard drive), and tested it via opening it with a browser. This does work the majority of the time however when we started to look at developing with server side code (especially php) I found that the browser had problems reading it locally.

PHP, for those who do not know, is a language, a step on from HTML, enabling you to send information to a server and allowing it to send things back to effect the information displayed on that page. You can also store this information in a database, which sits on the server. All these are useful features - this blog for example is run by Wordpress which uses PHP.

When we discovered that PHP didn't work on our local servers we didn't have time to look into it and to get around the problem, we simply used to FTP the php files up to an internet host and tested from there. Now that's all well and good but after a while it becomes a little tedious to keep having to save a file then go to the browser, then upload it. Then we found these:

Installing MAMP and Wordpress
Enabling Apple's Supplied PHP

These are tutorials in which you can install php (and in the first one MSQL) to your local computer. We realize these are for Apple Macs so apologies PC people (not getting into a debate about that right now! If anybody can recommend a link on how to achieve this on a PC please leave a comment).

After installing php on your local computer, you can then develop a php site, and database, locally - simply saving a php file, flicking to a browser and refreshing. When the site is ready then you can upload it for the world to see. This saves you time (and therefore money - donations gratefully accepted ;).

Other Useful Links

Below are some useful links to the tools we use for web development be aware these are all for Apple Mac's):

  • Cyberduck Free FTP programme
  • BBEdit Superb HTML and text editing software
  • RAGE WebDesign - 2.8 Free alternative to BB Edit
  • Adobe Creative Suite Including Illustrator and Photoshop to create graphics
  • Flash for simple 2D animation
  • What no Dreamweaver? No sir! we write everything from scratch. In my view its the only way to ensure clean best practice code with each site that is produced. If you've never done it, get your hands dirty chaps - you never know you might enjoy it!

    Conclusion

    So these are how we "do" websites. Can anybody throw anything else into the mix? Feel free to make a comment below...

Comments

Regarding setting up Php on Windows:

The official manual
http://uk.php.net/install.windows

Nice tutorial
http://www.adobe.com/devnet/dreamweaver/articles/php_iis.html

Php’s is a good scripting language. It’s by far the best open source one. Easy to learn, quick to run. Problem is because it’s free, open source and mainly used by hobbyists, the bigger potential clients tend to give it less respect than it deserves. I much prefer C# though….

for pc you can use WAMP or XAMPP (these are the most popular) or "Web-Developer Server Suite" (this one includes some applications; for linux there's LAMP.

This is a comparision of this kind of applications:
http://en.wikipedia.org/wiki/Comparison_of_WAMPs

As a creative student about to graduate, I have long been aware of web design and web development merging into one, most employers are now looking for dynamic html and basic knowledge of server side scripting as well as design skills.

Being able to design a good website is simply not enough these days without the technical knowledge to back it up, it's all about content management systems and all of the boring bits that go with it. The boundaries between techies and designers is fading fast and those who don't update will find themselves left behind!

I knew those boring books would come in handy at some point ;)